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

39730 Commits

Author SHA1 Message Date
wm4
ed59234378 wscript: move down some less important checks 2014-11-17 23:50:32 +01:00
wm4
41fd7fa021 build: check for mingw-w64 explicitly
And fail building if not any of MingW-w64 or POSIX are found. Obviously,
mpv needs one of those 2.
2014-11-17 23:47:30 +01:00
wm4
469eb321e8 command: adjust previous commit
Due to the current code structure, the "current" entry and the entry
which is playing can be different. This is probably silly, but still
try to mark the entries correctly.

Refs #1260.
2014-11-17 22:48:38 +01:00
wm4
ebd41bdf6c command: playlist property: return if an entry is currently playing
This actually doesn't even write/return the new sub-property, because
I dislike the idea of dumping that field for every single playlist
entry, even though it's "needed" only for one.

Fixes #1260.
2014-11-17 22:16:52 +01:00
wm4
fb86750a67 ao_alsa: check for EAGAIN too
Simply retry on EAGAIN.

I've seen this in several other projects; it might be just cargo-culting
though.
2014-11-17 20:07:59 +01:00
wm4
8b2798cb3e audio/out: switch back to wasapi as default on win32
dsound was set as default, because there were some hard to fix problems
with wasapi. These problems were probably fixed now, so let's try with
wasapi as default again.
2014-11-17 14:07:11 +01:00
Kevin Mitchell
313f1954c5 Merge branch 'wasapi_fix2' 2014-11-17 05:02:18 -08:00
Kevin Mitchell
4c8b841fc4 ao/wasapi: request ao reload on thread_feed failures
Even with change notifications, there are still (rare) cases when the
feed thread gets AUDCLIENT_DEVICE_INVALIDATED. So handle failures in
thread_feed by requesting ao_reload.
2014-11-17 04:31:22 -08:00
Kevin Mitchell
9371990bd1 ao/wasapi: add retry loop on AUDCLNT_E_DEVICE_IN_USE
this works around reinitializing too fast on device property changes
2014-11-17 04:31:22 -08:00
Kevin Mitchell
6c512892d4 ao/wasapi: request reset on appropriate events
on changes to PKEY_AudioEngine_DeviceFormat, device status, and default device.
call ao_reload directly in the change_notify "methods".

this requires keeping a device enumerator around for the duration of
execution, rather than just for initially querying devices
2014-11-17 04:31:20 -08:00
Kevin Mitchell
e647f202ed ao/wasapi: add convenience functions for change notifiy 2014-11-17 04:30:53 -08:00
Jonathan Yong
f29f16663a ao/wasapi: new wasapi device monitoring interface
Implement skeleton IMMNotificationClient to watch for changes in the
sound device.  This will make recovery possible from changes shared
mode sample rate, bit depth, "enhancements"/effects and even graceful
device removal.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd371417%28v=vs.85%29.aspx

Signed-off-by: Kevin Mitchell <kevmitch@gmail.com>
2014-11-17 04:30:53 -08:00
Kevin Mitchell
497df443c0 ao/wasapi: look for "multimedia" default device instead of "console"
console is more for system notifications / voice command, mpv is most certainly multimedia

http://msdn.microsoft.com/en-us/library/windows/desktop/dd370842%28v=vs.85%29.aspx
2014-11-17 04:30:53 -08:00
Kevin Mitchell
e8dbdf1eb9 ao/wasapi: put loading of default device in it's own function 2014-11-17 04:30:47 -08:00
Kevin Mitchell
f7c26230eb ao/wasapi: fix possible null dereference of pDevice
IMMDeviceEnumerator::GetDefaultAudioEndpoint may set pDevice to null on failure.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd371401%28v=vs.85%29.aspx
2014-11-17 04:13:52 -08:00
Kevin Mitchell
3da6f723c6 ao/wasapi: tidy up better on failure
Before, failures, particularly in the thread loop init, could lead to a
bad state for the duration of mpvs execution. Make sure that
everything that was initialized gets properly and safely
uninitialized.
2014-11-17 04:13:52 -08:00
Kevin Mitchell
e28102f1a8 ao/wasapi: improve error messages and add more debug statements
also enforce more consistency in the exit codes and error handling

thanks to Jonathan Yong <10walls@gmail.com>
2014-11-17 04:13:49 -08:00
Kevin Mitchell
d4393be0f9 ao/wasapi: make calling of thread_init consistent with thread_uninit 2014-11-17 03:37:07 -08:00
Kevin Mitchell
6eb5c6d186 ao/wasapi: reenable the reset function
the race condition that necessitated disabling
this was fixed in
e440352313
2014-11-17 03:37:07 -08:00
Jonathan Yong
227f0e3f39 ao/wasapi: fix leaked deviceID 2014-11-17 03:36:54 -08:00
wm4
f4804b0c45 lua: subprocess: remove minor code duplication
Now that the code for stderr and stdout does exactly the same things,
and the specialization is in the callbacks, this is blatantly
duplicated.

