summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-04-25 18:28:17 +0900
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-04-25 18:28:17 +0900
commit5f1d6b6e5ae515abfb77c78c44d21ee21beb0fc3 (patch)
tree6b757d37d296709dfd5955ef9d4d41426cd47da6
parentd64ff3aa51b49451348383a6ff6de7697a52dc62 (diff)
parent983d24e3b9ce9c9c7755279138c14170e85fbf37 (diff)
downloadmpv-5f1d6b6e5ae515abfb77c78c44d21ee21beb0fc3.tar.bz2
mpv-5f1d6b6e5ae515abfb77c78c44d21ee21beb0fc3.tar.xz
Merge branch 'master' into release/0.9
* master: (87 commits) manpage: move --autosync description player: add --window-scale option player: flush decoder even if cover art is decoded player: don't show A/V desync message in non-sense situations w32_common: add more rounded-down frame rates w32_common: use the current monitor's refresh rate dxva2: fix broken build with gcc 5.1 terminal: printf() is not signal-safe man: fix PDF build DOCS/mplayer-changes: Eleborate on joystick input osc: add nil check for element.eventresponder mp_image: remove some unused interlacing flags vf_vapoursynth: update _FieldBased semantics options: remove unneeded hack from command line parser manpage: document ff-index sub-property demux_mkv: limit timestamp fixing to 1ms max demux_mkv: attempt to fix rounded timestamps demux_mkv: move global options to the demuxer demux_mkv: better seeking after video end lua: add utils.format_json() function ...
-rw-r--r--DOCS/client-api-changes.rst1
-rw-r--r--DOCS/contribute.md3
-rw-r--r--DOCS/man/af.rst31
-rw-r--r--DOCS/man/ao.rst6
-rw-r--r--DOCS/man/input.rst57
-rw-r--r--DOCS/man/lua.rst8
-rw-r--r--DOCS/man/mpv.rst37
-rw-r--r--DOCS/man/options.rst61
-rw-r--r--DOCS/man/vf.rst6
-rw-r--r--DOCS/man/vo.rst20
-rw-r--r--DOCS/mplayer-changes.rst2
-rw-r--r--TOOLS/lua/autoload.lua41
-rw-r--r--TOOLS/osxbundle/mpv.app/Contents/Resources/mpv.conf3
-rwxr-xr-xTOOLS/umpv2
-rw-r--r--audio/decode/ad_lavc.c3
-rw-r--r--audio/filter/af_lavrresample.c16
-rw-r--r--audio/out/ao_alsa.c5
-rw-r--r--common/msg.c11
-rw-r--r--common/msg_control.h1
-rw-r--r--demux/demux.c11
-rw-r--r--demux/demux.h1
-rw-r--r--demux/demux_lavf.c9
-rw-r--r--demux/demux_mkv.c87
-rw-r--r--demux/demux_playlist.c54
-rw-r--r--demux/demux_raw.c1
-rw-r--r--demux/stheader.h1
-rw-r--r--etc/input.conf1
-rw-r--r--input/cmd_list.c5
-rw-r--r--input/cmd_list.h1
-rw-r--r--libmpv/client.h29
-rwxr-xr-xold-configure1
-rw-r--r--old-makefile2
-rw-r--r--options/m_option.c18
-rw-r--r--options/options.c14
-rw-r--r--options/options.h5
-rw-r--r--options/parse_commandline.c5
-rw-r--r--options/parse_configfile.c5
-rw-r--r--osdep/subprocess-posix.c13
-rw-r--r--osdep/subprocess.c57
-rw-r--r--osdep/subprocess.h3
-rw-r--r--osdep/terminal-unix.c3
-rw-r--r--player/client.c15
-rw-r--r--player/command.c184
-rw-r--r--player/command.h3
-rw-r--r--player/configfiles.c14
-rw-r--r--player/core.h2
-rw-r--r--player/discnav.c23
-rw-r--r--player/lua.c21
-rw-r--r--player/lua/osc.lua12
-rw-r--r--player/playloop.c4
-rw-r--r--player/screenshot.c22
-rw-r--r--player/screenshot.h3
-rw-r--r--player/video.c30
-rw-r--r--stream/cache.c41
-rw-r--r--stream/discnav.h1
-rw-r--r--stream/stream.h1
-rw-r--r--stream/stream_bluray.c8
-rw-r--r--stream/stream_dvdnav.c9
-rw-r--r--stream/stream_file.c27
-rw-r--r--video/decode/dec_video.c11
-rw-r--r--video/decode/dec_video.h1
-rw-r--r--video/decode/dxva2.c5
-rw-r--r--video/decode/vd_lavc.c4
-rw-r--r--video/filter/vf.c5
-rw-r--r--video/filter/vf.h1
-rw-r--r--video/filter/vf_crop.c7
-rw-r--r--video/filter/vf_expand.c13
-rw-r--r--video/filter/vf_mirror.c89
-rw-r--r--video/filter/vf_screenshot.c74
-rw-r--r--video/filter/vf_vapoursynth.c14
-rw-r--r--video/filter/vf_vdpaupp.c4
-rw-r--r--video/image_writer.c72
-rw-r--r--video/image_writer.h10
-rw-r--r--video/mp_image.c3
-rw-r--r--video/mp_image.h3
-rw-r--r--video/out/drm_common.c149
-rw-r--r--video/out/drm_common.h36
-rw-r--r--video/out/vo.c50
-rw-r--r--video/out/vo_drm.c641
-rw-r--r--video/out/vo_opengl.c3
-rw-r--r--video/out/vo_rpi.c8
-rw-r--r--video/out/w32_common.c26
-rw-r--r--video/out/win_state.c2
-rw-r--r--video/out/x11_common.c67
-rw-r--r--video/out/x11_common.h6
-rw-r--r--wscript10
-rw-r--r--wscript_build.py6
87 files changed, 1742 insertions, 638 deletions
diff --git a/DOCS/client-api-changes.rst b/DOCS/client-api-changes.rst
index 62640889b6..9b3f21c7c8 100644
--- a/DOCS/client-api-changes.rst
+++ b/DOCS/client-api-changes.rst
@@ -25,6 +25,7 @@ API changes
::
+ 1.17 - add MPV_FORMAT_BYTE_ARRAY
--- mpv 0.9.0 will be released ---
1.16 - add mpv_opengl_cb_report_flip()
- introduce mpv_opengl_cb_draw() and deprecate mpv_opengl_cb_render()
diff --git a/DOCS/contribute.md b/DOCS/contribute.md
index 224c52494c..11b5e33d50 100644
--- a/DOCS/contribute.md
+++ b/DOCS/contribute.md
@@ -14,6 +14,9 @@ Sending patches
``git format-patch``. diffs posted as pastebins (especially if the http link
returns HTML) just cause extra work for everyone, because they lack commit
message and authorship information.
+- When creating pull requests, be sure to test your changes. If you didn't, please
+ say so in the pull request message.
+
- Write informative commit messages. Use present tense to describe the
situation with the patch applied, and past tense for the situation before
the change.
diff --git a/DOCS/man/af.rst b/DOCS/man/af.rst
index 1ae3c092df..96e50686ae 100644
--- a/DOCS/man/af.rst
+++ b/DOCS/man/af.rst
@@ -225,14 +225,21 @@ Available filters are:
automatically up- and downmix standard channel layouts.
``format=format:srate:channels:out-format:out-srate:out-channels``
- Force a specific audio format/configuration without actually changing the
- audio data. Keep in mind that the filter system might auto-insert actual
- conversion filters before or after this filter if needed.
+ Does not do any format conversion itself. Rather, it may cause the
+ filter system to insert necessary conversion filters before or after this
+ filter if needed. It is primarily useful for controlling the audio format
+ going into other filters. To specify the format for audio output, see
+ ``--audio-format``, ``--audio-samplerate``, and ``--audio-channels``. This
+ filter is able to force a particular format, whereas ``--audio-*``
+ may be overridden by the ao based on output compatibility.
All parameters are optional. The first 3 parameters restrict what the filter
- accepts as input. The ``out-`` parameters change the audio format, without
- actually doing a conversion. The data will be 'reinterpreted' by the
- filters or audio outputs following this filter.
+ accepts as input. They will therefore cause conversion filters to be
+ inserted before this one. The ``out-`` parameters tell the filters or audio
+ outputs following this filter how to interpret the data without actually
+ doing a conversion. Setting these will probably just break things unless you
+ really know you want this for some reason, such as testing or dealing with
+ broken media.
``<format>``
Force conversion to this format. Use ``--af=format=format=help`` to get
@@ -252,14 +259,9 @@ Available filters are:
``<out-channels>``
- See also ``--audio-format``, ``--audio-samplerate``, and
- ``--audio-channels`` for related options. Keep in mind that
- ``--audio-channels`` does not actually force the number of
- channels in most cases, while this filter can do this.
-
- *NOTE*: this filter used to be named ``force``. Also, unlike the old
- ``format`` filter, this does not do any actual conversion anymore.
- Conversion is done by other, automatically inserted filters.
+ *NOTE*: this filter used to be named ``force``. The old ``format`` filter
+ used to do conversion itself, unlike this one which lets the filter system
+ handle the conversion.
``convert24``
Filter for internal use only. Converts between 24-bit and 32-bit sample
@@ -629,4 +631,3 @@ Available filters are:
``o=<string>``
AVOptions.
-
diff --git a/DOCS/man/ao.rst b/DOCS/man/ao.rst
index 5ca960c4ea..534f62588c 100644
--- a/DOCS/man/ao.rst
+++ b/DOCS/man/ao.rst
@@ -107,8 +107,10 @@ Available audio output drivers are:
``--audio-device`` to select the device (use ``--audio-device=help``
to get a list of all devices and their mpv name).
- You can also try
- `Using the upmix plugin <https://github.com/mpv-player/mpv/wiki/ALSA:-Surround-Sound-and-Upmixing>`_.
+ You can also try `using the upmix plugin <http://git.io/vfuAy>`_.
+ This setup enables multichannel audio on the ``default`` device
+ with automatic upmixing with shared access, so playing stereo
+ and multichannel audio at the same time will work as expected.
``oss``
OSS audio output driver
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index a3bad3706b..633f6a8308 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -187,8 +187,7 @@ List of Input Commands
The second argument is like the first argument to ``screenshot``.
- This command tries to never overwrite files. If the file already exists,
- it fails.
+ If the file already exists, it's overwritten.
Like all input command parameters, the filename is subject to property
expansion as described in `Property Expansion`_.
@@ -632,6 +631,15 @@ Input Commands that are Possibly Subject to Change
unseekable streams that are going out of sync.
This command might be changed or removed in the future.
+``screenshot_raw [subtitles|video|window]``
+ Return a screenshot in memory. This can be used only through the client
+ API. The MPV_FORMAT_NODE_MAP returned by this command has the ``w``, ``h``,
+ ``stride`` fields set to obvious contents. A ``format`` field is set to
+ ``bgr0`` by default. This format is organized as ``B8G8R8X8`` (where ``B``
+ is the LSB). The contents of the padding ``X`` is undefined. The ``data``
+ field is of type MPV_FORMAT_BYTE_ARRAY with the actual image data. The image
+ is freed as soon as the result node is freed.
+
Undocumented commands: ``tv_last_channel`` (TV/DVB only),
``get_property`` (deprecated), ``ao_reload`` (experimental/internal).
@@ -920,6 +928,10 @@ Property list
a BD or DVD. Use the ``discnav menu`` command to actually enter or leave
menu mode.
+``disc-mouse-on-button``
+ Return ``yes`` when the mouse cursor is located on a button, or ``no``
+ when cursor is outside of any button for disc navigation.
+
``chapters``
Number of chapters.
@@ -1078,6 +1090,11 @@ Property list
guess is very unreliable, and often the property will not be available
at all, even if data is buffered.
+``demuxer-cache-time``
+ Approximate time of video buffered in the demuxer, in seconds. Same as
+ ``demuxer-cache-duration`` but returns the last timestamp of bufferred
+ data in demuxer.
+
``demuxer-cache-idle``
Returns ``yes`` if the demuxer is idle, which means the demuxer cache is
filled to the requested amount, and is currently not reading more data.
@@ -1123,9 +1140,6 @@ Property list
``audio-codec``
Audio codec selected for decoding.
-``audio-bitrate``
- Audio bitrate. This is probably a very bad guess in most cases.
-
``audio-samplerate``
Audio samplerate.
@@ -1222,9 +1236,6 @@ Property list
``video-codec``
Video codec selected for decoding.
-``video-bitrate``
- Video bitrate (a bad guess).
-
``width``, ``height``
Video size. This uses the size of the video as decoded, or if no video
frame has been decoded yet, the (possibly incorrect) container indicated
@@ -1513,6 +1524,13 @@ Property list
``track-list/N/selected``
``yes`` if the track is currently decoded, ``no`` otherwise.
+ ``track-list/N/ff-index``
+ The stream index as usually used by the FFmpeg utilities. Note that
+ this can be potentially wrong if a demuxer other than libavformat
+ (``--demuxer=lavf``) is used. For mkv files, the index will usually
+ match even if the default (builtin) demuxer is used, but there is
+ no hard guarantee.
+
When querying the property with the client API using ``MPV_FORMAT_NODE``,
or with Lua ``mp.get_property_native``, this will return a mpv_node with
the following contents:
@@ -1634,7 +1652,7 @@ Property list
whether the video window is visible. If the ``--force-window`` option is
used, this is usually always returns ``yes``.
-``packet-video-bitrate``, ``packet-audio-bitrate``, ``packet-sub-bitrate``
+``video-bitrate``, ``audio-bitrate``, ``sub-bitrate``
Bitrate values calculated on the packet level. This works by dividing the
bit size of all packets between two keyframes by their presentation
timestamp distance. (This uses the timestamps are stored in the file, so
@@ -1643,8 +1661,29 @@ Property list
bitrate. To make the property more UI friendly, updates to these properties
are throttled in a certain way.
+ The unit is bits per second. OSD formatting turns these values in kilobits
+ (or megabits, if appropriate), which can be prevented by using the
+ raw property value, e.g. with ``${=video-bitrate}``.
+
+ Note that the accuracy of these properties is influenced by a few factors.
+ If the underlying demuxer rewrites the packets on demuxing (done for some
+ file formats), the bitrate might be slightly off. If timestamps are bad
+ or jittery (like in Matroska), even constant bitrate streams might show
+ fluctuating bitrate.
+
How exactly these values are calculated might change in the future.
+ In earlier versions of mpv, these properties returned a static (but bad)
+ guess using a completely different method.
+
+``packet-video-bitrate``, ``packet-audio-bitrate``, ``packet-sub-bitrate``
+ Old and deprecated properties for ``video-bitrate``, ``audio-bitrate``,
+ ``sub-bitrate``. They behave exactly the same, but return a value in
+ kilobits. Also, they don't have any OSD formatting, though the same can be
+ achieved with e.g. ``${=video-bitrate}``.
+
+ These properties shouldn't be used anymore.
+
``audio-device-list``
Return the list of discovered audio devices. This is mostly for use with
the client API, and reflects what ``--audio-device=help`` with the command
diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst
index 4700b90cb2..ff70600a1d 100644
--- a/DOCS/man/lua.rst
+++ b/DOCS/man/lua.rst
@@ -639,6 +639,14 @@ strictly part of the guaranteed API.
trailing text is returned as 3rd return value. (The 3rd return value is
always there, but with ``trail`` set, no error is raised.)
+``utils.format_json(v)``
+ Format the given Lua table (or value) as a JSON string and return it. On
+ error, returns ``nil, error``. (Errors usually only happen on value types
+ incompatible with JSON.)
+
+ The argument value uses similar conventions as ``mp.set_property_native()``
+ to distinguish empty objects and arrays.
+
``utils.to_string(v)``
Turn the given value into a string. Formats tables and their contents. This
doesn't do anything special; it is only needed because Lua is terrible.
diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst
index ca1e87105e..751b2b2b59 100644
--- a/DOCS/man/mpv.rst
+++ b/DOCS/man/mpv.rst
@@ -276,14 +276,16 @@ Shells may actually strip some quotes from the string passed to the commandline,
so the example quotes the string twice, ensuring that mpv recieves the ``"``
quotes.
-The ``[...]`` from of quotes wraps everything between ``[`` and ``]``. It's
+The ``[...]`` form of quotes wraps everything between ``[`` and ``]``. It's
useful with shells that don't interpret these characters in the middle of
-an argument (like bash).
+an argument (like bash). These quotes are balanced (since mpv 0.9.0): the ``[``
+and ``]`` nest, and the quote terminates on the last ``]`` that has no matching
+``[`` within the string. (For example, ``[a[b]c]`` results in ``a[b]c``.)
-A special kind of string-escaping intended for use with external scripts and
-programs is started with ``%``.
+The fixed-length quoting syntax is intended for use with external
+scripts and programs.
-It has the following format::
+It is started with ``%`` and has the following format::
%n%string_of_length_n
@@ -319,7 +321,8 @@ console controls. (Which makes it suitable for playing data piped to stdin.)
For paths passed to suboptions, the situation is further complicated by the
need to escape special characters. To work this around, the path can be
-additionally wrapped in the ``%n%string_of_length_n`` syntax (see above).
+additionally wrapped in the fixed-length syntax, e.g. ``%n%string_of_length_n``
+(see above).
Some mpv options interpret paths starting with ``~``. Currently, the prefix
``~~/`` expands to the mpv configuration directory (usually ``~/.config/mpv/``).
@@ -397,10 +400,10 @@ 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 like spaces. A config entry can be quoted with ``"`` and ``'``,
-as well as with the ``%n%`` syntax mentioned before. This is like passing
-the exact contents of the quoted string as command line option. C-style escapes
-are currently _not_