summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Herkt <lachs0r@srsfckn.biz>2015-12-11 18:33:38 +0100
committerMartin Herkt <lachs0r@srsfckn.biz>2015-12-11 18:33:38 +0100
commit0607dcebff1bfd9e1be534a58916045c32284e8d (patch)
treeebadce7def2db57813a90f4768e5f6ef7770e353
parenta33a44cf4e549ac8db4d703aaf51eb9aca00b6dc (diff)
parent3d12312806e7d54e7bb6b4b2a5981999735f6233 (diff)
downloadmpv-0607dcebff1bfd9e1be534a58916045c32284e8d.tar.bz2
mpv-0607dcebff1bfd9e1be534a58916045c32284e8d.tar.xz
Merge branch 'master' into release/current
-rw-r--r--.gitignore1
-rw-r--r--Copyright3
-rw-r--r--DOCS/client_api_examples/qt_opengl/mainwindow.cpp3
-rw-r--r--DOCS/client_api_examples/qt_opengl/mpvwidget.cpp2
-rw-r--r--DOCS/interface-changes.rst10
-rw-r--r--DOCS/man/input.rst58
-rw-r--r--DOCS/man/mpv.rst34
-rw-r--r--DOCS/man/options.rst117
-rw-r--r--DOCS/man/vf.rst10
-rw-r--r--DOCS/man/vo.rst61
-rw-r--r--README.md18
-rwxr-xr-xTOOLS/old-configure7
-rw-r--r--TOOLS/old-makefile6
-rw-r--r--audio/filter/af_lavrresample.c37
-rw-r--r--audio/out/ao.c8
-rw-r--r--audio/out/ao_alsa.c16
-rw-r--r--audio/out/ao_openal.c95
-rw-r--r--audio/out/ao_wasapi.c7
-rwxr-xr-xaudio/out/ao_wasapi.h11
-rwxr-xr-xaudio/out/ao_wasapi_utils.c60
-rwxr-xr-xaudio/out/ao_wasapi_utils.h1
-rw-r--r--common/msg.c2
-rw-r--r--demux/demux.c28
-rw-r--r--demux/demux.h1
-rw-r--r--demux/demux_disc.c9
-rw-r--r--demux/demux_lavf.c4
-rw-r--r--demux/demux_libass.c111
-rw-r--r--demux/demux_mkv.c3
-rw-r--r--demux/demux_subreader.c837
-rw-r--r--etc/input.conf3
-rw-r--r--misc/charset_conv.c18
-rw-r--r--misc/charset_conv.h2
-rw-r--r--options/options.c18
-rw-r--r--options/options.h5
-rw-r--r--options/path.c8
-rw-r--r--osdep/terminal-win.c15
-rw-r--r--player/audio.c3
-rw-r--r--player/client.c2
-rw-r--r--player/command.c114
-rw-r--r--player/core.h35
-rw-r--r--player/loadfile.c67
-rw-r--r--player/misc.c49
-rw-r--r--player/osd.c49
-rw-r--r--player/playloop.c59
-rw-r--r--player/sub.c61
-rw-r--r--player/video.c441
-rw-r--r--stream/stream.c4
-rw-r--r--stream/stream_pvr.c1615
-rw-r--r--sub/ass_mp.c39
-rw-r--r--sub/ass_mp.h4
-rw-r--r--sub/dec_sub.c143
-rw-r--r--sub/dec_sub.h3
-rw-r--r--sub/draw_bmp.c13
-rw-r--r--sub/osd.c23
-rw-r--r--sub/osd.h12
-rw-r--r--sub/osd_libass.c137
-rw-r--r--sub/osd_state.h4
-rw-r--r--sub/sd.h10
-rw-r--r--sub/sd_ass.c222
-rw-r--r--sub/sd_lavc.c148
-rw-r--r--video/csputils.c71
-rw-r--r--video/csputils.h15
-rw-r--r--video/decode/dec_video.c4
-rw-r--r--video/decode/dxva2.c4
-rw-r--r--video/decode/vd.h1
-rw-r--r--video/decode/vd_lavc.c16
-rw-r--r--video/decode/videotoolbox.c4
-rw-r--r--video/img_format.c6
-rw-r--r--video/img_format.h2
-rw-r--r--video/out/cocoa_common.m29
-rw-r--r--video/out/drm_common.c2
-rw-r--r--video/out/filter_kernels.c7
-rw-r--r--video/out/opengl/angle.c208
-rw-r--r--video/out/opengl/common.c87
-rw-r--r--video/out/opengl/common.h30
-rw-r--r--video/out/opengl/dxinterop.c636
-rw-r--r--video/out/opengl/hwdec.c11
-rw-r--r--video/out/opengl/hwdec.h6
-rw-r--r--video/out/opengl/hwdec_osx.c28
-rw-r--r--video/out/opengl/nnedi3.c59
-rw-r--r--video/out/opengl/nnedi3.h3
-rw-r--r--video/out/opengl/superxbr.c12
-rw-r--r--video/out/opengl/utils.c47
-rw-r--r--video/out/opengl/video.c253
-rw-r--r--video/out/opengl/video.h2
-rw-r--r--video/out/opengl/video_shaders.c34
-rw-r--r--video/out/opengl/w32.c47
-rw-r--r--video/out/opengl/x11.c77
-rw-r--r--video/out/opengl/x11egl.c7
-rw-r--r--video/out/vo.c323
-rw-r--r--video/out/vo.h27
-rw-r--r--video/out/vo_direct3d.c2
-rw-r--r--video/out/vo_opengl.c14
-rw-r--r--video/out/vo_opengl_cb.c15
-rw-r--r--video/out/vo_rpi.c61
-rw-r--r--video/out/vo_sdl.c12
-rw-r--r--video/out/vo_vdpau.c2
-rw-r--r--video/out/vo_wayland.c8
-rw-r--r--video/out/w32_common.c109
-rw-r--r--video/out/win32/exclusive_hack.c97
-rw-r--r--video/out/win32/exclusive_hack.h26
-rw-r--r--video/out/x11_common.c19
-rw-r--r--video/out/x11_common.h1
-rw-r--r--video/vdpau_mixer.c2
-rw-r--r--wscript31
-rw-r--r--wscript_build.py10
106 files changed, 3308 insertions, 4045 deletions
diff --git a/.gitignore b/.gitignore
index 159e409d7d..c5ffe38485 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,7 @@
/tags
/TAGS
/video/out/x11_icon.inc
+/video/out/opengl/nnedi3_weights.inc
/demux/ebml_defs.c
/demux/ebml_types.h
/sub/osd_font.h
diff --git a/Copyright b/Copyright
index 51a1a16f90..0ab48a06d8 100644
--- a/Copyright
+++ b/Copyright
@@ -12,6 +12,9 @@ the code to LGPLv2.1+ at a later point without asking the contributor. (This
is a safeguard for making potential relicensing of the project to LGPLv2.1+
easier.) Using a more liberal license compatible to LGPLv2.1+ is also ok.
+Some GPLv3 or LGPLv3 code in mpv can be enabled by building with --enable-gpl3,
+and in this case, the resulting binaries must be distributed under GPLv3.
+
For information about authors and contributors, consult the git log, which
contains the complete SVN and CVS history as well.
diff --git a/DOCS/client_api_examples/qt_opengl/mainwindow.cpp b/DOCS/client_api_examples/qt_opengl/mainwindow.cpp
index 2e3cf210ee..3ecd0a196d 100644
--- a/DOCS/client_api_examples/qt_opengl/mainwindow.cpp
+++ b/DOCS/client_api_examples/qt_opengl/mainwindow.cpp
@@ -48,6 +48,5 @@ void MainWindow::pauseResume()
void MainWindow::setSliderRange(int duration)
{
- const int time0 = m_mpv->getProperty("time-start").toInt();
- m_slider->setRange(time0, time0+duration);
+ m_slider->setRange(0, duration);
}
diff --git a/DOCS/client_api_examples/qt_opengl/mpvwidget.cpp b/DOCS/client_api_examples/qt_opengl/mpvwidget.cpp
index 16b800995c..4d2cad6241 100644
--- a/DOCS/client_api_examples/qt_opengl/mpvwidget.cpp
+++ b/DOCS/client_api_examples/qt_opengl/mpvwidget.cpp
@@ -80,7 +80,7 @@ void MpvWidget::initializeGL()
void MpvWidget::paintGL()
{
- mpv_opengl_cb_draw(mpv_gl, QOpenGLContext::currentContext()->defaultFramebufferObject(), width(), -height());
+ mpv_opengl_cb_draw(mpv_gl, defaultFramebufferObject(), width(), -height());
}
void MpvWidget::swapped()
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index b81312f8e9..a7132797f3 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -19,6 +19,16 @@ Interface changes
::
+ --- mpv 0.14.0 ---
+ - vo_opengl interpolation now requires --video-sync=display-... to be set
+ - change some vo_opengl defaults (including changing tscale)
+ - add "vsync-ratio", "estimated-display-fps" properties
+ - add --rebase-start-time option
+ This is a breaking change to start time handling. Instead of making start
+ time handling an aspect of different options and properties (like
+ "time-pos" vs. "playback-time"), make it dependent on the new option. For
+ compatibility, the "time-start" property now always returns 0, so code
+ which attempted to handle rebasing manually will not break.
--- mpv 0.13.0 ---
- remove VO opengl-cb frame queue suboptions (no replacement)
--- mpv 0.12.0 ---
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index 108c7a0de2..c3e69b3731 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -329,9 +329,9 @@ List of Input Commands
This is similar to ``sub-step``, except that it seeks video and audio
instead of adjusting the subtitle delay.
- Like with ``sub-step``, this works with external text subtitles only. For
- embedded text subtitles (like with Matroska), this works only with subtitle
- events that have already been displayed.
+ For embedded subtitles (like with Matroska), this works only with subtitle
+ events that have already been displayed, or are within a short prefetch
+ range.
``osd [<level>]``
Toggle OSD level. If ``<level>`` is specified, set the OSD mode
@@ -860,7 +860,11 @@ Property list
quantities: fps and possibly rounded timestamps.)
``path``
- Full path of the currently played file.
+ Full path of the currently played file. Usually this is exactly the same
+ string you pass on the mpv command line or the ``loadfile`` command, even
+ if it's a relative path. If you expect an absolute path, you will have to
+ determine it yourself, for example by using the ``working-directory``
+ property.
``media-title``
If the currently played file has a ``title`` tag, use that.
@@ -921,6 +925,18 @@ Property list
(which can happen especially with bad source timestamps). For example,
using the ``display-desync`` mode should never change this value from 0.
+``vsync-ratio``
+ For how many vsyncs a frame is displayed on average. This is available if
+ display-sync is active only. For 30 FPS video on a 60 Hz screen, this will
+ be 2. This is the moving average of what actually has been scheduled, so
+ 24 FPS on 60 Hz will never remain exactly on 2.5, but jitter depending on
+ the last frame displayed.
+
+``vo-delayed-frame-count``
+ Estimated number of frames delayed due to external circumstances in
+ display-sync mode. Note that in general, mpv has to guess that this is
+ happening, and the guess can be inaccurate.
+
``percent-pos`` (RW)
Position in current file (0-100). The advantage over using this instead of
calculating it out of other properties is that it properly falls back to
@@ -931,8 +947,9 @@ Property list
Position in current file in seconds.
``time-start``
- Return the start time of the file. (Usually 0, but some kind of files,
- especially transport streams, can have a different start time.)
+ Deprecated. Always returns 0. Before mpv 0.14, this used to return the start
+ time of the file (could affect e.g. transport streams). See
+ ``--rebase-start-time`` option.
``time-remaining``
Remaining length of the file in seconds. Note that the file duration is not
@@ -942,9 +959,11 @@ Property list
``time-remaining`` scaled by the current ``speed``.
``playback-time`` (RW)
- The playback time, which is the time relative to playback start. (This can
- be different from the ``time-pos`` property if the file does not start at
- position ``0``, in which case ``time-pos`` is the source timestamp.)
+ Position in current file in seconds. Unlike ``time-pos``, the time is
+ clamped to the range of the file. (Inaccurate file durations etc. could
+ make it go out of range. Also helpful when the user attempts to seek
+ outside of the file, as the seek target time is considered the current
+ position during seeking.)
``chapter`` (RW)
Current chapter number. The number of the first chapter is 0.
@@ -1426,6 +1445,19 @@ Property list
Has the same sub-properties as ``video-params``.
+``video-frame-info``
+ Approximate information of the current frame. Note that if any of these
+ are used on OSD, the information might be off by a few frames due to OSD
+ redrawing and frame display being somewhat disconnected, and you might
+ have to pause and force a redraw.
+
+ Sub-properties:
+
+ ``video-frame-info/picture-type``
+ ``video-frame-info/interlaced``
+ ``video-frame-info/tff``
+ ``video-frame-info/repeat``
+
``fps``
Container FPS. This can easily contain bogus values. For videos that use
modern container formats or video codecs, this will often be incorrect.
@@ -1459,6 +1491,14 @@ Property list
available on all platforms. Note that any of the listed facts may change
any time without a warning.
+``estimated-display-fps``
+ Only available if display-sync mode (as selected by ``--video-sync``) is
+ active. Returns the actual rate at which display refreshes seem to occur,
+ measured by system time.
+
+``vsync-jitter``
+ Estimated deviation factor of the vsync duration.
+
``video-aspect`` (RW)
Video aspect, see ``--video-aspect``.
diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst
index b8bd266aa4..9527b8a3c9 100644
--- a/DOCS/man/mpv.rst
+++ b/DOCS/man/mpv.rst
@@ -128,7 +128,7 @@ x and z
Adjust subtitle delay by +/- 0.1 seconds.
l
- Set/clear A-B loop points. See ``ab_loop`` command for details.
+ Set/clear A-B loop points. See ``ab-loop`` command for details.
L
Toggle infinite looping.
@@ -192,23 +192,19 @@ corresponding adjustment, or the software equalizer (``--vf=eq``).)
7 and 8
Adjust saturation.
-(The following keys are valid only on OS X.)
-
-command + 0
+Alt+0 (and command+0 on OSX)
Resize video window to half its original size.
- (On other platforms, you can bind keys to change the ``window-scale``
- property.)
-command + 1
+Alt+1 (and command+1 on OSX)
Resize video window to its original size.
-command + 2
+Alt+2 (and command+2 on OSX)
Resize video window to double its original size.
-command + f
+command + f (OSX only)
Toggle fullscreen (see also ``--fs``).
-command + [ and command + ]
+command + [ and command + ] (OSX only)
Set video window alpha.
(The following keys are valid if you have a keyboard with multimedia keys.)
@@ -262,7 +258,7 @@ parser puts several options into a single string, and passes them to a
component at once, instead of using multiple options on the level of the
command line.
-The suboption parser can quote strings with ``"``, ``'``, and ``[...]``.
+The suboption parser can quote strings with ``"`` and ``[...]``.
Additionally, there is a special form of quoting with ``%n%`` described below.
For example, the ``opengl`` VO can take multiple options:
@@ -414,7 +410,7 @@ Escaping spaces and special characters
This is done like with command line options. The shell is not involved here,
but option values still need to be quoted as a whole if it contains certain
-characters