Commit Graph

37548 Commits

Author SHA1 Message Date
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
wm4 c342dcf096 manpage: lua: rewrite event description
Using such a small table is not such a great idea, because you can't put
much information in it, even if you need to.
2014-02-12 22:00:13 +01:00
wm4 5af8070a97 client API: fix description of mpv_event.error field
The description was a left over from an earlier iteration of the API.
2014-02-12 22:00:13 +01:00
wm4 3abbe31d6b manpage: lua: minor fixes 2014-02-12 22:00:07 +01:00
wm4 623cffdce9 player: fix --force-window on OSX
The initialization code was split and refactored for the libmpv changes.
One change, moving a part of cocoa initialization, accidentally broke
--force-window on OSX, which creates a VO in a certain initialization
stage. We still don't know how cocoa should behave with libmpv, so fix
this with a hack to beat it back into working. Untested.
2014-02-11 20:11:05 +01:00
Alexander Preisinger 5020395c83 man: update wayland options 2014-02-11 18:55:25 +01:00
Alexander Preisinger 0920dc1e26 wayland/shm: rewrite buffer handling
I was unhappy with the old way of handling buffers, especially resizing. But my
original plan to use wl_shm_pool_resize wasn't as good as I initially thought.
I might get back to it.

With the new buffer pools it now possible to select triple buffering. Also the
buffer pools are also needed for the upcoming subsurfaces for osd and subtitles.

I hope this change was worth it.
2014-02-11 18:44:53 +01:00
Alexander Preisinger 0670c541a5 wayland/shm: prevent the window from flying away
With the new xdg_shell the problem will be no gone by itself.
2014-02-11 18:11:14 +01:00
wm4 157d470b31 manpage: fix Lua script shutdown description again
It was split at the wrong sentence.

Also, sneak in a reference to mp.suspend.
2014-02-11 17:41:14 +01:00
wm4 3c13e68a28 manpage: document --aspect special values
Use of these is "discouraged", but they're there to select these special
cases with the "aspect" property. They really should use some sort of
choice option type, but since it would be some work to make these work
with float values, the simple and dumb alternative was picked.
2014-02-11 17:38:55 +01:00
wm4 7448d1958d video: fix --no-aspect
This also affects the --aspect option and the "aspect" property.
2014-02-11 17:36:25 +01:00
wm4 00bb8083ed build: add SONAME to libmpv.so 2014-02-11 15:24:49 +01:00
wm4 37a4e6b583 manpage: use Lua for Lua example 2014-02-11 15:22:02 +01:00
wm4 891f58e834 manpage: document mp.commandv Lua command 2014-02-11 01:25:26 +01:00
wm4 c776ac33e3 manpage: move description of script shutdown to a separate paragraph
No other changes, just adding a paragraph break and reflowing the text.
2014-02-11 01:25:15 +01:00
wm4 d473933923 manpage: fix formatting of example code 2014-02-11 01:14:08 +01:00
wm4 0ed6644ded manpage: document some Lua scripting functions 2014-02-11 01:05:05 +01:00
wm4 212d4e6061 lua: some minor API changes 2014-02-11 00:57:40 +01:00
wm4 33c6cbef3a lua: add set_property function 2014-02-11 00:23:10 +01:00
wm4 444f79d86f lua: change error behavior
Return the error Lua-style, instead of raising it as Lua error. This is
better, because raising errors is reserved for more "fatal" conditions.
Pretending they're exceptions and trying to do exception-style error
handling will just lead to pain in this language.
2014-02-11 00:10:25 +01:00
wm4 7a53dd5f2f lua: rename some API functions
send_command     -> command
send_commandv    -> commandv
get_timer        -> get_time
property_get     -> get_property
property_get_string -> get_property_osd
getopt           -> get_opt
2014-02-11 00:01:57 +01:00
wm4 2868fbea3f av_log: add tons of warnings against mismatched ffmpeg/libav libraries
Print a warning if a library has mismatched compile time and link time
versions.

Refuse to work if the compile time and link time versions are a mix of
ffmpeg and libav. We print an error message and call exit(). Since we'd
randomly crash anyway, I think this is ok.

This doesn't catch the case if you e.g. use a ffmpeg libavcodec and a
libav libavformat, which would of course just crash as quickly, but I
think this checks enough already.
2014-02-10 23:28:10 +01:00
wm4 476a4a378a av_log: restructure version printing code
Makes the following commit simpler.
2014-02-10 23:11:30 +01:00
nand 7d9fff9c6b vo_opengl: fix typo in gamma function's parameter
The correct value is 0.081, not 0.18. The scale factor also needed
slight adjustment due to the order of operations.
2014-02-10 22:11:13 +01:00
Jonas Zetterberg 1fcdf2d849 vo_vdpau: Discard zero timestamps
Some drivers do not supply timestamps, use old timestamp in these conditions.
2014-02-10 22:10:56 +01:00
Jonas Zetterberg c60c784a6a vo_vdpau: Ensure presentation time is within bounds
When a time sync happens the last sync time is the minimum time that can be
used for presentation.
2014-02-10 22:10:54 +01:00
wm4 bbdc47ee80 Merge branch 'client_api' 2014-02-10 22:10:31 +01:00
wm4 a6da2a6608 Add a client API example 2014-02-10 21:30:55 +01:00
wm4 3dd12104d9 build: add option to build a library
This library will export the client API functions.

