0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
Commit Graph

39447 Commits

Author SHA1 Message Date
wm4
596231bc97 player: fix --frames
This could produce an extra frame, because reaching the maximum merely
signals the playloop to exit, without strictly enforcing the limit.

Fixes #1181.

CC: @mpv-player/stable
2014-10-14 13:29:38 +02:00
wm4
cb6be26181 DOCS/client_api_examples: qtexample: remove debugging code
Forgotten.
2014-10-14 13:20:24 +02:00
wm4
95dda1050d client API: qthelper: fix bugs
Pretty dumb oversights.
2014-10-14 13:20:05 +02:00
wm4
2ad0be8592 DOCS/client_api_examples: qtexample: stuff
Dump chapters and track list to the log for demo purposes.

Compile in debug mode.
2014-10-13 23:55:57 +02:00
wm4
1c5dbdbfc2 client API: add qthelper.hpp
This provides some helper functions and classes for C++/Qt. As the top
of qthelper.hpp says, this is built on top of the client API, and is a
mere helper provided for convenience.

Maybe this should be a separate library, but on the other hand I don't
see much of a point in that. It's also header-only, but C++ people like
such things. This makes it easier for us, because we don't need to care
about ABI compatibility.

The client API doesn't change, but bump it so that those who are using
this header can declare a proper dependency.
2014-10-13 23:54:19 +02:00
wm4
be0896c173 ta/README: fix typos 2014-10-13 18:56:42 +02:00
wm4
e9b0a61444 ao_wasapi: implement device listing 2014-10-13 18:21:45 +02:00
wm4
fb7cc7274e ao_dsound: implement device listing 2014-10-13 18:21:35 +02:00
wm4
19f543ecbb ao_portaudio: implement device listing 2014-10-13 16:43:05 +02:00
wm4
859d02b40e ao_openal: implement device listing 2014-10-13 16:42:56 +02:00
wm4
2e52cc8f2e audio/out: add "auto" pseudo-device
Also, don't set an empty string for the fallback device if an AO doesn't
list any devices.
2014-10-13 16:42:44 +02:00
wm4
057384baa6 demux_mkv: fix undefined behavior
With some files, the extradata variable can remain uninitialized, but
will be used for memory access.

CC: @mpv-player/stable (with high priority)
2014-10-13 16:42:00 +02:00
wm4
ceba1d446a vf_vapoursynth: add debug message when returning error from GetFrame
Some filters still (or will) behave badly on these errors, so explicitly
log when it happens.
2014-10-13 14:35:03 +02:00
wm4
7266ceeb8e x11: don't wait for asynchronous X resizing with window-scale
Instead of letting the window-scale property return the old value until
X11 actually executed the resize, just set the new assumed internal
window size immediately. This avoids a "lag" between setting and reading
the window-scale property, like OSD controls typically do.

Remove the additional calls from vo_x11_highlevel_resize() - they're
pointless and slightly wrong, and resize events will take care of
updating these things correctly anyway.

Fixes #1176.

("window-scale" works via VOCTRL_[S|G]ET_UNFS_WINDOW_SIZE.)
2014-10-13 09:57:31 +02:00
wm4
385e1ccbce vf_vapoursynth: don't error if invoke() doesn't return a clip
Not all functions are for creating filters. Consider for example
LoadPlugin.
2014-10-12 20:25:25 +02:00
wm4
7b0c58ab49 vf_vapoursynth: resolve paths relative to home/config
This affects the script filename passed to the filter. Resolve "~" (and
some other variants) as described in the "Paths" section of mpv.rst.
2014-10-12 20:24:20 +02:00
wm4
5a07ce758e demux: fix a comment
Don't refer to fields that were removed.
2014-10-12 20:22:47 +02:00
Stefano Pigozzi
7c07da57e3 coreaudio: use the new device selection API
The CoreAudio API is built around device IDs so we store the integer as string
and read it back.
2014-10-12 12:22:17 +02:00
wm4
240266d12c af_lavcac3enc: fix byte order
Oops.

