summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Copyright46
-rw-r--r--DOCS/man/en/changes.rst11
-rw-r--r--DOCS/man/en/mpv.rst7
-rw-r--r--DOCS/man/en/options.rst14
-rw-r--r--DOCS/man/en/osc.rst198
-rw-r--r--DOCS/man/en/vo.rst2
-rw-r--r--DOCS/tech-overview.txt6
-rw-r--r--LICENSE902
-rw-r--r--Makefile6
-rw-r--r--audio/mixer.c5
-rw-r--r--audio/mixer.h1
-rw-r--r--demux/codec_tags.c1
-rw-r--r--demux/demux.c6
-rw-r--r--demux/demux_lavf.c3
-rw-r--r--demux/demux_mkv.c1
-rw-r--r--demux/demux_raw.c4
-rw-r--r--demux/matroska.h2
-rw-r--r--etc/example.conf3
-rw-r--r--mpvcore/av_log.c41
-rw-r--r--mpvcore/av_log.h2
-rw-r--r--mpvcore/command.c31
-rw-r--r--mpvcore/lua/osc.lua110
-rw-r--r--mpvcore/m_config.c7
-rw-r--r--mpvcore/m_config.h2
-rw-r--r--mpvcore/mp_ring.c12
-rw-r--r--mpvcore/mplayer.c41
-rw-r--r--mpvcore/options.c5
-rw-r--r--mpvcore/parser-cfg.c50
-rw-r--r--mpvcore/playlist_parser.c3
-rw-r--r--mpvcore/resolve_quvi9.c7
-rw-r--r--osdep/mpv.rc2
-rw-r--r--stream/stream_dvb.c3
-rw-r--r--sub/sd_ass.c7
-rw-r--r--ta/README39
-rw-r--r--ta/ta.c439
-rw-r--r--ta/ta.h146
-rw-r--r--ta/ta_talloc.c75
-rw-r--r--ta/ta_talloc.h74
-rw-r--r--ta/ta_utils.c320
-rw-r--r--talloc.c1759
-rw-r--r--talloc.h176
-rwxr-xr-xversion.sh15
-rw-r--r--video/filter/vf_scale.c2
-rw-r--r--video/mp_image.c6
-rw-r--r--video/mp_image_pool.c3
-rw-r--r--video/out/cocoa/additions.m4
-rw-r--r--video/out/cocoa/view.m13
-rw-r--r--video/out/cocoa_common.m4
-rw-r--r--video/out/vo_image.c5
-rw-r--r--video/out/x11_common.c6
-rw-r--r--video/sws_utils.c6
51 files changed, 1893 insertions, 2740 deletions
diff --git a/Copyright b/Copyright
index 1b0bb8165e..ba2612d285 100644
--- a/Copyright
+++ b/Copyright
@@ -1,37 +1,19 @@
mpv is a fork of mplayer2, which is a fork of MPlayer.
-Original MPlayer Copyright file follows below.
-MPlayer was originally written by Árpád Gereöffy and has been extended and
-worked on by many more since then, see the AUTHORS file for an (incomplete)
-list. MPlayer as a whole is copyrighted by the MPlayer team. Individual
-copyright notices can be found in file headers.
+mpv as a whole is licensed as GPL version 2 or later (see LICENSE). Most source
+files are GPLv2+, but some files are available under a more liberal license,
+such as LGPLv2+, BSD, MIT, ISC, and possibly others. Look at the copyright
+header of each source file, and grep the sources for "Copyright" if you need
+to know details. Files without Copyright notice are licensed as LGPLv2+.
-Most files in MPlayer are licensed under the GNU General Public License,
-version 2 with an explicit "or later" clause or a compatible license
-(LGPL 2.1+, MIT/BSD). An exception are the files talloc.c and talloc.h,
-which are LGPL 3+.
-Thus MPlayer as a whole can be redistributed under terms compatible with
-the GNU General Public License, version 3; see the LICENSE file for details.
-(Note: this is probably a mistake. MPlayer never used talloc, and MPlayer is
-actually strictly GPLv2 only because has some GPLv2-only files.)
+For information about authors and contributors, consult the git log, which
+contains the complete SVN and CVS history as well.
-MPlayer includes code from several external sources. General information and
-license details are listed below:
+Note that mplayer2 as a whole is licensed under GPLv3+. This is because it uses
+a copy of talloc (part of Samba), which is LGPLv3+, and the next compatible
+license for this mix is GPLv3+.
-Name: a couple of files copied from FFmpeg
-Version: updated to different versions
-URL: http://www.ffmpeg.org
-Directory: compat/x86_cpu.h
-Copyright: Many, see individual files for copyright notices.
-License: GNU Lesser General Public License
-
-
-Name: dvbstream
-Version: 0.4.3-pre3 (CVS checkout)
-URL: http://sourceforge.net/projects/dvbtools/
-Directory: stream/dvbin.h stream/stream_dvb.c
-Copyright: 2001-2002 Dave Chapman <dave@dchapman.com>
-License: GNU General Public License
-
-
-This is not a complete list. grep the sources for "Copyright".
+MPlayer as a whole is licensed under GPLv2 (incompatible to GPLv3!), because
+some files are licensed to GPLv2 (and _not_ any later version of the license).
+In particular, this affects the file libmpdemux/demux_ty_osd.c. It is disabled
+under mplayer2, and has been removed from mpv.
diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst
index 489fadd36c..05c81d77d8 100644
--- a/DOCS/man/en/changes.rst
+++ b/DOCS/man/en/changes.rst
@@ -36,6 +36,7 @@ General Changes for MPlayer to mplayer2
General Changes for mplayer2 to mpv
-----------------------------------
+* Switch back to GPLv2+.
* Removal of lots of unneeded code to encourage developer activity (less
obscure scary zombie code that kills any desire for hacking the codebase)
* Removal of dust and dead bodies (code-wise), such as kernel drivers for
@@ -146,7 +147,7 @@ Command Line Switches
``-xineramascreen`` ``--screen`` (different values)
``-ss`` ``--start``
``-endpos`` ``--length``
- ``--cursor-autohide-delay`` ``--cursor-autohide``
+ ``-cursor-autohide-delay`` ``--cursor-autohide``
``-sub-fuzziness`` ``--autosub-match``
``-subfont`` ``--sub-text-font``
``-font`` ``--osd-font``
@@ -169,10 +170,12 @@ Command Line Switches
``-lavfdopts`` ``--demuxer-lavf-...``
``-rawaudio ...`` ``--demuxer-rawaudio-...``
``-rawvideo ...`` ``--demuxer-rawvideo-...``
- ``--mixer`` AO suboptions (``alsa``, ``oss``)
- ``--mixer-channel`` AO suboptions (``alsa``, ``oss``)
- ``--ao=alsa:device=hw=0.3`` ``--ao=alsa:device=[hw:0,3]``
+ ``-mixer`` AO suboptions (``alsa``, ``oss``)
+ ``-mixer-channel`` AO suboptions (``alsa``, ``oss``)
+ ``-ao alsa:device=hw=0.3`` ``--ao=alsa:device=[hw:0,3]``
``-af volnorm`` ``--af=drc`` (renamed)
+ ``-zoom`` Inverse available as ``--video-unscaled``
+ ``-panscanrange`` ``--video-zoom``, ``--video-pan-x/y``
=========================== ========================================
.. note::
diff --git a/DOCS/man/en/mpv.rst b/DOCS/man/en/mpv.rst
index 5b61257999..0ee64d41b6 100644
--- a/DOCS/man/en/mpv.rst
+++ b/DOCS/man/en/mpv.rst
@@ -6,7 +6,7 @@ a movie player
##############
:Author: wm4
-:Copyright: GPLv3
+:Copyright: GPLv2+
:Manual section: 1
:Manual group: multimedia
@@ -424,9 +424,6 @@ taking screenshots is handled by the VOs, and adding the screenshot filter will
break hardware decoding. (The filter may still be useful for taking screenshots
at a certain point within the video chain when using multiple video filters.)
-OPTIONS
-=======
-
.. include:: options.rst
.. include:: ao.rst
@@ -441,6 +438,8 @@ OPTIONS
.. include:: input.rst
+.. include:: osc.rst
+
.. include:: lua.rst
.. include:: changes.rst
diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst
index cc0b7a4db2..ef69788b21 100644
--- a/DOCS/man/en/options.rst
+++ b/DOCS/man/en/options.rst
@@ -1,3 +1,6 @@
+OPTIONS
+=======
+
``--ad=<[+|-]family1:(*|decoder1),[+|-]family2:(*|decoder2),...[-]>``
Specify a priority list of audio decoders to be used, according to their
family and decoder name. Entries like ``family:*`` prioritize all decoders
@@ -1267,10 +1270,11 @@
playlist formats to the special demuxer is work in progress, and eventually
the old code should disappear.
-``--loop=<number|inf|no>``
- Loops playback ``<number>`` times. ``inf`` means forever and ``no`` disables
- looping. If several files are specified on command line, the entire playlist
- is looped.
+``--loop=<N|inf|no>``
+ Loops playback ``N`` times. A value of ``1`` plays it one time (default),
+ ``2`` two times, etc. ``inf`` means forever. ``no`` is the same as ``1`` and
+ disables looping. If several files are specified on command line, the
+ entire playlist is looped.
``--lua=<filename>``
Load a Lua script. You can load multiple scripts by separating them with
@@ -2104,7 +2108,7 @@
``--stop-screensaver``, ``--no-stop-screensaver``
Turns off the screensaver (or screen blanker and similar mechanisms) at
startup and turns it on again on exit (default: yes). The screensaver is
- always reenabled when the player is paused.
+ always re-enabled when the player is paused.
This is not supported on all video outputs or platforms. Sometimes it is
implemented, but does not work (happens often on GNOME). You might be able
diff --git a/DOCS/man/en/osc.rst b/DOCS/man/en/osc.rst
new file mode 100644
index 0000000000..9a3dc92177
--- /dev/null
+++ b/DOCS/man/en/osc.rst
@@ -0,0 +1,198 @@
+ON SCREEN CONTROLLER
+====================
+
+The On Screen Controller (short: OSC) is a minimal GUI integrated with mpv to
+offer basic mouse-controllability. It is intended to make interaction easier
+for new users and to enable precise and direct seeking.
+
+The OSC is enabled by default if mpv was compiled with lua support. It can be
+disabled using ``--osc=no``.
+
+Using the OSC
+-------------
+
+By default, the OSC will show up whenever the mouse is moved inside the
+player window and will hide if the mouse is not moved outside the OSC for
+0.5 seconds or if the mouse leaves the window.
+
+The Interface
+~~~~~~~~~~~~~
+
+::
+
+ +------------------+-----------+--------------------+
+ | playlist prev | title | playlist next |
+ +-------+------+---+--+------+-+----+------+--------+
+ | audio | skip | seek | | seek | skip | full |
+ +-------+ back | back | play | frwd | frwd | screen |
+ | sub | | | | | | |
+ +-------+------+------+------+------+------+--------+
+ | seekbar |
+ +----------------+--------------+-------------------+
+ | time passed | cache status | time remaining |
+ +----------------+--------------+-------------------+
+
+
+playlist prev
+ ============= ================================================
+ left-click play previous file in playlist
+ shift+L-click show playlist
+ ============= ================================================
+
+title
+ | Displays current media-title or filename
+
+ ============= ================================================
+ left-click show playlist position and length and full title
+ right-click show filename
+ ============= ================================================
+
+playlist next
+ ============= ================================================
+ left-click play next file in playlist
+ shift+L-click show playlist
+ ============= ================================================
+
+audio and sub
+ | Displays selected track and amount of available tracks
+
+ ============= ================================================
+ left-click cycle audio/sub tracks forward
+ right-click cycle audio/sub tracks backwards
+ shift+L-click show available audio/sub tracks
+ ============= ================================================
+
+skip back
+ ============= ================================================
+ left-click go to beginning of chapter / previous chapter
+ shift+L-click show chapters
+ ============= ================================================
+
+seek back
+ ============= ================================================
+ left-click skip back 5 seconds
+ right-click skip back 30 seconds
+ shift-L-click skip back 1 frame
+ ============= ================================================
+
+play
+ ============= ================================================
+ left-click toggle play/pause
+ ============= ================================================
+
+seek frwd
+ ============= ================================================
+ left-click skip forward 10 seconds
+ right-click skip forward 60 seconds
+ shift-L-click skip forward 1 frame
+ ============= ================================================
+
+skip frwd
+ ============= ================================================
+ left-click go to next chapter
+ shift+L-click show chapters
+ ============= ================================================
+
+fullscreen
+ ============= ================================================
+ left-click toggle fullscreen
+ ============= ================================================
+
+seekbar
+ | Indicates current playback position and position of chapters
+
+ ============= ================================================
+ left-click seek to position
+ ============= ================================================
+
+time passed
+ | Shows current playback position timestamp
+
+ ============= ================================================
+ left-click toggle displaying timecodes with milliseconds
+ ============= ================================================
+
+cache status
+ | Shows current cache fill status (only visible when below 48%)
+
+time remaining
+ | Shows remaining playback time timestamp
+
+ ============= ================================================
+ left-click toggle between total and remaining time
+ ============= ================================================
+
+
+Configuration
+-------------
+
+The OSC offers limited configuration through a config file ``plugin_osc.conf``
+placed in mpv's user dir.
+
+Config Syntax
+~~~~~~~~~~~~~
+
+The config file must exactly follow the following syntax::
+
+ # this is a comment
+ parameter1=value1
+ parameter2=value2
+
+``#`` can only be used at the beginning of a line and there may be no
+spaces around the ``=`` or anywhere else.
+
+Configurable parameters
+~~~~~~~~~~~~~~~~~~~~~~~
+
+``showwindowed``
+ | Default: yes
+ | Show OSC when windowed?
+
+``showfullscreen``
+ | Default: yes
+ | Show OSC when fullscreen?
+
+``scalewindowed``
+ | Default: 1
+ | Scaling of the controller when windowed
+
+``scalefullscreen``
+ | Default: 1
+ | Scaling of the controller when fullscreen
+
+``scaleforcedwindow``
+ | Default: 2
+ | Scaling of the controller when rendered on a forced (dummy) window
+
+``vidscale``
+ | Default: yes
+ | Scale the controller with the video?
+
+``valign``
+ | Default: 0.8
+ | Vertical alignment, -1 (top) to 1 (bottom)
+
+``halign``
+ | Default: 0
+ | Horizontal alignment, -1 (left) to 1 (right)
+
+``hidetimeout``
+ | Default: 500
+ | Duration in ms until the OSC hides if no mouse movement, negative value
+ disables auto-hide
+
+``fadeduration``
+ | Default: 200
+ | Duration of fade out in ms, 0 = no fade
+
+``deadzonesize``
+ | Default: 0
+ | Size of the deadzone. The deadzone is an area that makes the mouse act
+ like leaving the window. Movement there won't make the OSC show up and
+ it will hide immediately if the mouse enters it.
+
+``minmousemove``
+ | Default: 3
+ | Minimum amount of pixels the mouse has to move between ticks to make
+ the OSC show up
+
diff --git a/DOCS/man/en/vo.rst b/DOCS/man/en/vo.rst
index 88c1821e9c..b472d26e0e 100644
--- a/DOCS/man/en/vo.rst
+++ b/DOCS/man/en/vo.rst
@@ -776,4 +776,4 @@ Available video output drivers are:
``alpha``
Use a buffer format that supports videos and images with alpha
- informations
+ information
diff --git a/DOCS/tech-overview.txt b/DOCS/tech-overview.txt
index d83b00c829..cc4c8ecaae 100644
--- a/DOCS/tech-overview.txt
+++ b/DOCS/tech-overview.txt
@@ -76,6 +76,12 @@ talloc.h & talloc.c:
replacement. It works on top of system malloc and provides additional
features that are supposed to make memory management easier.
+ Warning: actually, we're not using talloc anymore. talloc in mpv has been
+ replaced by a custom re-implementation (TA in ta/). It provides
+ some talloc emulation (just the parts needed by mpv). We will get
+ rid of the talloc emulation later and use TA natively.
+ (See ta/README for details.)
+
mpvcore/mp_core.h:
Data structures for mplayer.c and command.c. They are usually not accessed
by other parts of mpv for the sake of modularization.
diff --git a/LICENSE b/LICENSE
index 94a9ed024d..7b845eec88 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,625 +1,284 @@
GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
+ Version 2, June 1991
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and