summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* demux_mkv: haali hack: add last frame duration to video length toowm42014-11-201-2/+3
| | | | | From what I can see, only the blockduration of the packet needs to be added, never the "default duration".
* Catch SIGPIPEwm42014-11-201-0/+3
| | | | | | | | | | | | | | Avoids a crash if OpenSSL tries to write to a broken connection with write(). Obviously OpenSSL really should use send() with MSG_NOSIGNAL, but for some reason it doesn't. This should probably be considered an OpenSSL bug, but since in this case we "own" the process, there is no harm in ignoring the signal. This is not done with libmpv, because as a library we don't want to mess with global state. It's also not done if terminal handling is disabled - this is a bit arbitrary, but I don't care much.
* vd_lavc: flush frames before uninitializing hw decoderwm42014-11-201-0/+3
| | | | | | This way, no surfaces are in use when uninitializing the hw decoders, which might help with -copy hw decoders (normal hw decoding is not affected).
* options: add --ytdl-format option for youtube-dl formatJaime Marquínez Ferrándiz2014-11-204-3/+22
| | | | | | | | | It's passed with the '--format' option to youtube-dl. If it isn't set, we don't pass '--format best' so that youtube-dl can use the options from its configuration file. Signed-off-by: wm4 <wm4@nowhere>
* manpage: changes.rst: add youtube-dl scriptwm42014-11-191-0/+4
|
* input.conf: add some additional bindingswm42014-11-192-0/+11
|
* player: integrate ytdl_hook.luawm42014-11-197-18/+28
|
* lua: add youtube-dl hook scriptChrisK22014-11-191-0/+163
| | | | | | | This merely adds the file without using it, for the sake of retaining authorship information. Signed-off-by: wm4 <wm4@nowhere>
* manpage: fix typowm42014-11-191-1/+1
|
* demux_mkv: add an option for compatibility with Haaliwm42014-11-185-0/+75
| | | | This was requested on IRC.
* manpage: document vo_cmdline commandwm42014-11-181-1/+8
|
* command: add an ab_loop commandwm42014-11-185-2/+31
| | | | | | As suggested in #1241; to make using the feature easier. Also add better OSD-formatting for the ab-loop-a/b properties.
* command: improve A-B loop behaviorwm42014-11-183-3/+16
| | | | | | If the B point is set, then loop back to A. Also, update the OSD bar if necessary.
* ao/wasapi: actually only retry once (not twice)Kevin Mitchell2014-11-181-2/+1
|\ | | | | | | oops
| * ao/wasapi: only retry resizing the buffer onceKevin Mitchell2014-11-181-8/+10
| | | | | | | | | | | | like the MSDN example: http://msdn.microsoft.com/en-us/library/windows/desktop/dd370875%28v=vs.85%29.aspx
* | vo_direct3d: fix texture-memory sub-option, extend itwm42014-11-182-16/+35
| | | | | | | | | | | | | | | | | | | | This sub-option was turned into a flag when the sub-option parser was changed to the generic one (probably accidentally). Turn it into a proper choice-option. Also, adjust what the options do. Though none of this probably makes much sense; the default should work, and if it doesn't, the GPU/driver is probably beyond help.
* | ao/wasapi: only retry resizing the buffer onceKevin Mitchell2014-11-181-8/+11
|/ | | | | | like the MSDN example: http://msdn.microsoft.com/en-us/library/windows/desktop/dd370875%28v=vs.85%29.aspx
* ao/wasapi: keep bufferPeriod in sync on retryKevin Mitchell2014-11-181-1/+4
| | | | | Without this, the retry will fail if they are not equal or bufferPeriod is zero.
* ao/wasapi: refix printf warning for both cygwin and msysKevin Mitchell2014-11-181-2/+2
| | | | a cast to (unsigned) should do "the right thing".
* ao/wasapi: periodicity in shared mode must be zeroKevin Mitchell2014-11-181-3/+6
| | | | | | 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
* ao/wasapi: increase buffer size to 50 msKevin Mitchell2014-11-183-16/+26
| | | | | Before it was the default device period, which was too small causing glitches on on entering/exiting fullscreen.
* stream: reduce ifdeffery for win32 somewhatwm42014-11-182-16/+8
| | | | Remove the ones which are not strictly needed.
* lua: subprocess: support cancellation on WindowsJames Ross-Gowan2014-11-181-1/+9
|
* stream: signal a Windows event object on cancelJames Ross-Gowan2014-11-182-0/+35
| | | | | This will be used in the following commit to cancel subprocesses started by Lua.
* lua: subprocess: use overlapped I/O on WindowsJames Ross-Gowan2014-11-181-56/+133
| | | | | | | 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.
* command: initialize a-b loop options correctlywm42014-11-181-0/+1
| | | | | It was initialized as 0/0, which basically cleared the chapter marks by default.
* audio/out: always log retrieved audio device sizewm42014-11-181-2/+2
|
* ao/wasapi: fix leaked marshaled interface streamsJonathan Yong2014-11-181-0/+9
| | | | Signed-off-by: Kevin Mitchell <kevmitch@gmail.com>
* ao/wasapi: Don't free stuff the thread may still be using on timeoutKevin Mitchell2014-11-171-1/+3
| | | | | In the unlikely event of a timeout waiting for the audio thread to return, don't free stuff that it may still be using.
* ao/wasapi: also free the threadLoop handle on uninitKevin Mitchell2014-11-171-0/+1
| | | | http://msdn.microsoft.com/en-us/library/windows/desktop/ms682453%28v=vs.85%29.aspx
* ao/wasapi: fix leaked event handlesKevin Mitchell2014-11-171-6/+5
|
* ao/wasapi: fix race condition in uninit on failure.Kevin Mitchell2014-11-171-2/+1
| | | | | | | | | 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.
* ao/wasapi: silence format string warningsJames Ross-Gowan2014-11-182-2/+2
|
* command: implement A-B loopswm42014-11-187-11/+85
| | | | | | | | | | | | | 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.
* wscript: move down some less important checkswm42014-11-171-8/+8
|
* build: check for mingw-w64 explicitlywm42014-11-171-1/+16
| | | | | And fail building if not any of MingW-w64 or POSIX are found. Obviously, mpv needs one of those 2.
* command: adjust previous commitwm42014-11-172-7/+10
| | | | | | | | 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.
* command: playlist property: return if an entry is currently playingwm42014-11-172-0/+10
| | | | | | | | 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.
* ao_alsa: check for EAGAIN toowm42014-11-171-1/+1
| | | | | | | Simply retry on EAGAIN. I've seen this in several other projects; it might be just cargo-culting though.
* audio/out: switch back to wasapi as default on win32wm42014-11-171-3/+3
| | | | | | 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.
* Merge branch 'wasapi_fix2'Kevin Mitchell2014-11-176-148/+523
|\
| * ao/wasapi: request ao reload on thread_feed failuresKevin Mitchell2014-11-171-0/+2
| | | | | | | | | | | | 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.
| * ao/wasapi: add retry loop on AUDCLNT_E_DEVICE_IN_USEKevin Mitchell2014-11-171-0/+12
| | | | | | | | this works around reinitializing too fast on device property changes
| * ao/wasapi: request reset on appropriate eventsKevin Mitchell2014-11-174-56/+117
| | | | | | | | | | | | | | | | 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
| * ao/wasapi: add convenience functions for change notifiyKevin Mitchell2014-11-171-0/+49
| |
| * ao/wasapi: new wasapi device monitoring interfaceJonathan Yong2014-11-173-0/+180
| | | | | | | | | | | | | | | | | | | | | | 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>
| * ao/wasapi: look for "multimedia" default device instead of "console"Kevin Mitchell2014-11-171-2/+2
| | | | | | | | | | | | 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
| * ao/wasapi: put loading of default device in it's own functionKevin Mitchell2014-11-171-17/+30
| |
| * ao/wasapi: fix possible null dereference of pDeviceKevin Mitchell2014-11-171-0/+1
| | | | | | | | | | | | IMMDeviceEnumerator::GetDefaultAudioEndpoint may set pDevice to null on failure. http://msdn.microsoft.com/en-us/library/windows/desktop/dd371401%28v=vs.85%29.aspx
| * ao/wasapi: tidy up better on failureKevin Mitchell2014-11-173-14/+26
| | | | | | | | | | | | | | 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.
| * ao/wasapi: improve error messages and add more debug statementsKevin Mitchell2014-11-174-98/+140
| | | | | | | | | | | | also enforce more consistency in the exit codes and error handling thanks to Jonathan Yong <10walls@gmail.com>
| * ao/wasapi: make calling of thread_init consistent with thread_uninitKevin Mitchell2014-11-173-3/+5
| |
| * ao/wasapi: reenable the reset functionKevin Mitchell2014-11-171-1/+1
| | | | | | | | | | | | the race condition that necessitated disabling this was fixed in e4403523131a69a92a8418bb3714090a408680c7
| * ao/wasapi: fix leaked deviceIDJonathan Yong2014-11-171-0/+1
| |
* | lua: subprocess: remove minor code duplicationwm42014-11-161-31/+22
| | | | | | | | | | | | | | | | 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.
* | demux_mkv: check file type without actually reading datawm42014-11-161-0/+7
| | | | | | | | | | | | | | | | 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.)
* | demux_cue: use stream_peek()wm42014-11-161-6/+2
| | | | | | | | | | | | This could cause probing failures with unseekable streams. (Although I'm not perfectly sure why; seeking back should work in this particular case.)
* | restore-old-bindings.conf: add recently changed bindingwm42014-11-161-0/+4
| |
* | lua: subprocess: add Windows implementationJames Ross-Gowan2014-11-161-46/+257
|/ | | | Doesn't handle mp_cancel yet.
* input.conf: Don't make ENTER exit the playerChrisK22014-11-152-2/+2
| | | | Apparently this is confusing.
* man: document osc seekbarstyle optionahoka2014-11-152-1/+5
|
* osc: add validation for string user optionsahoka2014-11-151-0/+16
|
* osc: add seekbarstyle optionahoka2014-11-151-0/+5
|
* umpv: update comment for the new FIFO locationBen Boeckel2014-11-151-1/+1
|
* sub: workaround braindead libass APIwm42014-11-153-10/+14
| | | | | | | | | | | | | | | | 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.
* demux_mkv: adjust subtitle preroll again (2)wm42014-11-154-3/+35
| | | | | | | | | | | | | | 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.
* vo_opengl: allow setting different filters for downscalingwm42014-11-143-3/+12
|
* command: list filters/VOs/AOs with option-infowm42014-11-141-0/+11
| | | | Another special-case, but pretty simple after all.
* command: export some option metadatawm42014-11-134-3/+60
| | | | | | | 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.
* command: rename "option-flags" property to "option-info"wm42014-11-132-6/+6
|
* command: make sub-properties more flexiblewm42014-11-133-15/+13
| | | | | This makes it work with all kind of types, instead of just some simple ones.
* command: fix weird stuffwm42014-11-131-0/+1
| | | | | Happens to fix some aspects of some properties (especially reading "option-flags/x" as native value).
* command: export mpv configure arguments as propertywm42014-11-132-0/+11
| | | | | It seems strange that a client API user can't get this string, other than analyzing the mpv log output.
* terminal-unix: Add some comments about FD use.Rudolf Polzer2014-11-131-0/+8
|
* terminal-unix: Fix initial terminal state.Rudolf Polzer2014-11-131-1/+1
| | | | | | 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.
* demux: update cache state when pausedwm42014-11-121