Fixes #1172.

CC: @mpv-player/stable
2014-10-12 11:33:35 +02:00
wm4
6c34081095 DOCS/edl-mpv: minor clarification 2014-10-12 01:33:10 +02:00
wm4
9c0389e841 gl_x11: distinguish missing GLX and too old GLX versions
This probably led to confusing output.

CC: @mpv-player/stable
2014-10-12 01:33:10 +02:00
wm4
3093d93e1f vf_vapoursynth: add standalone Lua scripting 2014-10-12 01:33:10 +02:00
wm4
1b4f51ae73 vf_vapoursynth: abstract scripting backend
In theory, vsscript should be doing it, but it's not there yet, neither
did there seem to be any interest in making it flexible enough to handle
more than 1 scripting language.
2014-10-12 01:33:09 +02:00
Stefano Pigozzi
c2eca2e4b7 libmpv/cocoa: allow clients to use mpv event system
This allows mpv's view to take key and send events to mpv's core.
To set key status correctly, clients must call -[NSWindow selectNextKeyView:]
during reconfig on the main thread. All is 'documented' in the cocoabasic
example.

If someone knows a better way to handle giving key to the embedded view,
let me know!
2014-10-12 00:19:44 +02:00
Stefano Pigozzi
8b6b84f36b cocoa: remove usage of Objective-C categories
Objective-C categories need special linker flags from the user when statically
linking (-ObjC LDFLAG), so make everyone's life simpler and remove them.
2014-10-12 00:19:44 +02:00
wm4
b9077214cf command: don't display non-sense if volume is unavailable
Showed "Volume: (unavailable)%". That was dumb.

The message string is now a bit convoluted; mostly because the property
expand syntax can't do "if-else", just "if".

CC: @mpv-player/stable
2014-10-11 21:35:08 +02:00
wm4
a3bf75279e command: make volume/mute unavailable if audio is not initialized
This does nothing good. This reverts a change made over a year ago - I
don't remember why this was originally done this way.

The main problem is that even if the volume option is set (something
like "--volume=75"), the volume property will always return "100" until
audio is initialized. If audio is uninitialized again, the volume
property will remain frozen at its last value.
2014-10-11 21:35:08 +02:00
Stefano Pigozzi
f2ef3e664b build: remove useless function 2014-10-11 21:03:13 +02:00
Stefano Pigozzi
d906d09162 build: update waf to version 1.8.1
Fixes #1164
2014-10-11 20:54:42 +02:00
wm4
227e470ee2 vf_vapoursynth: return dummy frames if frames are requested during init
An attempt at fixing #1168.

I see black frames flashing, so it's certainly not perfect.
2014-10-11 18:17:20 +02:00
wm4
46b16cf206 vf_vapoursynth: factor stuff 2014-10-11 18:16:09 +02:00
wm4
54e2ca809c vf_vapoursynth: when seeking, recreate only if it's already created 2014-10-11 18:15:38 +02:00
wm4
cea7528b39 x11: don't wait until window is destroyed
This can hang if the window was destroyed externally (or that's what I
suspect happens), and we somehow didn't receive the DestroyNotify event.
I'm not sure why we wouldn't receive this event (since it should just be
in the xlib event queue), but on the other hand there's no real need to
wait for window destruction.

