aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
Commit message (Collapse)AuthorAge
* video/out: remove options argument from preinit()Gravatar wm42013-07-22
| | | | | All VOs use proper option parsing now, and compatibility hacks are not needed.
* Remove subopt-helperGravatar wm42013-07-22
| | | | Finally not used by anything anymore. Farewell.
* vf_scale: actually respect param and param2 suboptionsGravatar wm42013-07-22
| | | | This was forgotten in commit b81f5e2.
* vo_opengl: some option changesGravatar wm42013-07-22
| | | | | | Doing "mpv --vo=opengl:lscale=help" now lists possible scalers and exits. The "backend" suboption behaves similar. Make the "stereo" suboption a choice, instead of using magic integer values.
* vo_direct3d: use new option APIGravatar wm42013-07-22
|
* vo_opengl_old: use new option APIGravatar wm42013-07-22
|
* options: move --colorkey option to vo_xvGravatar wm42013-07-22
|
* vo_xv: use new option APIGravatar wm42013-07-22
|
* vo_direct3d: fix warning on MinGWGravatar wm42013-07-22
| | | | | | Commit 6ab2eeb attempted to fix it on Cygwin, but now it broke on MinGW in turn. Don't think too hard about it and just remove the code. (vo.c already prints the video rectangle anyway.)
* options: hide encoding AO/VO in help outputGravatar wm42013-07-21
| | | | | 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 --voGravatar wm42013-07-21
| | | | | | | | | 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_structGravatar wm42013-07-21
| | | | | | | | | | | | | | | | | | 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 indirectionGravatar wm42013-07-21
|
* cocoa_common: fix regression in draggable state computationGravatar Stefano Pigozzi2013-07-21
| | | | Regression introduced in 8fb064de5. Prevented the OSC from working correctly.
* cocoa_common: fix styleGravatar Stefano Pigozzi2013-07-21
|
* cocoa_common: move tracking area setup to updateTrackingAreasGravatar Stefano Pigozzi2013-07-21
| | | | This makes the tracking area work when going in and out of fullscreen.
* x11: add key modifiers to mouse button eventsGravatar wm42013-07-21
|
* w32_common: show the cursor in the window borderGravatar James Ross-Gowan2013-07-21
| | | | | | | | | | | | | | | | | | 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 eventsGravatar Stefano Pigozzi2013-07-21
|
* Merge remote-tracking branch 'michaelforney/master'Gravatar Alexander Preisinger2013-07-20
|\
* | cocoa_common: make the fullscreen transition only when necessaryGravatar Stefano Pigozzi2013-07-20
| | | | | | | | | | This makes the cocoa backend follow more closely the new fullscreen semantics added in c4b08a9a.
* | cocoa_common: use a tracking area to handle mouse eventsGravatar Stefano Pigozzi2013-07-20
| | | | | | | | | | | | | | | | | | 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 commentGravatar Stefano Pigozzi2013-07-20
| | | | | | | | Surely it's copy pasta's fault.
* | cocoa_common: implement MP_MOUSE_LEAVE notificationsGravatar Stefano Pigozzi2013-07-20
| | | | | | | | | | 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 draggingGravatar Stefano Pigozzi2013-07-20
| | | | | | | | | | | | 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)Gravatar Diogo Franco (Kovensky)2013-07-20
| |
| * wayland: Fallback to any GL version if 3.0 is not supportedGravatar Michael Forney2013-07-19
|/ | | | This fixes playback on Wayland with older GPUs.
* wayland: use a unified struct for the stateGravatar Alexander Preisinger2013-07-18
| | | | | | | | | | 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.cGravatar Alexander Preisinger2013-07-18
| | | | | | 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 chaosGravatar wm42013-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 memberGravatar wm42013-07-18
| | | | | | 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 formatsGravatar wm42013-07-18
| | | | | | | | | | | | | | | 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 formatsGravatar wm42013-07-18
|
* img_format: add a mask for color classGravatar wm42013-07-18
| | | | | | | 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_flagsGravatar wm42013-07-18
| | | | No need to duplicate this on the call-site.
* sws_utils: don't recursively include libswscale headerGravatar wm42013-07-18
| | | | Add libswscale includes where they are actually needed instead.
* sws_utils: remove some old codeGravatar wm42013-07-18
|
* vo_x11: use new swscale wrapperGravatar wm42013-07-18
|
* mp_image: one utility function to set image parametersGravatar wm42013-07-18
|
* vf_scale: use new swscale wrapperGravatar wm42013-07-18
|
* vf: make sure less important image params are set before/after filtersGravatar wm42013-07-18
| | | | | | | | 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 codeGravatar wm42013-07-18
| | | | | | | | | | 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:0Gravatar wm42013-07-18
| | | | | | | | | 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 formatsGravatar wm42013-07-18
| | | | | | | | | 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 architecturesGravatar wm42013-07-18
| | | | | | 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: uncrustifyGravatar wm42013-07-18
|
* vo_x11: remove weird inactive codeGravatar wm42013-07-18
| | | | | | | | | | | | | | | | | | | | 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 handledGravatar wm42013-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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_configGravatar Alexander Preisinger2013-07-16
| | | | | | | | | | | | 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 methodGravatar Alexander Preisinger2013-07-16
| | | | | 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.