summaryrefslogtreecommitdiffstats
path: root/video
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a0b43a1 changed textures to an array, because additional per-texture information was needed and managing this as array is more elegant. This broke playback on Windows with Intel drivers (window shows green video, even though subtitles/OSD work correctly). So change it back to make it work again. Affected driver: Intel(R) HD Graphics 3000 9.17.10.2932
* | | dither: don't use long doublewm42013-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes compilation with broken libcs, like on Cygwin. C99 absolutely requires long double and associated functions like expl, even if long double is double. But newlib (used by cygwin) omits declaration for these if long double is equivalent to double. The extra precision is not needed here, so remove it to make life easier for the single person using mpv with cygwin.
* | | core: remove mp_fifo leftoverswm42013-07-043-3/+0
| | |
* | | wayland: remove mp_fifo headerAlexander Preisinger2013-07-031-1/+0
| | |
* | | wayland: fix typoAlexander Preisinger2013-07-031-1/+1
| | |
* | | wayland: remove unused membersAlexander Preisinger2013-07-031-2/+0
| | |
* | | wayland: remove mp_fifoAlexander Preisinger2013-07-021-7/+7
| | |
* | | wayland: implement MOUSE_LEAVEAlexander Preisinger2013-07-021-0/+2
| | |
* | | core: cleanup more mp_fifo leftoverswm42013-07-025-34/+33
| | | | | | | | | | | | Now only the OSX and Wayland parts are using this.
* | | core: remove mp_fifo indirectionwm42013-07-022-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some reason mp_fifo specifically handled double clicks, and other than that was a pointless wrapper around input.c functionality. Move the double click handling into input.c, and get rid of mp_fifo. Add some compatibility wrappers, because so much VO code uses these functions. Where struct mp_fifo is still used it's just a casted struct input_ctx.
* | | input: require VOs to send key up events, redo input key lookupwm42013-07-026-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Making key up events implicit was sort-of a nice idea, but it's too tricky and unreliable and makes the key lookup code (interpret_keys()) hard to reason about. See e.g. previous commit for subtle bugs and issues this caused. Make key-up events explicit instead. Add key up events to all VOs. Any time MP_KEY_STATE_DOWN is used, the matching key up event must use MP_KEY_STATE_UP. Rewrite the key lookup code. It should be simpler and more robust now. (Even though the LOC increases, because the new code is less "compact".)
* | | w32_common: prevent display power managementJames Ross-Gowan2013-06-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Handling SC_MONITORPOWER doesn't seem to prevent the screen from dimming. The recommended way to do this in Windows XP and Vista is to call SetThreadExecutionState with ES_DISPLAY_REQUIRED. Windows 7 also has the PowerCreateRequest/PowerSetRequest/PowerClearRequest APIs but they're probably too complicated for this task.
* | | w32_common: prevent that window dragging and mouse input interferewm42013-06-291-1/+1
| | |
* | | w32_common: refactor mouse button code, handle mouse up eventswm42013-06-291-31/+39
| | | | | | | | | | | | | | | Instead of sending a single event on click, send both down and up events.
* | | input: trigger mouse_leave key bindings if mouse leaves mouse areawm42013-06-291-2/