Note that this doesn't allow compiling the command line player to link
against this library yet. The reason is that there's lots of weird stuff
required to setup the execution environment (mostly Windows and OSX
specifics), as well as things which are out of scope of the client API
and every application has to do on its own. However, since the mpv
command line player basically reuses functions from the mpv core to
implement these things, it's not very easy to separate the command
line player form the mpv core.
2014-02-10 21:25:22 +01:00
wm4 238c9b1d8d build: include a copy of syms.py from upstream waf
The alternatives to copying this small bit of code are even worse.

This is unmodified, except for the added line 3.
2014-02-10 21:08:37 +01:00
wm4 92a004bf87 lua: add a timer API 2014-02-10 21:07:23 +01:00
wm4 206616b697 lua: port to client API
This is partial only, and it still accesses some MPContext internals.
Specifically, chapter and track lists are still read directly, and OSD
access is special-cased too.

The OSC seems to work fine, except using the fast-forward/backward
buttons. These buttons behave differently, because the OSC code had
certain assumptions how often its update code is called.

The Lua interface changes slightly.

Note that this has the odd property that Lua script and video start
at the same time, asynchronously. If this becomes an issue, explicit
synchronization could be added.
2014-02-10 21:03:59 +01:00
wm4 88ae914b1e Add a client API
Add a client API, which is intended to be a stable API to get some rough
control over the player. Basically, it reflects what can be done with
input.conf commands or the old slavemode. It will replace the old
slavemode (and enable the implementation of a new slave protocol).
2014-02-10 21:01:35 +01:00
wm4 c6166ff448 timer: init only once
This avoids trouble if another mpv instance is initialized in the same
process.

Since timeBeginPeriod/timeEndPeriod are hereby not easily matched
anymore, use an atexit() handler to call timeEndPeriod, so that we
can be sure these calls are matched, even if we allow multiple
initializations later when introducing the client API.
2014-02-10 01:12:34 +01:00
wm4 8437356b6c options: add --no-terminal switch
Mostly useful for internal reasons. This code will be enabled by
default if mpv is started via the client API.
2014-02-10 00:14:52 +01:00
wm4 20fbe2fb8c threads: add a dispatch queue thing
Makes working with the (still) single-threaded playback thread easier.

Might be reusable for other stuff.
2014-02-10 00:04:39 +01:00
wm4 dd264ebe9d threads: avoid timeout calculation overflow
It's quite possible to overflow the calculation by setting the timeout
to high values. Limit it to INT_MAX, which should be safe. The issue is
mainly the secs variable.

timespec.tv_sec will normally be 64 bit on sane systems, and we assume
it can't overflow by adding INT_MAX to it.
2014-02-10 00:04:39 +01:00
wm4 7aa3726c9a demux_mkv: remove weird seeking semantics for audio
This skipped all audio packets before the first video key frame was
found. I'm not really sure why this would be needed; most likely it
isn't. So get rid of it. Even if audio packets are returned to the
player too soon, the player will sync the audio start to the video
start by decoding and discarding audio data.

Note that although the removed code was just added in the previous
commit, it merely kept the old keeping semantics which demux_mkv
always followed. This commit removes these special semantics.
2014-02-09 21:13:03 +01:00
wm4 4dbd5df174 demux_mkv: improve audio-only seeking
v_skip_to_keyframe is set to true while non-keyframe video packets are
skipped. Until now, audio packets were also skipped when doing this. I
can't see any good reason why this would be done, but for now I want to
keep the old logic when audio+video seeks are done.

However, for audio-only mode, do proper seeking, which also fixes
behavior when trying to seek past the end of the file: playback is
terminated properly, instead of starting playback on the start of the
last cluster.

Note that a_no_timecode_check is used only for audio+video seek. I'm
not sure what this is needed for, but it might influence A/V sync after
seeking.
2014-02-09 20:50:24 +01:00
wm4 ad782a53ef demux: fix some newlines in output messages 2014-02-09 18:59:57 +01:00
wm4 c0771b8144 player: fix an assert when reinitializing audio in some cases
This sometimes happened when changing playback speed (= reinitializing
audio) after seeking of playback start. The assertion in audio.c:441 was
triggered, because buffer_playable_samples wasn't reset correctly when
the audio buffer was cleared or shortened. The assertion is correct and
should hold up any time.
2014-02-09 18:59:44 +01:00
nand 257d9f1610 vo_opengl: use exactly the values defined by BT.709 for CMS
I could not see any difference whatsoever, but for usage with a 3DLUT
there's zero performance difference so we might as well follow the spec to
the letter.
2014-02-09 14:42:39 +01:00
wm4 7f744c9a16 msg: clear lines by printing spaces on MS Windows
On Windows, no ANSI control sequences are available, so we can't easily
clear lines, move the cursor, etc. It's yet to be decided how this
should be handled (emulate ANSI escapes in osdep/terminal-win.c, or
provide abstracted terminal API functions to unify the Linux and Windows
code).

For now, this fixes the regression that was introduced earlier by the
status line rewrite. It doesn't fix all aspects of status line and
terminal OSD handling, as can be clearly seen by the unconditional use
of terminal_erase_to_end_of_line further down the changed code.

Fixes github issue #499 (sort of).
2014-02-09 00:45:26 +01:00