Commit Graph

37340 Commits

Author SHA1 Message Date
wm4 333d1045b7 manpage: lua: shorten description of register_script_command()
This is simply not important enough to warrant so much space, and it's
perhaps also very confusing.

Although I'm not fully sure, since this is about the only way that
allows a user to interact with a script, besides key bindings and static
options.
2014-02-17 20:30:44 +01:00
wm4 6d87f6f550 manpage: lua: attempt to improve add_key_binding() description 2014-02-17 20:30:44 +01:00
wm4 c79ea489bf manpage: lua: improve introduction, add simplistic example 2014-02-17 20:30:44 +01:00
wm4 ceca513e9d manpage: lua: fix typo 2014-02-17 20:30:44 +01:00
wm4 0f973cc8c6 manpage: input: document script_message command 2014-02-17 20:30:44 +01:00
Stefano Pigozzi b1328418ee vo_corevideo: remove unused variable 2014-02-17 19:39:49 +01:00
Stefano Pigozzi 689646962e stream_file: activate cache with files on network file systems
Detected 'protocols' are AFP, nfs, smb and webdav. This can be extended on
request.

This is currently only implemented for BSD systems (using fstatfs). This
addresses issue #558 on the above platforms.
2014-02-17 19:39:49 +01:00
wm4 5fcf4b46f7 client API: add events for video and audio reconfig 2014-02-17 02:52:59 +01:00
James Ross-Gowan b3b59b9a2d w32_common: don't set small icon
Windows will automatically choose the correct icon size if this field is
unset.
2014-02-17 02:52:58 +01:00
wm4 24fa69dbfa lua: add mechanism for script provided key bindings
There was already an undocumented mechanism provided by
mp.set_key_bindings and other functions, but this was relatively
verbose, and also weird. It was mainly to make the OSC happy (including
being efficient and supporting weird corner cases), while the new
functions try to be a bit simpler.

This also provides a way to let users rebind script-provided commands.

