aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* demux_cue: move cue parser to a separate fileGravatar wm42015-05-19
| | | | Preparation for the next commit.
* ad_spdif: use DTS-HD passthrough only if the audio is really DTS-HDGravatar wm42015-05-19
| | | | | | | | | | | | | | | | | | | | | | | Apparently some A/V receivers do not behave well if "normal" DTS is passed through using the high bitrate spdif format normally used for DTS-HD (other receivers are fine with it). Parse the first packet passed to ad_spdif by decoding it with libavcodec in order to get the profile. Ignore the --ad-spdif-dtshd if it's not DTS-HD. (If the codec profile changes midstream, the user is out of luck. But this is probably an insignificant corner case.) I thought about parsing the bitstream, but let's not. While it probably wouldn't be that much effort, we are trying to keep it down on codec details here - otherwise we could just do our own spdif framing instead of using libavformat's spdif pseudo-muxer. Another possibility, using the codec parameters signalled by libavformat, is disregarded. Our builtin Matroska decoder doesn't do this, and also we do not want on the demuxer having to decode some packets in order to retrieve codec params (as libavformat does). Fixes #1949.
* ad_spdif: set output format lazilyGravatar wm42015-05-19
| | | | | Preparation for the following commit, which looks at the packet data before deciding what to output.
* audio: avoid wasting CPU due to continuous wakeupGravatar wm42015-05-19
| | | | | | | | | Thsi code path happens during seeking. If video is still being decoded to get to the first video frame, audio has nothing to do, as it is synchronized against the first video frame. We only want to wake up if there's an actual state change. Fixes #1958.
* command: use consistent comment styleGravatar rrooij2015-05-19
| | | | Signed-off-by: wm4 <wm4@nowhere>
* input: add relative percentage seekGravatar rrooij2015-05-19
| | | | | | | | | | | Only absolute percentage seeking was permitted first. It is now also possible to seek by relative percentage. MPSEEK_FACTOR is used as seek_type. Fixes #1950. Signed-off-by: wm4 <wm4@nowhere>
* x11: never forcefully terminate xdg-screensaver processGravatar wm42015-05-18
| | | | | | It sometimes happens on exit, and it's probably a bad idea. If the process hangs on exit (possibly due to stupid hardcoded timeouts it's doing), mpv will also hang now, unfortunately.
* mpv.desktop: shorten polish nameGravatar Mateusz Łukasik2015-05-18
| | | | | | The Polish name was too long and contradicted. One word is enough. Signed-off-by: wm4 <wm4@nowhere>
* sub: add .sup file extension for subtitle autoloadingGravatar wm42015-05-18
|
* command: add playlist_shuffle commandGravatar wm42015-05-17
| | | | Fixes #965.
* input.conf: add CTRL+s key binding for window screenshotsGravatar wm42015-05-17
|
* manpage: improve osc helpGravatar Avi Halachmi (:avih)2015-05-16
| | | | Signed-off-by: wm4 <wm4@nowhere>
* DOCS/client_api_examples: Qt: force qmake to use pkg-config.Gravatar torque2015-05-16
|
* manpage: lua: clarify OSD differences between mp.command/mp.commandvGravatar wm42015-05-16
| | | | | | Conflicts: player/audio.c player/video.c
* x11: attempt to make initial fullscreening more reliableGravatar wm42015-05-15
| | | | | | | | | | | | | | It appears some WMs have a problem with out method of setting initial fullscreen mode. We assume that if the window's _NET_WM_STATE includes _NET_WM_STATE_FULLSCREEN before mapping the window, the WM will show it as fullscreen at mapped. EWMH doesn't say anything that this should work, although one could argue that it's implied. In any case, since it's not standard behavior without at least some doubt, it's probably a good idea to try the "old" method as well. Fortunately, it should be idempotent. See #1937, #1920.
* vf_vapoursynth: reject unaligned video sizesGravatar wm42015-05-15
| | | | Leads to some nice memory corruption otherwise.
* vo: remove suspicious lineGravatar wm42015-05-15
| | | | | pts can never be 0 or negative. If there is no frame, some code below catches this case by checking hasframe.
* Remove trailing whitespacesGravatar Michael Vetter2015-05-15
|
* video: add hevc to whitelist of hwdec codecsGravatar wm42015-05-14
| | | | | This means if --hwdec is used, and hardware decoding is supported for HEVC, it's actually used.
* dxva2: support HEVCGravatar wm42015-05-14
| | | | | | | | | | | | This is pretty much copy&pasted from Libav commit a7e0380497306d9723dec8440a4c52e8bf0263cf. Note that if FFmpeg was not compiled with HEVC DXVA2 support or your video drivers do not support HEVC, the player will not fallback and just fail decoding any video. This is because libavcodec appears not to return an error in this case. The situation is made worse by the fact that MSYS2 is on an ancient MinGW-w64 release, which does not have the required headers for HEVC DXVA2 support.
* vo_opengl: hardcode rquested GL version in backendsGravatar wm42015-05-14
| | | | | The requested version field didn't make much sense anymore, and was even partially ignored by some backends.
* x11: use new OpenGL backend APIGravatar wm42015-05-14
|
* vo_opengl: create new API for OpenGL VO backendsGravatar wm42015-05-14
| | | | | | | | | | An attempt to get rid of the weird mix of callbacks that take either struct vo or MPGLCopntext as parameter. This is not perfect, and the API will probably change a bit until all other code is ported to it. the main question is how to separate struct vo completely from the windowing code, which actually needs vo for very little. In the end, the legacy callbacks will be dropped.
* vo_opengl: change user options for requesting GLESGravatar wm42015-05-14
| | | | | | | | Instead of having separate backends, make use of GLES a flag. This reduces the number of backends and the resulting annoyances. Also, nobody cares about using GLES, so there's no backward compatibility either.
* vo_opengl: merge GL backend creation/initializationGravatar wm42015-05-13
| | | | | The final goal is to remove the nonsense separation between the 3 backend init/vo_init/GL context creation calls.
* vo_opengl: remove mpgl_lock callsGravatar wm42015-05-13
| | | | Awkward stuff not needed anymore.
* cocoa: redo synchronizationGravatar wm42015-05-13
| | | | | | | | | | | | | | | | | | | | | Before this change, Cocoa state was accessed from both the VO and the Cocoa main thread. This was probably not a good idea. There was some locking as well as implicit synchronization using the dispatch mechanism, but it wasn't watertight. Change this completely. Now Cocoa things are always accessed from the main thread only. The old mutex falls away, as well as the vo_cocoa_set_current_context() function, which implicitly used the lock to coordinate VO accesses. With the new code, the VO thread generally has to wait for the main thread, while the main thread never waits for the VO and rarely accesses it. Fortunately, this is rather straight forward, and most of this is achieved by making vo_cocoa_control() run on the main thread. The logic of the code does generally not change. Some aspects are trickier. Apparently we can't access the NSOpenGLContext from the VO thread, because this object is not thread- safe. We use some CGLContextObj functions instead, such as for making the context current and swapping the buffers.
* vo_opengl: remove some more Cocoa resize leftoversGravatar wm42015-05-13
|
* manpage: explain some property expansion restrictionsGravatar wm42015-05-13
|
* manpage: remove stray newlineGravatar wm42015-05-13
|
* vda: add support for nv12 image formatsGravatar Stefano Pigozzi2015-05-13
| | | | | | | | | The hardware always decodes to nv12 so using this image format causes less cpu usage than uyvy (which we are currently using, since Apple examples and other free software use that). The reduction in cpu usage can add up to quite a bit, especially for 4k or high fps video. This needs an accompaning commit in libavcodec.
* build: check for lua52Gravatar Christian Hesse2015-05-13
| | | | | | | Arch linux is about to update to lua 5.3.x, but lua 5.2.x will be provided by package lua52, which contains pkg-config file lua52.pc. Signed-off-by: wm4 <wm4@nowhere>
* vo: avoid burning CPU when pausedGravatar wm42015-05-13
| | | | | | Some code always calls vo_event(), even with event==0, which leads to immediate wakeup, which in turn causes the function to be called again. This would burn CPU, which was especially noticeable when paused.
* win32: add mappings for some special keysGravatar wm42015-05-12
| | | | Untested.
* ipc: avoid SIGPIPEGravatar wm42015-05-12
| | | | | | | | | Until now, we just blocked SIGPIPE globally. Fix it properly to get away from it. MSG_NOSIGNAL should be widely available and is part of the POSIX.1-2008 standard. But it's not available on OSX, because Apple is both evil and retarded. Thus we continue to ignore the problem on such shitty systems.
* cocoa: make live-resizing as fast as beforeGravatar wm42015-05-12
| | | | | | | | | | | Interrupt video timing. This means the Cocoa event loop does not have to up to 2 video frame durations until redrawing the frame finally has finished. We abuse the VO event flags for this. Eventually this should use wait_vo() or so in the video timing wait function, but for now the interaction this would require with the code of other VOs/backends would cause too much of a mess.
* cocoa: handle live-resizing differentlyGravatar wm42015-05-12
| | | | | | | | | | | | | | | | | | Instead of requiring a complicated mechanism to share the entire OpenGL and renderer state between VO and Cocoa thread just to do the redrawing during live-resize on the Cocoa thread, let the Cocoa thread wait on the VO thread. This wil allow some major simplifications and cleanups in the future. One problem with this is that it can enter a deadlock whenever the VO tries to sync with the Cocoa thread. To deal with this, the Cocoa thread waits with a timeout. This can probably be improved later, though in general this situation can always happen, unless the Cocoa thread waits in a reentrant way. Some other details aren't completely clean either. For example, pending_events should be accessed atomically. This will also be fixed later.
* vo: use pthread_cond_timedwait() for video timingGravatar wm42015-05-12
| | | | | | | | | | | | | | | | Will be used to make video waiting interruptible with Cocoa (see the following commit). One worry was that this could cause hangs if the system clock jumps backwards. Normally we don't support such behavior, because it's almost impossible to handle it reasonably. E.g. we would have to change the default clock type for condition variables, which in turn would require a custom function for creating condition variables, or so. If the OS even supports different clocks. But it turns out that this is no issue, because other events seem to wakeup the wait call anyway, and mpv internal absolute times use a monotonic clock.
* vo_opengl_cb: add support for interpolationGravatar wm42015-05-12
| | | | | | | | | | | | | | | | | This uses the OpenGL frame interpolation code, which before could be used by vo_opengl only. Some effort was made to make it behave like vo_opengl, for the better or the worse. As a consequence, there is a minor duplication of code and mechanism. Hopefully this can all be wiped as soon as the VO frame queue/timing mechanism is cleaned up. This also attempts to use mpv_opengl_cb_report_flip() (as called by the API user) to determine the vsync interval. This might need refinement as well. (In general, we simply expect the API user to work in vsync-blocking manner.)
* vo_opengl_cb: add a "block" framedrop mode and make it defaultGravatar wm42015-05-12
| | | | | | | | | (I have no idea why there are different modes.) Instead of risking to drop frames too early, give it some margin. Since there are situations this could deadlock, wait with a timeout. This can happen if e.g. the API user is refusing to render anything, or if uninitialization is happening.
* vo_opengl_cb: actually set requested optionsGravatar wm42015-05-12
| | | | Quite an oversight.
* vo: always call draw_image_timed() if availableGravatar wm42015-05-12
| | | | | | | Gives the VOs more flexibility. gl_video.c already ignores the timing info if no interpolation is active, so this requires no further changes.
* threads: use utility+POSIX functions instead of weird wrappersGravatar wm42015-05-11
| | | | | | | There is not much of a reason to have these wrappers around. Use POSIX standard functions directly, and use a separate utility function to take care of the timespec calculations. (Course POSIX for using this weird format for time values.)
* ao: make better use of atomicsGravatar wm42015-05-11
| | | | | The main reason for this was compatibility; but some associated problems have been solved in the previous commit.
* atomics: add atomic_fetch_and/atomic_fetch_orGravatar wm42015-05-11
| | | | | | | | | | As usual, we prefer plain C11 names and semantics, and have to emulate them if C11 atomics are not available. For the non-atomic fallback (which is just there to make code compile in situations the atomic property is not overly important), we require a gross hack to make the generic macros work without using compiler- specific extensions.
* cocoa: remove unused declarationGravatar wm42015-05-11
|
* cocoa: add missing break statements in switchGravatar wm42015-05-11
| | | | | The first one (for VOCTRL_GET_DISPLAY_FPS) could have led to undefined behavior if the FPS was unknown. The second is for general symmetry.
* cocoa: remove unused macroGravatar wm42015-05-11
|
* Always block SIGPIPE globallyGravatar wm42015-05-11
| | | | | | | | | | | | | | | OpenSSL and GnuTLS are still causing this problem (although FFmpeg could be blamed as well - but not really). In particular, it was happening to libmpv users and in cases the pseudo-gui profile is used. This was because all signal handling is in the terminal code, so if terminal is disabled, it won't be set. This was obviously a questionable shortcut. Avoid further problems by always blocking the signal. This is done even for libmpv, despite our policy of not messing with global state. Explicitly document this in the libmpv docs. It turns out that a version bump to 1.17 was forgotten for the addition of MPV_FORMAT_BYTE_ARRAY, so document that change as part of 1.16.
* TOOLS/stats-conv.py: add another event typeGravatar wm42015-05-11
|