summaryrefslogtreecommitdiffstats
path: root/video
Commit message (Collapse)AuthorAgeFilesLines
* options: hide encoding AO/VO in help outputwm42013-07-211-0/+1
| | | | | These can't be used manually. Encoding is enabled with -o instead, and the encoding AO/VO is selected using internal mechanisms.
* options: use new code for parsing --vowm42013-07-213-143/+77
| | | | | | | | | Nothing should change from user perspective. mpv --vo=opengl:help now works. Remove the vo_opengl inline help text. The new code can list option names for you, but that's it. Refer to the manpage if you have trouble.
* options: use m_config for options instead of m_structwm42013-07-2114-252/+179
| | | | | | | | | | | | | | | | | | For some reason, both m_config and m_struct are somewhat similar, except that m_config is much more powerful. m_config is used for VOs and some other things, so to unify them. We plan to kick out m_struct and use m_config for everything. (Unfortunately, m_config is also a bit more bloated, so this commit isn't all that great, but it will allow to reduce the option parser mess somewhat.) This commit also switches all video filters to use the option macros. One reason is that m_struct and m_config, even though they both use m_option, store the offsets of the option fields differently (sigh...), meaning the options defined for either are incompatible. It's easier to switch everything in one go. This commit will allow using the -vf option parser for other things, like VOs and AOs.
* vf: remove unnecessary indirectionwm42013-07-212-26/+5
|
* cocoa_common: fix regression in draggable state computationStefano Pigozzi2013-07-211-0/+1
| | | | Regression introduced in 8fb064de5. Prevented the OSC from working correctly.
* cocoa_common: fix styleStefano Pigozzi2013-07-211-2/+2
|
* cocoa_common: move tracking area setup to updateTrackingAreasStefano Pigozzi2013-07-211-14/+13
| | | | This makes the tracking area work when going in and out of fullscreen.
* x11: add key modifiers to mouse button eventswm42013-07-211-13/+19
|
* w32_common: show the cursor in the window borderJames Ross-Gowan2013-07-212-6/+22
| | | | | | | | | | | | | | | | | | When the cursor was in the window border, it could be hidden but it wouldn't appear again, since mpv doesn't process mouse input there. The code used ShowCursor, which is a horrid stateful API designed for mouseless Win16 systems that incremented or decremented a global counter to keep track of how many applications needed to display a special cursor (like a busy cursor.) Replace that with a simple flag, handle WM_SETCURSOR and use SetCursor(NULL) to hide the mouse cursor, but only when the mouse is in the client area. DefWindowProc will set the correct cursor on the border as long as it isn't hidden with ShowCursor. PowerPoint also uses SetCursor(NULL) to hide the cursor when showing a presentation, so it's probably safe. See http://blogs.msdn.com/b/oldnewthing/archive/2009/12/17/9937972.aspx
* cocoa_common: handle keyboard modifiers for mouse eventsStefano Pigozzi2013-07-211-47/+51
|
* Merge remote-tracking branch 'michaelforney/master'Alexander Preisinger2013-07-201-2/+11
|\
| * wayland: Fallback to any GL version if 3.0 is not supportedMichael Forney2013-07-191-2/+11
| | | | | | | | This fixes playback on Wayland with older GPUs.
* | cocoa_common: make the fullscreen transition only when necessaryStefano Pigozzi2013-07-201-5/+16
| | | | | | | | | | This makes the cocoa backend follow more closely the new fullscreen semantics added in c4b08a9a.
* | cocoa_common: use a tracking area to handle mouse eventsStefano Pigozzi2013-07-201-33/+52
| | | | | | | | | | | | | | | | | | This change which also flipse the coordinate system of the view, greatly simplifies the mouse event handling code. There are still some uglities mostly related to the cursor visibility code. For instance the core doesn't show the cursor when it receives a mouse leave event.
* | cocoa_common: fix typo in commentStefano Pigozzi2013-07-201-1/+1
| | | | | | | | Surely it's copy pasta's fault.
* | cocoa_common: implement MP_MOUSE_LEAVE notificationsStefano Pigozzi2013-07-201-0/+2
| | | | | | | | | | This is needed for the OSC. At the moment I'm sending a notification for any mouse movement outside of the video surface. This might be overkill.
* | cocoa_common: implement conditional video draggingStefano Pigozzi2013-07-201-14/+30
| | | | | | | | | | | | This was more roundabout than expected, since it looks like the framework caches isMovabileByWindowBackground so in mpv's case it's needed to set it with setMovableByWindowBackground.
* | direct3d: Fixes format string that assumed sizeof(LONG) == sizeof(long)Diogo Franco (Kovensky)2013-07-201-1/+2
|/
* wayland: use a unified struct for the stateAlexander Preisinger2013-07-183-297/+283
| | | | | | | | | | This commit removes the pointer to the single different structures for input and window and puts them as anonymous structures inside the wayland_state structure. This has the disadvantage of passing the substructure to the listeners, but the advantage is that we don't have to allocate them and check for NULL pointers. This makes it more reliable and easier to follow.
* wayland: don't resize in gl_wayland.cAlexander Preisinger2013-07-182-7/+1
| | | | | | The vo_wayland_fullscreen handles resizing for the video, because the video could still be in fullscreen mode and resizing it in gl_wayland could make it grow or shrink.
* video: remove fullscreen flags chaoswm42013-07-1812-84/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a MPOpts fullscreen field, a mp_vo_opts.fs field, and VOFLAG_FULLSCREEN. Remove all these and introduce a mp_vo_opts.fullscreen flag instead. When VOs receive VOCTRL_FULLSCREEN, they are supposed to set the current fullscreen mode to the state in mp_vo_opts.fullscreen. They also should do this implicitly on config(). VOs which are capable of doing so can update the mp_vo_opts.fullscreen if the actual fullscreen mode changes (e.g. if the user uses the window manager controls). If fullscreen mode switching fails, they can also set mp_vo_opts.fullscreen to the actual state. Note that the X11 backend does almost none of this, and it has a private fs flag to store the fullscreen flag, instead of getting it from the WM. (Possibly because it has to deal with broken WMs.) The fullscreen option has to be checked on config() to deal with the -fs option, especially with something like: mpv --fs file1.mkv --{ --no-fs file2.mkv --} (It should start in fullscreen mode, but go to windowed mode when playing file2.mkv.) Wayland changes by: Alexander Preisinger <alexander.preisinger@gmail.com> Cocoa changes by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
* vo: remove aspdat.asp memberwm42013-07-182-3/+1
| | | | | | This was bad, because it was the only aspdat member updated by vo_get_src_dst_rects() instead of vo_reconfig(). Now it isn't accessed anymore, so remove it.
* gl_video: add support for more rgb formatswm42013-07-182-56/+119
| | | | | | | | | | | | | | | Until now, only formats directly supported by OpenGL were supported. This excludes various permutations of 8-bit RGB[A|0]. But we can simply permutate the color channels in the shader, so do that. This also adds support for all these weird RGB0 formats. Note that we could use libavutil's pixfmt list instead of the mp_packed_formats array, but trying to decrypt the pixfmt info would probably end in pain, so this array with duplicated information is actually better and shorter. Note: I didn't actually test whether the alpha components are reproduced correctly with alpha formats.
* img_format: comment on some pixel formatswm42013-07-181-7/+9
|
* img_format: add a mask for color classwm42013-07-183-4/+5
| | | | | | | Using the term "color class" to avoid confusion with the other colorspace related concepts. Also get rid of MP_IMGFLAG_FMT_MASK, since it was unused.
* sws_utils: make hq swscale flags available with mp_sws_hq_flagswm42013-07-183-7/+8
| | | | No need to duplicate this on the call-site.
* sws_utils: don't recursively include libswscale headerwm42013-07-184-1/+4
| | | | Add libswscale includes where they are actually needed instead.
* sws_utils: remove some old codewm42013-07-182-76/+0
|
* vo_x11: use new swscale wrapperwm42013-07-181-28/+20
|
* mp_image: one utility function to set image parameterswm42013-07-182-0/+14
|
* vf_scale: use new swscale wrapperwm42013-07-181-157/+60
|
* vf: make sure less important image params are set before/after filterswm42013-07-181-14/+21
| | | | | | | | Image parameters like colorspace, color levels, and chroma location are generally less important, and many filters don't set them correctly. Force them instead in the generic VF code, which is probably better and more convenient over all. So we designate this is a proper solution, instead of a dirty hack.
* sws_utils: refactor swscale wrapper codewm42013-07-184-63/+197
| | | | | | | | | | This splits the monolithic mp_image_swscale() function into a bunch of functions and a context struct. This means it's possible to set arbitrary parameters (e.g. even obscure ones without getting in the way), and you don't have to create the context on every call. This code is preparation for removing duplicated libswscale API usage from other parts of the code.
* vf_scale: remove rounding of sizes to 2 with 4:2:0wm42013-07-181-11/+0
| | | | | | | | | libswscale doesn't seem to require this (anymore?), and libavfiltert's vf_scale doesn't do it either. Moreover, this wasn't done for most other subsampled formats, not even very old ones. So just remove it. (It'd be quite easy to align on chroma boundaries with all pixel formats, though.)
* vf_scale: try to support all pixel formatswm42013-07-181-1/+25
| | | | | | | | | Until now, vf_scale only tried formats listed in the outfmt_list array. Extend this and try every pixel format supported by mpv if trying outfmt_list doesn't lead to success. Also add some checks whether swscale really supports a given input or output format. This was implicitly done with outfmt_list before.
* vf_scale: don't byte-swap palette on big endian architectureswm42013-07-181-8/+0
| | | | | | ffmpeg's and the internal palette format used to have different endianess, but that is not the case anymore. This code was forgotten when that change was made.
* vf_scale: uncrustifywm42013-07-181-186/+207
|
* vo_x11: remove weird inactive codewm42013-07-181-15/+0
| | | | | | | | | | | | | | | | | | | | I guess this code was supposed to handle cases like drawing RGBA as ARGB by offsetting it by 1 byte. The code didn't make any sense, though. It used to make sense before mpv switched internal pixel formats from FourCCs to a simple enum. With the FourCCs, "fmt | 128" selected the big endian version of a format. Of course this doesn't work this way with the new pixel formats. It just so happens that there are no formats with whose values match IMGFMT_RGB32|128 or IMGFMT_BGR32|128, so this code was inactive. All involved pixel formats seem to play fine on my setup (though it's little endian only), and the code strictly matches the mpv pixel formats against the format of the X image, so I'm not quite sure why this code was there in the first place. The original commit that added this was b333ae1 (svn 21602): Support for different endianness on client and server with -vo x11
* video: redo how colorspaces are handledwm42013-07-168-102/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of handling colorspaces with VFCTRLs/VOCTRLs, make them part of the normal video format negotiation. The colorspace is passed down like other video params with config/reconfig calls. Forcing colorspaces (via the --colormatrix options and properties) is handled differently too: if it's changed, completely reinit the video chain. This is slower and requires a precise seek to the same position to perform an update, but it's simpler and less bug-prone. Considering switching the colorspace at runtime by user-interaction is a rather obscure feature, this is a good change. The colorspace VFCTRLs and VOCTRLs are still kept. The VOs rely on it, and would have to be changed to get rid of them. We'll do that later, and convert them incrementally instead of in one go. Note that controlling the output range now always works on VO level. Basically, this means you can't get vf_scale to output full-range YUV for whatever reason. If that is really wanted, it should be a vf_scale option. the previous behavior didn't make too much sense anyway. This commit fixes a few bugs (such as playing RGB video and converting that to YUV with vf_scale - a recent commit broke this and forced the VO to display YUV as RGB if possible), and might introduce some new ones.
* wayland: early aspect calculation in vo_configAlexander Preisinger2013-07-163-7/+27
| | | | | | | | | | | | Calculate the aspect ratio in vo_config, when we get the window size and in the inside the resize function we calculate the aspect ratio of the output in order to determine if we have to change the height or the width of the video. If the ratio of the output is bigger than the ratio of the video then we have to set the width accordingly and if the ratio is smaller we change the size. But only if no resize edges are passed, because this indicates that we want to change the windows state instead of just a simple resize and the video should not grow bigger than the requested size.
* wayland: use default fullscreen methodAlexander Preisinger2013-07-161-1/+1
| | | | | I misunderstood how the different methods work and if we set the size accordingly to the wayland configure event then METHOD_DEFAULT is what we want.
* w32_common: don't use aspdat.asp for aspectwm42013-07-161-1/+2
| | | | | | | | aspdat.asp is a problem, because it's updated when the VO calls vo_get_src_dst_rects(). Nothing guarantees that the value has been updated when the w32 code accesses it. Instead, use the aspect vo_w32_config() was called with.
* Fix build on Libav stable (dammit)wm42013-07-151-0/+8
| | | | | | | The previous commit fixed Libav git, but it was still broken on Libav 9.8. Also, while we're at it, add a note to lavc_dr1.c and its status.
* sd_add: add terrible hack for (xy-)vsfilter compatibilitywm42013-07-152-0/+9
| | | | | | Much has been said about this topic, we don't need to say even more. See additions to options.rst.
* vd: add VDCTRL_GET_PARAMSwm42013-07-152-0/+4
| | | | | | This is probably going to be unused, but might help with debugging and such. It returns the image parameters as determined by the video decoder.
* video: unify colorspace setupwm42013-07-153-21/+36
| | | | | | | | | | Guess the colorspace directly in mpcodecs_reconfig_vo(), instead of in set_video_colorspace(). The difference is that the latter function just makes the video filter chain (and VOs) force the detected colorspace, and then throws it away, while the former is a bit more general and central. Not really a big difference and it doesn't matter much in practice, but it guarantees that there is no internal disagreement about the colorspace.
* vf: add vf_control wrapperwm42013-07-153-6/+12
| | | | | Slightly cleaner, although rather redundant. But still, why wasn't this added 10 years ago?
* dec_video: add vd_control wrapperwm42013-07-152-7/+12
| | | | Slightly cleaner.
* mp_image: explicitly forbid using RGB colorspace with YUV formatswm42013-07-151-0/+9
| | | | This probably has more potential for breakage than it would be of use.
* mp_image: refactor colorspace guessing/fallbackwm42013-07-152-9/+46
| | | | This actually handles XYZ too.
* Merge branch 'remove_old_demuxers'wm42013-07-144-9/+3
|\ | | | | | | | | | | | | | | The merged branch doesn't actually just remove old demuxers, but also includes a branch of cleanups and some refactoring. Conflicts: stream/stream.c
| * Cleanup some include statementswm42013-07-122-4/+1
| |
| * core: change open_stream and demux_open signaturewm42013-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | This removes the dependency on DEMUXER_TYPE_* and the file_format parameter from the stream open functions. Remove some of the playlist handling code. It looks like this was needed only for loading linked mov files with demux_mov (which was removed long ago). Delete a minor bit of dead network-related code from stream.c as well.
| * Merge branch 'master' into remove_old_demuxerswm42013-07-082-14/+17
| |\ | | | | | | | | | | | | | | | Conflicts: DOCS/man/en/changes.rst DOCS/man/en/options.rst
| * | Remove old demuxerswm42013-07-071-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delete demux_avi, demux_asf, demux_mpg, demux_ts. libavformat does better than them (except in rare corner cases), and the demuxers have a bad influence on the rest of the code. Often they don't output proper packets, and require additional audio and video parsing. Most work only in --no-correct-pts mode. Remove them to facilitate further cleanups.
* | | build: change vf_dlopen testwm42013-07-121-1/+1
| | | | | | | | | | | | Didn't work on Windows. Apparently, WIN32 is not set in the Makefile.
* | | cocoa_common: change video size when changing screen DPIStefano Pigozzi2013-07-101-0/+8
| | | | | | | | | | | | | | | This improves the situation when moving a window from screens with different DPIs.
* | | configure: add libdl detection to ladspa, vf_dlopenRudolf Polzer2013-07-091-0/+2
| |/ |/|
* | Merge remote-tracking branch 'origin/low_quality_intel_crap'Martin Herkt2013-07-082-14/+17
|\ \ | |/ |/| | | | | Conflicts: video/out/gl_video_shaders.glsl
| * Merge branch 'master' into low_quality_intel_crapwm42013-04-3042-3417/+4238
| |\ | | | | | | | | | | | | | | | Conflicts: video/out/gl_video_shaders.glsl video/out/vo_opengl.c
| * | vo_opengl: avoid texture arrays for compatibility with Intel low quality crapwm42013-03-052-10/+12
| | | | | | | | |