This essentially reverts 97fc74e2.
2014-10-11 16:30:58 +02:00
wm4
bce2be7b3e build: install input config files into doc dir
Users using binary packages don't have obvious access to them, so this
seems like a good idea.
2014-10-11 16:16:02 +02:00
James Ross-Gowan
2782f06491 client API: check result ptr in mpv_command_node
This follows the docs, which say the result parameter is optional.
2014-10-12 00:56:41 +11:00
James Ross-Gowan
e48b2bd4d1 libmpv/mpv.def: add mpv_command_node[_async] 2014-10-12 00:56:40 +11:00
Philip Sequeira
977ff1034f build: make zsh completion directory configurable
Also, use the zsh default location (rather than the Debian one).
2014-10-11 13:26:12 +02:00
wm4
ab41b8d27b vf_vapoursynth: fail gracefully if filter init requests frames
Some VS filters will requests frames from their parent filters while
they're initialized. Thy do this in a blocking manner, and
initialization will not succeed until the frame request is satisfied.
This deadlocked mpv, because we can feed frames to the filter only after
initialization is finished.

Return an error instead of deadlocking.

Note that we (probably) can handle frames being requested during init
fine, as long as the requests don't block initialization. But we can
distinguish this situation, and a simple test seems to indicate VS
usually doesn't do this.

See #1168.
2014-10-11 13:25:38 +02:00
wm4
c5c21abf78 lua: add command_native() function
This is the Lua equivalent of mpv_command_node().
2014-10-11 00:33:09 +02:00
wm4
63e2b6c4ae client API: add mpv_command_node[_async]
Allows passing native types as arguments.

Also some minor doc improvements, including giving some (natural)
improvements to mpv_free_node_contents().

Note: mpv_command_node_async() is completely untested.
2014-10-11 00:33:09 +02:00
wm4
84a126b5b5 etc/mplayer-input.conf: fix off by one error
playlist-pos is 0-based, but everyone thinks it's 1-based. Stupid crap.

(The "not the same as MPlayer" refers to a playlist manipulation command
that doesn't exist anymore in mpv.)

CC: @mpv-player/stable
2014-10-10 23:07:31 +02:00
wm4
e970113932 input: remove some unneeded code 2014-10-10 23:05:33 +02:00
wm4
d0f77b5615 input: cosmetics: move code 2014-10-10 23:01:00 +02:00
wm4
c9f45ea93e input: use mpv_node parser for char** command parsers
Minor simplification, also drops some useless stuff.
2014-10-10 22:58:28 +02:00
wm4
63903c27bd input: add a function to parse mpv_node as command
For future client API enhancements.
2014-10-10 22:37:11 +02:00
wm4
2f28e071c8 command: make audio device list available to the client API 2014-10-10 19:49:10 +02:00
wm4
04a5d25bf7 audio: don't list encoder AO with --audio-device=help 2014-10-10 19:45:25 +02:00
wm4
8417d86ce6 player: fix terminal status in idle mode
That's what this variable is for. This was missed in commit 9d5d031b.
2014-10-10 18:54:47 +02:00
wm4
3fc9f9d132 player: don't mess up cursor visibility state
Manually setting can break things forever, because it puts the VO cursor
state out of sync with the remembered state by handle_cursor_autohide().
Use the normal autohide code during idle mode too instead. (Originally
the idea was to make the cursor always visible in idle mode, but not so
important.)

Regression since e1e8b07c. Fixes #1166.

CC: @mpv-player/stable
2014-10-10 18:51:44 +02:00
wm4
f432a584b9 ao_pulse: implement AO device listing API
While conceptually this sink stuff in PulseAudio does just the right
thing, actually listing the sinks is unbelievable complicated. Not only
is the idea that listing them should happen asynchronously completely
bullshit (who the fuck runs the PulseAudio server on a separate
computer), but the way this is done is full of bullshit too. Why
separate callbacks for each device? Why this obtuse mainloop shit?
Especially the mainloop shit makes it actively worse than doing things
manually with pthread primitives, and the reason for that (different
mainloop implementations for GUIs?) is laughable too. It's like they
chose the most complicated API possible just because they attempted
to "abstract" basic mechanisms in order to handle "everything". While
I don't claim to design the best APIs, this API is fucking terrible
without any excuse. (End of rant.)
2014-10-10 18:42:43 +02:00