aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
Commit message (Collapse)AuthorAge
* vo_opengl_cb: initial screenshot supportGravatar wm42015-01-15
| | | | | | | | | | | Support for taking screenshots when doing hardware decoding needs to be added later. This takes the last image queued to the VO, which is logically the image the player thinks is on screen (so e.g. subtitles will match). forget_frames() does not clear this, because seeking does not remove the current image from the screen (until the next one is drawn).
* image_writer: check for conversion errorsGravatar wm42015-01-15
| | | | | This can happen when e.g. a VO returns a screenshot in an unsupported format.
* vf: make message less confusingGravatar wm42015-01-13
| | | | | Well, probably still not very good, but now at least accounts for the case the decoder or a filter outputs nonsense values.
* mp_image: reject invalid display aspect ratioGravatar wm42015-01-13
| | | | | | | | | | Having any of these set to 0 makes no sense. I think some code might still be using 0/0 aspect ratio to signal unset aspect ratio, but I didn't find it. If there is still code like this, it should be fixed instead. Fixes #1467.
* wayland: implement key modifiersGravatar wm42015-01-12
| | | | Includes shift, ctrl, alt, meta.
* wayland: don't compute absurd window sizeGravatar wm42015-01-12
| | | | | | | | | For some reason, schedule_resize() can be called with everything set to 0. The code couldn't handle wl->window.aspect set to 0, converting NaNs to integers. Just work this around. (I have no idea what I'm doing. This is probably a corner case caused by my broken-ish wayland setup.)
* x11: explicitly query map status when waiting for map eventGravatar wm42015-01-12
| | | | | | | | For some reason, mpv sometimes does not get a MapNotify event with GtkSocket embedding. This happens maybe 1 out of 10 times. I'm not sure how this can happen - it certainly shouldn't. Since I was not able to find the cause, and causes an apparent "deadlock", here's a lazy hack to fix the misbehavior.
* x11: support XEmbedGravatar wm42015-01-12
| | | | | | | | | | | | Seems to work with GtkSocket and passing the gtk_socket_get_id() value via "wid" option to mpv. One caveat is that using <tab> to move input focus from mpv to GTK does not work. It seems we would have to interpret <tab> ourselves in this case. I'm not sure if we really should do this - it would probably require emulating some other typical conventions too. I'm not sure if an embedder could do something about this on the toolkit level, but in theory it would be possible, so leave it as is for now.
* vo: don't synchronize when seekingGravatar wm42015-01-12
| | | | | | | | | Don't use vo_control() for sending VOCTRL_RESET when starting a seek. This means vo_seek_reset() won't wait until the VO actually processed VOCTRL_RESET. It happens asynchronously instead. The impact of this change should be minimal, unless the VO is somehow too busy (like blocking on vsync).
* command: change properties added in previous commitGravatar wm42015-01-10
| | | | | | | | | | | | | Make their meaning more exact, and don't pretend that there's a reasonable definition for "bits-per-pixel". Also make unset fields unavailable. average_depth still might be inconsistent: for example, 10 bit 4:2:0 is identified as 24 bits, but RGB 4:4:4 as 12 bits. So YUV formats seemingly drop the per-component padding, while RGB formats do not. Internally it's consistent though: 10 bit YUV components are read as 16 bit, and the padding must be 0 (it's basically like an odd fixed- point representation, rather than a bitfield).
* video: Add sigmoidal upscaling to avoid ringing artifactsGravatar Niklas Haas2015-01-09
| | | | | | | | | This avoids issues when upscaling directly in linear light, and is the recommended way to upscale images according to imagemagick. The default slope of 6.5 offers a reasonable compromise between ringing artifacts eliminated and ringing artifacts introduced by sigmoid-upscaling. Same goes for the default center of 0.75.
* vo_opengl_cb: make mpv_opengl_cb_render() return left framesGravatar xylosper2015-01-08
| | | | | | Instead of error code which was not helpful because it's always 0, mpv_opengl_cb_render() returns the number of left frames in the frame queue now.
* vo_opengl_cb: use vo's drop_count instead of internal counterGravatar xylosper2015-01-08
| | | | | This commit makes it possible to query dropped frames by opengl-cb through vo-drop-frame-count property.
* vo: add functions to increment drop_countGravatar xylosper2015-01-08
| | | | | Add two functions which increment drop_count thread-safely. This is for the commit followed.
* vo_opengl_cb: introduce frame queueGravatar xylosper2015-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation of opengl-cb kept only latest flipped frame. This can cause massive frame drops because rendering is done asynchronously and only the latest frame can be rendered. This commit introduces frame queue and releated options to opengl-cb. frame-queue-size: the maximum size of frame queue (1-100, default: 1) frame-drop-mode: behavior when frame queue is full (pop, clear, default: pop) The frame queue holds delayed frames and drops frames if the frame queue is overflowed with next method: 'pop' mode: drops all the oldest frames overflown. 'clear' mode: drops all frames in queue and clear it. With default options(frame-queue-size=1:frame-drop-mode=pop), opengl-cb behaves in the same way as previous implementation effectively. For frame-queue-size > 1, opengl-cb tries to calls update() without waiting next flip_page() in order to consume queued frames. Signed-off-by: wm4 <wm4@nowhere>
* win32: minor simplificationGravatar wm42015-01-08
| | | | The events parameter is not needed here and won't ever be.
* vo_opengl: don't crash win32 backend with NULL eventsGravatar wm42015-01-08
| | | | | | | | | vo_opengl was crashing since f811348d because it passed NULL for the events parameter to vo_control. Normally the parameter should not be NULL, so add a hack to account for this. In particular, we should handle the events that are returned. For the call in preinit() we skip this, but it most likely has no meaning anyway, because in this stage no window is visible yet.
* vo_opengl_cb: fix a typoGravatar wm42015-01-08
|
* vo_opengl_cb: allow changing debug option at runtimeGravatar wm42015-01-08
| | | | | | | This was always supposed to work. Just add the option declaration. Normally I'm not a fan of duplicating such things, but in this case it's (still) harmless.
* vo_opengl_cb: fix flipped renderingGravatar wm42015-01-08
| | | | Oops.
* vo_opengl: gl_lcms: implement change detection for memory profilesGravatar wm42015-01-08
| | | | | | | | | | This affects OSX, where memory profiles are updated e.g. on fullscreen switches. The profile most likely doesn't change, but the LUT will be generated and reloaded anyway. Somewhat of a regression from commit f811348. Fixes #1439.
* vo_opengl: gl_lcms: fix potential dangling pointer issueGravatar wm42015-01-08
| | | | | | | If icc-path is set, but the thing is replaced with a memory profile, then p->icc_path would point to deallocated memory. Also, the NULL checks are unnecessary.
* vo_direct3d: fix shader colormatrix generationGravatar wm42015-01-07
| | | | It was accidentally broken in d42d60bc1.
* win32: request UTF-16 API variants, Vista+ APIs, and COM C macrosGravatar wm42015-01-07
| | | | | Put the Vista+ (_WIN32_WINNT) and the COM C (COBJMACROS) defines into the build system, instead of defining them over and over in the code.
* x11: always use glXGetProcAddressARB()Gravatar wm42015-01-07
| | | | | | | | | | glXGetProcAddress() is outdated, and as far as I know doesn't give all the guarantees the "new" ARB function gives. Probably doesn't matter too much, because until now it always appeared to work. On the other hand, since this function is (bogusly) used only on the gl3 code path, it could have happened that users hit this, and just reverted to vo_opengl_old instead.
* gl_video.c: invalidate image_params in uninit_video()Gravatar xylosper2015-01-07
| | | | | | | | | | | | | When the given mp_image_params does not match with that of gl_video, gl_video_config() always calls uninit_video() but calls init_video() only if valid format is given. Since uninit_video() does not change image_params of gl_video, when the same params as the previous one is given to gl_video_config() after gl_video is unitialized with invalid format, gl_video_config() never calls init_video(). To prevent this, invalidate image_params of gl_video in uninit_video().
* vo_opengl: add support for in memory icc profilesGravatar Stefano Pigozzi2015-01-07
| | | | | | | | | | | Previously we just forced loading a profile from file, but that has poor integration for querying the OS / display server for an ICC profile, and generating profiles on the fly (which we might use in the future for creating preset 3dluts). Also changed the previous icc-profile-auto code to use this mechanism, and moved gl_lcms to be an opaque type with state instead of just providing pure functions.
* video: Remove some stale CMS code, minor cosmeticsGravatar Niklas Haas2015-01-07
| | | | This removes an old code path that was disabled in 016bb14.
* dxva2: copy mp_image attributes to sw_imgGravatar James Ross-Gowan2015-01-07
|
* mp_image: copy missing attributesGravatar James Ross-Gowan2015-01-07
| | | | | This adds a couple of missing fields to mp_image_copy_attributes so things like rotation metadata work.
* vo_opengl_cb: implement equalizer controlsGravatar wm42015-01-06
| | | | | | | | | | | | | | | | This makes vo_opengl_cb respond to controls like "gamma" and "brightness". The commit includes an awkward refactor for vo_opengl to make it easier for vo_opengl_cb. One problem is a logical race condition. The set of supported controls depends on the pixelformat, which in turn is set by reconfig(). But the actual reconfig() call (on the renderer) happens asynchronously on the renderer thread. At the time it happens, the player most likely already tried to set some controls for command line options (see init_vo() in video.c). So setting this command line options will fail most of the time, though it could randomly succeed. This can't be fixed directly, because the player can't wait on the renderer thread, because the renderer thread might already wait on the player.
* csputils: use M_PIGravatar wm42015-01-06
|
* csputils: replace float[3][4] with a structGravatar wm42015-01-06
| | | | | Not being able to use the 3x3 part of the matrix was annoying, so split it into a float[3][3] matrix and a separate float[3] constant vector.
* csputils: move image_params -> csp_params into a functionGravatar wm42015-01-06
| | | | | | | | | Although the line count increases, this is better for making sure everything is handled consistently for all users of the mp_csp_params stuff. This also makes sure mp_csp_params is always initialized with MP_CSP_PARAMS_DEFAULTS (for consistency).
* csputils: get rid of mp_csp_detailsGravatar wm42015-01-06
| | | | It used to be central, but now it's just unneeded.
* csputils: cosmeticsGravatar wm42015-01-06
| | | | Fix some coding style issues, remove doxygen formatting.
* vo_opengl_cb: don't resize when redrawingGravatar wm42015-01-06
|
* video/out/win_state.c: fix --monitoraspectGravatar Soeren D. Schulze2015-01-05
|
* vo_opengl_cb: support changing options at runtimeGravatar wm42015-01-05
| | | | | Like vo_opengl, but way messier, because the already messy config handling meets threading.
* vf_vapoursynth: autodetect CPU countGravatar wm42015-01-05
| | | | | | | | This adds an "auto" choice to the concurrent-frames suboption, and makes it the default. I'm not so sure about making this the default, though. It could lead to excessive buffering with large CPU counts. But we'll see.
* player: print used number of threads in verbose modeGravatar wm42015-01-05
| | | | Also, don't use av_log() for mpv output.
* vo_opengl: remove obsolete comment in shaderGravatar wm42015-01-04
|
* x11: make display-names property stricterGravatar wm42015-01-04
| | | | | | | | | | | | | | Returning the property before the window is mapped could lead to confusing behavior, and in particular strange differences between vo_vdpau and vo_opengl. (vo_opengl creates the window right at the start, while vdpau waits until the first reconfigure event.) It might even be possible that for vo_opengl random results were returned, because the hidden window can have different placement than the actual, final one on initial video reconfig. Fix this by returning the property only if the window is considered mapped. command.c handles this case specifically, and makes the property unavailable, instead of returning an empty list.
* video: batch query_format callsGravatar wm42015-01-03
| | | | | | | There are currently 568 pixel formats (actually fewer, but the namespace is this big), and for each format elaborate synchronization was done to call it synchronously on the VO. This is completely unnecessary, and we can do with just a single call.
* vf_vapoursynth: fix Lua backendGravatar wm42015-01-03
| | | | It couldn't handle the newly added float variable.
* vf_vapoursynth: pass through container FPS valueGravatar wm42015-01-03
| | | | | | | | This is basically a hack; but apparently a needed one, since many vapoursynth filters insist on having a FPS set. We need to apply the FPS override before creating the filters. Also change some terminal output related to the FPS value.
* x11: make display-names property observableGravatar wm42015-01-03
| | | | Reuse MP_EVENT_WIN_STATE for this.
* video: better pipelining with vf_vapoursynthGravatar wm42015-01-03
| | | | | | | | | | Most of this is explained in the code comments. This change should improve performance with vapoursynth, especially if concurrent requests are used. This should change nothing if vf_vapoursynth is not in the filter chain, since non-threaded filters obviously can not asynchronously finish filtering of frames.
* cocoa: fix build on 10.9Gravatar Stefano Pigozzi2015-01-02
| | | | Use -isInFullScreenMode instead of the property introduced with the 10.10 SDK.
* cocoa: fix NSMapGet errorGravatar Stefano Pigozzi2015-01-02
| | | | regression from 64b6b2ea45