(This mechanism is less efficient, because it's O(n^2) for n added key
bindings, but it shouldn't matter.)
2014-02-17 02:52:58 +01:00
wm4 12b7850f11 input: debug output for registered bindings 2014-02-17 02:52:58 +01:00
wm4 03624a1747 input: don't let builtin bindings overwrite user bindings
This was already done, except when the bindings were in different input
sections. This commit fixed it. Useful for scripts, probably.
2014-02-17 02:52:58 +01:00
wm4 75d3267b43 client API: add a client message event
This comes with a "script_message" input command, which sends these
messages. Used by the following commits.
2014-02-17 02:52:58 +01:00
wm4 fe586dbbdb keycodes: add const to a function argument 2014-02-17 02:52:58 +01:00
wm4 5fd661b50e lua: allow giving fallback values in get_property() calls
E.g. ``mp.get_property("foo", "value")`` will return ``value`` if the
property can't be read.
2014-02-17 02:52:58 +01:00
wm4 1fa8e2b602 lua: remove redundant inline documentation
Nobody will loom at this, and the proper documentation of these
functions is in lua.rst.
2014-02-17 02:52:58 +01:00
Timothy Gu d85e2588cf DOCS/crosscompile-mingw: use settings.mk instead of make variables
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2014-02-17 02:52:58 +01:00
Timothy Gu da4e33074e DOCS/crosscompile-mingw: update disk space stats 2014-02-17 02:52:58 +01:00
Timothy Gu b980884f92 DOCS/crosscompile-mingw: update
- Adds description of and uses $JOBS envvar in MXE instructions
- Adds MXE_TARGETS to command line instead of echoing it to settings.mk
- Prettify and sentence usage
2014-02-17 02:52:57 +01:00
Alexander Preisinger 891268955e wayland/shm: remove unused define 2014-02-16 18:14:17 +01:00
wm4 98349fa910 command: export chapter list as properties 2014-02-16 03:51:02 +01:00
wm4 e41d27c7db command: export playlist as properties 2014-02-16 03:51:02 +01:00
wm4 92133b1dcd command: expose track list as properties 2014-02-16 03:51:02 +01:00
wm4 801de5ac6d m_property: add a mechanism to organize a list of sub-properties
This automatically adds a "count" sub-property, and for each entry in
the range [0, count), a numbered sub-property to access the item.
2014-02-16 03:51:02 +01:00
wm4 486658e5c7 demux: expose stream_type_name() function 2014-02-16 03:51:02 +01:00
wm4 c236cb7679 command: export more video params as properties
This uses the previously added sub-property mechanism to export a bunch
of stuff. For example, "video-params/w" now contains the video width.
2014-02-16 03:51:02 +01:00
wm4 309ae76e0b m_property: add a sub-property mechanism
This adds a mechanism for easier export of sub-properties. The following
commits will make use of it to export fine grained information about
certain things. The sub-property mechanism reduces the amount of code
needed to export a data value to 1 line.
2014-02-16 03:51:02 +01:00
wm4 ccfbe43455 csputils: provide string descriptions of chroma locations 2014-02-16 03:51:02 +01:00
Diogo Franco (Kovensky) 317a02bdd4 Merge branch 'master' of git://github.com/mpv-player/mpv
* 'master' of git://github.com/mpv-player/mpv:
  win32: restore support for exe directory as config directory
  crosscompile-mingw: improve instructions for MXE
  sd_lavc: handle subtitles with no subtitle resolution set
  options: make --no-config block all auto-loaded configuration files
  lua: auto-load scripts from ~/.mpv/lua/
  lua: make register_event() not overwrite previous event handler
2014-02-15 19:44:58 -03:00
Diogo Franco (Kovensky) 4a66fce7d3 Parse::Matroska::Reader: get rid of `bigrat`
It seems that it was causing issues with certain perl setups (such as
the one on issue #549). It also turns out that it was not behaving correctly
(not all constants were being promoted to big nums as they should), so we
use explicit objects to derive the constants.

There were also precedence issues. I wonder if this even worked right to
begin with.

The 'double' path (8-byte floats) is untested, as I couldn't easily find
a file with such a field.

Closes #549.
2014-02-15 19:43:22 -03:00
elevengu 792c1750ec win32: restore support for exe directory as config directory
Same rationale as b2c2fe7a but updated to work with path-win.c

Signed-off-by: wm4 <wm4@nowhere>

Merges/closes #543.
2014-02-14 21:55:04 +01:00
wm4 cf6d6666e2 crosscompile-mingw: improve instructions for MXE 2014-02-14 20:12:09 +01:00
xylosper 87c13de656 sd_lavc: handle subtitles with no subtitle resolution set
Set subtitle resolution to video resolution when avctx->width and
avctx->height are zero.

This can happen with broken vobsubs that have no size set in their
.idx file (or Matroska extradata). At least with the test file provided
in issue #551, using the video resolution as fallback instead of what
guess_resolution() does is better.

Note that these files clearly are broken. It seems this particular
file was created by trying to use ffmpeg to transcode DVB subtitles
to vobsub, and ffmpeg "forgot" to set the subtitle resolution in the
destination file. On the other hand, ffmpeg DVB and PGS decoders set
the resolution on the first subtitle packet (or somewhere close), so
it's not really clear what to do here.

Closes #551.

Signed-off-by: wm4 <wm4@nowhere>

Patch by xylosper, rewritten commit message by wm4.
2014-02-14 16:38:31 +01:00
wm4 ce6fb9175c options: make --no-config block all auto-loaded configuration files
Until now, the --no-config was explicitly checked in multiple places to
suppress loading of config files.

Add such a check to the config path code itself, and refuse to resolve
_any_ configuration file locations if the option is set.

osc.lua needs a small fixup, because it didn't handle the situation when
no path was returned. There may some of such cases in the C code too,
but I didn't find any on a quick look.
2014-02-14 14:01:27 +01:00
wm4 c2e8f8fb89 lua: auto-load scripts from ~/.mpv/lua/
This is like passing them to --lua.
2014-02-14 14:01:27 +01:00
wm4 414c4f9322 lua: make register_event() not overwrite previous event handler
Instead, chain them.

Note that there's no logic to prevent the other event handlers to be run
from an event handler (like it's popular in GUI toolkits), because I
think that's not very useful for this purpose.
2014-02-14 14:01:27 +01:00
Diogo Franco (Kovensky) 99e38aee9a build: Add -U__STRICT_ANSI__ to CFLAGS on Cygwin
Cygwin's libc (newlib) doesn't obey a lot of unix feature test macros,
including _GNU_SOURCE; as a result, a lot of functions and defines get
masked out -- important defines such as M_PI and strcasecmp. Work around
it by undefining __STRICT_ANSI__ on cygwin systems.

This will still cause compilation issues on any non-cygwin system that
uses newlib, but hopefully nobody does that, or if they do, they will
find this commit message and know to add -U__STRICT_ANSI__ to their
CFLAGS. Hopefully.
2014-02-13 19:29:23 -03:00
Stefano Pigozzi 590b28c08b build: disable clang's tautological compare warnings [2]
Fixup 8009646583.
2014-02-13 23:16:12 +01:00
wm4 2a2dfd2327 sub: handle vobsub-in-mp4
The mplayer decoder (spudec.c) actually handled this. There was explicit
code for binary palettes (16 32 bit values), and the subtitle resolution
was handled by video resolution coincidentally matching the subtitle
resolution.

Whoever puts vobsub into mp4 should be punished.

Fixes the sample gundam_sample.mp4, closes github issue #547.
2014-02-13 22:54:47 +01:00
Stefano Pigozzi 8009646583 build: disable clang's tautological compare warnings
This silences two non issues in the client.c file. Fixing them as clang would
want us to, would introduce security bugs and potential crashes.
2014-02-13 22:43:17 +01:00
Stefano Pigozzi 2705c66799 cocoa: fix deadlock during initialization [2]
Fixup commit for 20fa191ad.
2014-02-13 22:22:44 +01:00
wm4 098f0c67e6 player: select subtitles added with sub_add
In particular, this affects drag & drop of subtitles, which uses sub_add
internally. This will make the subtitles show up immediately, instead of
requiring manual selection of the added subtitle.

Might be not so ideal when adding multiple subtitles at once, because
that leads to multiple sub_add commands, and will end up with the last
subtitle instead of the first selected. But this is a minor detail.
2014-02-13 13:30:31 +01:00
wm4 adfda51e8a build: bump libmpg123 version
The minimum required version was bumped in the old configure script, but
for the waf build system is was somehow forgotten or overlooked.
Probably happened while the waf build system was developed in a separate
branch.

Closes #546.
2014-02-13 13:30:30 +01:00
Stefano Pigozzi 20fa191adb cocoa: fix deadlock during initialization
Thanks to @wm4 for catching the bug.

Fixes #405
2014-02-13 13:01:51 +01:00
nand 55f4b592d1 vo_opengl: make :srgb decompand the BT.709 values correctly
This is the same issue as addressed by 257d9f1, except this time for
the :srgb option as well. (257d9f1 only addressed :icc-profile)

The conditions of the srgb_compand mix() call are also flipped to
prevent an off-by-one error.
2014-02-12 22:00:42 +01:00
wm4 958455ac39 vo_wayland: silence shadowing warning 2014-02-12 22:00:23 +01:00
wm4 b8901bf04d command: fix metadata property
This crashed when retrieving the raw property value. Oops.
2014-02-12 22:00:23 +01:00
wm4 914f281bcb manpage: reformat property list
Use a list instead of a table. This makes it easier to provide extended
information about a property, and doesn't require you to fiddle with rhe
RST ASCII-art tables.

Also, extend some property descriptions.
2014-02-12 22:00:22 +01:00
wm4 69769860c2 manpage: lua: move less important events to the end of the list 2014-02-12 22:00:22 +01:00
wm4 b71d492555 manpage: lua: document receiving of terminal messages 2014-02-12 22:00:18 +01:00