Also, define a typedef for those callbacks to reduce the verbosity.
2014-11-16 19:18:23 +01:00
wm4
4cf1843664 demux_mkv: check file type without actually reading data
Do a minimal check on data read with stream_peek(). This could help with
probing from unseekable streams in some situations. (We could check the
entire EBML and Matroska headers, but probably not worth the trouble. We
could also seek back to the start, which demux.c doesn't do, but which
would work usually - also not worth the trouble.)
2014-11-16 18:51:56 +01:00
wm4
78cbbb4c49 demux_cue: use stream_peek()
This could cause probing failures with unseekable streams. (Although I'm
not perfectly sure why; seeking back should work in this particular
case.)
2014-11-16 18:13:41 +01:00
wm4
613ee8f450 restore-old-bindings.conf: add recently changed binding 2014-11-16 18:09:40 +01:00
James Ross-Gowan
ebccfc4351 lua: subprocess: add Windows implementation
Doesn't handle mp_cancel yet.
2014-11-16 18:08:02 +01:00
ChrisK2
c372856c11 input.conf: Don't make ENTER exit the player
Apparently this is confusing.
2014-11-15 23:10:28 +01:00
ahoka
b4a147bbe2 man: document osc seekbarstyle option 2014-11-15 20:20:54 +01:00
ahoka
e7b45b1efa osc: add validation for string user options 2014-11-15 20:20:52 +01:00
ahoka
6de303c339 osc: add seekbarstyle option 2014-11-15 20:20:50 +01:00
Ben Boeckel
07c4d67565 umpv: update comment for the new FIFO location 2014-11-15 20:20:06 +01:00
wm4
2125e49422 sub: workaround braindead libass API
libass won't use embedded fonts, unless ass_set_fonts() (called by
mp_ass_configure_fonts()) is called. However, we call this function when
the ASS_Renderer is initialized, which is long before the .ass file is
actually loaded. (I'm not sure why it tries to keep 1 ASS_Renderer, but
it always did this.)

Fix by calling mp_ass_configure_fonts() after loading them. This also
means this function will be called multiple times - hopefully this is
harmless (it will reinit fontconfig every time, though).

While we're at it, also initialize the ASS_Renderer lazily.

Fixes #1244.
2014-11-15 19:43:43 +01:00
wm4
a6694d2788 demux_mkv: adjust subtitle preroll again (2)
Make the changes started in commit c827ae5f more eloborate, and provide
an option to control the amount of data read before the seek-target. To
achieve this, rewrite the loop that finds the lowest still acceptable
target cluster. It is now searched by time instead of file position. The
behavior (both with and without preroll option) may be different from
before this change, although it shouldn't be worse.

The change demux_mkv_read_cues() fixes a bug: when seeking after playing
normally, the code would erroneously assume that durations are set. This
doesn't happen if the first operation after loading was a seek instead
of playback.
2014-11-15 00:55:30 +01:00
wm4
d484cb3f32 vo_opengl: allow setting different filters for downscaling 2014-11-14 15:22:37 +01:00
wm4
508d236c9a command: list filters/VOs/AOs with option-info
Another special-case, but pretty simple after all.
2014-11-14 14:52:51 +01:00
wm4
5d12a2696e command: export some option metadata
This might be interesting for GUIs and such.

It's probably still a little bit insufficient. For example, the filter
and audio/video output lists are not available through this.
2014-11-13 18:01:27 +01:00
wm4
71168e740e command: rename "option-flags" property to "option-info" 2014-11-13 17:27:31 +01:00
wm4
13033ce2c4 command: make sub-properties more flexible
This makes it work with all kind of types, instead of just some simple
ones.
2014-11-13 17:26:22 +01:00
wm4
dbf59abe05 command: fix weird stuff
Happens to fix some aspects of some properties (especially reading
"option-flags/x" as native value).
2014-11-13 17:25:04 +01:00
wm4
23e0682dd4 command: export mpv configure arguments as property
It seems strange that a client API user can't get this string, other
than analyzing the mpv log output.
2014-11-13 16:18:40 +01:00
Rudolf Polzer
0f30803172 terminal-unix: Add some comments about FD use. 2014-11-13 12:25:43 +01:00
Rudolf Polzer
a09f7a371e terminal-unix: Fix initial terminal state.
When mpv is backgrounded initially (via & in the shell), do no longer
change terminal settings on startup. This fixes broken local echo after
launching a backgrounded mpv.
2014-11-13 12:25:43 +01:00
wm4
09e08bfe2e demux: update cache state when paused
This was removed in commit 480f82fa. This caused the cache display not
to update while paused, because the update_cache() function is never
called in the thread (now I remember why the extra call was "needed").

The old implementation intentionally run update_cache() only before
waiting on a mutex, with no further checks for the condition variable.
In theory, this is strictly not sane, but since it was just for the
retrieval of the very fuzzy cache status, it was ok. Now we want to call
update_cache() outside of the mutex though - which means that in order
to avoid missed wakeups, a proper condition has to be used.
2014-11-12 21:47:41 +01:00
wm4
be9eb08389 af: remove redundant function 2014-11-12 20:19:21 +01:00
wm4
a669a1d0dd af: check audio params for validity
Normally, these should be valid anyway, so this is just being cautious.
2014-11-12 20:03:04 +01:00
wm4
e9792326e3 mp_image: slightly better image params verbose info 2014-11-12 19:30:59 +01:00
wm4
4136531343 video: move formatting of image parameters to separate function 2014-11-12 19:30:59 +01:00
wm4
509997ec12 vf: minor simplification
Remove the extra vf_chain.output field - there's absolutely no need for
it, because there is always a last filter which will buffer the output.

For some reason, vf_chain.last was never set, which we now need to fix
too.
2014-11-12 19:30:59 +01:00
wm4
b244d5d817 manpage: adjust --hwdec docs 2014-11-12 19:30:58 +01:00
wm4
a9ece6371f player: simplify audio uninit on segment switches
The purpose of temporarily setting stop_play was to make the audio
uninit code to explicitly drain audio if needed. This was the only way
to do it before ao_drain() was made a separate function; now we can just
do it explicitly instead.
2014-11-12 19:30:58 +01:00
wm4
f0efd0b100 audio: fix some issues when reloading the AO
We absolutely need to clear the AO reference in the mixer.

The audio_status must be changed to a state where no code assumes that
the AO is available. (It's allowed to do this blindly.)
2014-11-12 14:19:16 +01:00