| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Without this, the retry will fail if they are not equal or
bufferPeriod is zero.
|
|
|
|
| |
a cast to (unsigned) should do "the right thing".
|
|
|
|
|
|
| |
IAudioClient::Initialize hnsPeriodicity argument is nonzero only for exclusive mode
http://msdn.microsoft.com/en-us/library/windows/desktop/dd370805%28v=vs.85%29.aspx
|
|
|
|
|
| |
Before it was the default device period, which was too small
causing glitches on on entering/exiting fullscreen.
|
|
|
|
| |
Remove the ones which are not strictly needed.
|
| |
|
|
|
|
|
| |
This will be used in the following commit to cancel subprocesses started
by Lua.
|
|
|
|
|
|
|
| |
Instead of threads, use overlapped (asynchronous) I/O to read from both
stdout and stderr. Like in d0643fa, stdout and stderr could be closed at
different times, so a sparse_wait function is added to wrap
WaitForMultipleObjects and skip NULL handles.
|
|
|
|
|
| |
It was initialized as 0/0, which basically cleared the chapter marks by
default.
|
| |
|
|
|
|
| |
Signed-off-by: Kevin Mitchell <kevmitch@gmail.com>
|
|
|
|
|
| |
In the unlikely event of a timeout waiting for the audio thread to return,
don't free stuff that it may still be using.
|
|
|
|
| |
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682453%28v=vs.85%29.aspx
|
| |
|
|
|
|
|
|
|
|
|
| |
When the audio thread fails to properly init, it signals failure
to the main thread, AND THEN starts to clean up. For this to work,
ao_init callback must not return until the thread's cleanup is finished.
This is correctly handled in the ao_uninit callback by waiting for
the thread to exit, so just call that to clean up the main thread.
I have no idea why I didn't do this in the first place.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Probably needs to be polished a bit more. Also, might require a key
binding that can set/clear the loop points in a more intuitive way.
For now, something like this can be put into input.conf to use it:
ctrl+y set ab-loop-a ${time-pos} # set A
ctrl+x set ab-loop-b ${time-pos} # set B
ctrl+c set ab-loop-a no # clear (mostly)
Fixes #1241.
|
| |
|
|
|
|
|
| |
And fail building if not any of MingW-w64 or POSIX are found. Obviously,
mpv needs one of those 2.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Simply retry on EAGAIN.
I've seen this in several other projects; it might be just cargo-culting
though.
|
|
|
|
|
|
| |
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.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
this works around reinitializing too fast on device property changes
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| |
| |
| |
| |
| |
| | |
IMMDeviceEnumerator::GetDefaultAudioEndpoint may set pDevice to null on failure.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd371401%28v=vs.85%29.aspx
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
also enforce more consistency in the exit codes and error handling
thanks to Jonathan Yong <10walls@gmail.com>
|
| | |
|
| |
| |
| |
| |
| |
| | |
the race condition that necessitated disabling
this was fixed in
e4403523131a69a92a8418bb3714090a408680c7
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.)
|
| |
| |
| |
| |
| |
| | |
This could cause probing failures with unseekable streams. (Although I'm
not perfectly sure why; seeking back should work in this particular
case.)
|
| | |
|
|/
|
|
| |
Doesn't handle mp_cancel yet.
|
|
|
|
| |
Apparently this is confusing.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Another special-case, but pretty simple after all.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This makes it work with all kind of types, instead of just some simple
ones.
|
|
|
|
|
| |
Happens to fix some aspects of some properties (especially reading
"option-flags/x" as native value).
|
|
|
|
|
| |
It seems strange that a client API user can't get this string, other
than analyzing the mpv log output.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Normally, these should be valid anyway, so this is just being cautious.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
|
|
|
|
|
|
| |
When initialization failed, vo_lavc may cause an irrecoverable state in
the ffmpeg-related structs. Therefore, we reject additional
initialization attempts at least until we know a better way to clean up
the mess.
ao_lavc currently cannot be initialized more than once, yet it's good to
do consistent changes there as well.
Also, clean up uninit-after-failure handling to be less spammy.
|
|
|
|
|
| |
If input.conf e.g. contains "n osd-msg playlist_next", then pressing the
n key will switch to the next file, and display the filename on OSD.
|
|
|
|
|
|
|
|
|
|
|
| |
The mp_audio_from_avframe() function requires the AVFrame to be
refcounted, and merely increases its refcount while referencing the same
data. For non-refcounted frames, it simply did nothing and potentially
would make the caller pass around a frame with dangling pointers.
(libavcodec should always return refcounted frames, but it's not clear
what other code does; and also the function should simply work, instead
of having weird requirements on its arguments.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert commit 24e52f66; even though the old beheavior doesn't make sense
(as the commit message assured), it turns out that this works better:
typically, it means preroll will start from the previous video key frame
(the video CUE index will contain clusters with video key frames only),
which often coincides with subtitle changes. Thus the old behavior is
actually better.
Change the code that uses CueDuration elements. Instead of merely
checking whether preroll should be done, find the first cluster that
needs to be read to get all subtitle packets. (The intention is to
compensate for the enlarged preroll cluster-range due to reverting
commit 24e52f66.)
|
|
|
|
|
|
| |
The previous fix breaks another obscure case: if the second vf_sub adds
margins, the image is accidentally not extended, which would return in
an assertion failure when returning the bogus image.
|
|
|
|