summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* travis: another attemptwm42014-11-211-4/+2
| | | | I guess it didn't like the duplicate env section.
* build: don't build win32 mpv.com wrapper with --disable-cplayerwm42014-11-211-13/+14
| | | | It'll be useless.
* travis: attempt to add Coverity integrationwm42014-11-211-0/+15
| | | | | Not sure if this will work. Probably not, because it seems Coverity will be missing some required dependencies.
* lua: add a way to add repeatable key bindingswm42014-11-212-4/+10
| | | | For these, autorepeat is enabled.
* input: add a prefix to make any binding act on key repeatwm42014-11-205-4/+10
| | | | | | The fact that it's a generic command prefix that is parsed even when using the client API is a bit unclean (because this flag makes sense for actual key-bindings only), but it's less code this way.
* command: dvd: better audio/video recovery on angle switchingwm42014-11-201-5/+2
| | | | | | | | Does the same thing as the drop_buffers command. When implementing that command, it turned out that resetting the higher level playback state was more effective for achieving smooth recovery. Untested; I don't even have any DVDs or DVD images with multiple angles.
* command: add drop_bufferswm42014-11-204-0/+18
| | | | | | | | | | | | | | | This command was actually requested on IRC ages ago, but I forgot about it. The main purpose is that the decoding state can be reset without issuing a seek, in particular in situations where you can't seek. This restarts decoding from the middle of the packet stream; since it discards the packet buffer intentionally, and the decoder will typically not output "incomplete" frames until it has recovered, it can skip a large amount of data. It doesn't clear the byte stream cache - I'm not sure if it should.
* 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