summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* player: fix --frameswm42014-10-142-2/+4
| | | | | | | | | 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
* DOCS/client_api_examples: qtexample: remove debugging codewm42014-10-141-2/+1
| | | | Forgotten.
* client API: qthelper: fix bugswm42014-10-141-1/+3
| | | | Pretty dumb oversights.
* DOCS/client_api_examples: qtexample: stuffwm42014-10-133-7/+31
| | | | | | Dump chapters and track list to the log for demo purposes. Compile in debug mode.
* client API: add qthelper.hppwm42014-10-134-2/+237
| | | | | | | | | | | | | | 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.
* ta/README: fix typoswm42014-10-131-2/+2
|
* ao_wasapi: implement device listingwm42014-10-133-10/+32
|
* ao_dsound: implement device listingwm42014-10-131-20/+86
|
* ao_portaudio: implement device listingwm42014-10-131-2/+24
|
* ao_openal: implement device listingwm42014-10-131-1/+16
|
* audio/out: add "auto" pseudo-devicewm42014-10-131-1/+3
| | | | | Also, don't set an empty string for the fallback device if an AO doesn't list any devices.
* demux_mkv: fix undefined behaviorwm42014-10-131-1/+1
| | | | | | | With some files, the extradata variable can remain uninitialized, but will be used for memory access. CC: @mpv-player/stable (with high priority)
* vf_vapoursynth: add debug message when returning error from GetFramewm42014-10-131-0/+1
| | | | | Some filters still (or will) behave badly on these errors, so explicitly log when it happens.
* x11: don't wait for asynchronous X resizing with window-scalewm42014-10-131-3/+4
| | | | | | | | | | | | | | | 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.)
* vf_vapoursynth: don't error if invoke() doesn't return a clipwm42014-10-121-3/+2
| | | | | Not all functions are for creating filters. Consider for example LoadPlugin.
* vf_vapoursynth: resolve paths relative to home/configwm42014-10-121-0/+3
| | | | | This affects the script filename passed to the filter. Resolve "~" (and some other variants) as described in the "Paths" section of mpv.rst.
* demux: fix a commentwm42014-10-121-2/+1
| | | | Don't refer to fields that were removed.
* coreaudio: use the new device selection APIStefano Pigozzi2014-10-124-54/+28
| | | | | The CoreAudio API is built around device IDs so we store the integer as string and read it back.
* af_lavcac3enc: fix byte orderwm42014-10-121-2/+2
| | | | | | | | Oops. Fixes #1172. CC: @mpv-player/stable
* DOCS/edl-mpv: minor clarificationwm42014-10-121-1/+1
|
* gl_x11: distinguish missing GLX and too old GLX versionswm42014-10-121-3/+5
| | | | | | This probably led to confusing output. CC: @mpv-player/stable
* vf_vapoursynth: add standalone Lua scriptingwm42014-10-127-19/+326
|
* vf_vapoursynth: abstract scripting backendwm42014-10-121-28/+87
| | | | | | 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.
* libmpv/cocoa: allow clients to use mpv event systemStefano Pigozzi2014-10-123-36/+54
| | | | | | | | | | 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!
* cocoa: remove usage of Objective-C categoriesStefano Pigozzi2014-10-125-89/+37
| | | | | Objective-C categories need special linker flags from the user when statically linking (-ObjC LDFLAG), so make everyone's life simpler and remove them.
* command: don't display non-sense if volume is unavailablewm42014-10-111-1/+1
| | | | | | | | | 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
* command: make volume/mute unavailable if audio is not initializedwm42014-10-111-6/+4
| | | | | | | | | | 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.
* build: remove useless functionStefano Pigozzi2014-10-111-3/+0
|
* build: update waf to version 1.8.1Stefano Pigozzi2014-10-114-21/+9
| | | | Fixes #1164
* vf_vapoursynth: return dummy frames if frames are requested during initwm42014-10-111-1/+12
| | | | | | An attempt at fixing #1168. I see black frames flashing, so it's certainly not perfect.
* vf_vapoursynth: factor stuffwm42014-10-111-13/+25
|
* vf_vapoursynth: when seeking, recreate only if it's already createdwm42014-10-111-1/+2
|
* x11: don't wait until window is destroyedwm42014-10-111-5/+0
| | | | | | | | | | 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.
* build: install input config files into doc dirwm42014-10-111-0/+5
| | | | | Users using binary packages don't have obvious access to them, so this seems like a good idea.
* client API: check result ptr in mpv_command_nodeJames Ross-Gowan2014-10-121-1/+1
| | | | This follows the docs, which say the result parameter is optional.
* libmpv/mpv.def: add mpv_command_node[_async]James Ross-Gowan2014-10-121-0/+2
|
* build: make zsh completion directory configurablePhilip Sequeira2014-10-112-1/+2
| | | | Also, use the zsh default location (rather than the Debian one).
* vf_vapoursynth: fail gracefully if filter init requests frameswm42014-10-111-0/+10
| | | | | | | | | | | | | | | | | 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.
* lua: add command_native() functionwm42014-10-112-0/+32
| | | | This is the Lua equivalent of mpv_command_node().
* client API: add mpv_command_node[_async]wm42014-10-113-6/+63
| | | | | | | | | 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.
* etc/mplayer-input.conf: fix off by one errorwm42014-10-101-1/+1
| | | | | | | | | 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
* input: remove some unneeded codewm42014-10-101-59/+25
|
* input: cosmetics: move codewm42014-10-101-68/+69
|
* input: use mpv_node parser for char** command parserswm42014-10-106-64/+43
| | | | Minor simplification, also drops some useless stuff.
* input: add a function to parse mpv_node as commandwm42014-10-102-62/+162
| | | | For future client API enhancements.
* command: make audio device list available to the client APIwm42014-10-102-0/+53
|
* audio: don't list encoder AO with --audio-device=helpwm42014-10-101-0/+2
|
* player: fix terminal status in idle modewm42014-10-101-0/+1
| | | | That's what this variable is for. This was missed in commit 9d5d031b.
* player: don't mess up cursor visibility statewm42014-10-101-1/+1
| | | | | | | | | | | | 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
* ao_pulse: implement AO device listing APIwm42014-10-101-1/+38
| | | | | | | | | | | | | | | | 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.)
* ao_pulse: move setup code to separate functionwm42014-10-101-23/+48
| | | | | | | All the dumb crap in pa_init_boilerplate() is needed to talk to the audio server at all. Might also fix some subtle bugs in the init code (which is strange, because the original file was contributed by the devil himself).
* audio: change internal device listing APIwm42014-10-105-28/+54
| | | | | Now we run ao_driver->list_devs on a dummy AO instance, which will probably confuse everyone. This is done for the sake of PulseAudio.
* player: exit if audio init fails and there's no videowm42014-10-101-0/+2
| | | | | | Seems logical. For some reason, the player allows deselecting both audio and video stream without quitting (a deliberate feature of which I have no idea why it was added years ago), so this is needed.
* player: signal EOF when using --frameswm42014-10-102-2/+2
|
* player: minor simplificationwm42014-10-102-8/+2
|
* player: don't close audio device in gapless modewm42014-10-101-2/+1
| | | | I don't see much of a reason for this extra corner case.
* player: --save-position-on-quit should always work (2)wm42014-10-102-5/+5
| | | | | This reimplements the feature reverted in the previous commit in a different way.
* Revert "player: --save-position-on-quit should always work"wm42014-10-103-8/+5
| | | | | | | | | This reverts commit 45c8b97efbaff7a5031b008223eeed56f7b0607a. Some else complained (github issue #1163). The feature requested in #1148 will be implemented differently in the following commit.
* Add some missing "const"swm42014-10-109-14/+16
| | | | | | | The one in msg.c was mistakenly removed with commit e99a37f6. I didn't actually test the change in ao_sndio.c (but obviously "ap" shouldn't be static).
* audio/out/push: make draining slightly more robustwm42014-10-101-1/+1
| | | | | | | | Don't wait after the audio thread has pushed the remaining audio to the AO. Avoids hard hangs if the heuristic fails completely (could still happen if get_delay returns absurd values). CC: @mpv-player/stable
* audio/out/push: fix EOF heuristicwm42014-10-102-23/+14
| | | | | | | | | | | | | Since the internal AO driver API has no proper way to determine EOF, we need to guess by querying get_delay. But some AOs (e.g. ao_pulse with no-latency-hacks set) may never reach 0, maybe because they naively add the latency to the buffer level. In this case our heuristic can break. Fix by always using the delay to estimate the EOF time. It's not even that important - it's mostly used to avoid blocking draining. So this should be ok. CC: @mpv-player/stable (maybe)
* fix -Wvisibility warnings with clangStefano Pigozzi2014-10-091-2/+1
| | | | Now everything compiles with no warnings! yay!
* cocoa: post keydown and keyup events without event monitorStefano Pigozzi2014-10-095-0/+20
| | | | | Our code worked under the assumption that the event monitor is always active and we did remove the keydown and keyup overrides from our cocoa view.
* fix -Wduplicate-decl-specifier warnings with clangStefano Pigozzi2014-10-092-4/+4
|
* libmpv/cocoa: don't start the event monitorStefano Pigozzi2014-10-095-11/+35
| | | | | | The event monitor is used to get keyboard events when there is no window, but since it is a global monitor to the current process, we don't want it in a library setting.
* cocoa: fix 'uninitalized' accessStefano Pigozzi2014-10-091-9/+7
| | | | | I think this doesn't make a difference, since in Objective-C nil responds as a NullObject, but better not depend on this crappy language feature.
* libmpv/cocoa: make global events work and get rid of is_cplayerStefano Pigozzi2014-10-095-10/+15
| | | | | | | After @frau's split of macosx_events from macosx_application, `is_cplayer' is not needed anymore. At the moment only global events such as Media Keys and Apple Remote work, because the VO-level ones were hardcoded to be disabled. (that will be fix in a later commit ).
* manpage: fix --audio-pitch-correction descriptionAlessandro Ghedini2014-10-091-4/+4
| | | | Add closing ">" and specify what is the default value.
* x11: fix inverted conditionwm42014-10-091-2/+3
| | | | | | | Worryingly wrong. Fixes #1162. Also fix another issue (window title was set anyway), which was why I didn't notice this and testing it seemed to be fine.
* client API: add an explanatory commentwm42014-10-091-1/+1
| | | | | So someone reading this at least has a chance to find out what this is needed for.
* ao_alsa: implement device listing & selectionwm42014-10-091-0/+27
| | | | | | | Unfortunately, ALSA is particularly bad with this, because mpv has to add all sorts of magic crap to the device name to make things work. The device selection overrides this, so explicitly selecting devices will most likely break your audio. This has yet to be solved.
* audio: add device selection & listing with --audio-devicewm42014-10-097-6/+128
| | | | | | | Not sure how good of an idea this is. This commit doesn't add support for this to any AO yet; the AO implementations will follow later.
* manpage: improve --wid descriptionwm42014-10-091-8/+19
| | | | In particular, add a basic description of how Cocoa embedding works.
* client API: rename --input-x11-keyboard to --input-vo-keyboardwm42014-10-097-12/+18
| | | | | Apparently we need this for Cocoa too. (The option was X11 specific in the hope that only X11 would need this hack.)
* vf_lavfi: proper rounding for lavfi->mpv aspect ratiowm42014-10-091-2/+3
| | | | Or so I think. Not like it matters anyway.
* video: try harder to decode cover art picture only oncewm42014-10-091-2/+7
| | | | | | | | | | | | | | | | | For cover art, we pretend that the video stream is infinite, but also stop decoding once we have an image on the VO (this seems advantageous for the case when strange filters are inserted or the VO image gets lost). Since a while ago, the video chain started decoding 2 images though ("Non-monotonic video pts: 0.000000 <= 0.000000"), which is annoying and wasteful. Improve this by handling a certain corner case at initialization, which will decode a second image while the first one is still stuck in the filter chain. Also, just in case there are filters which buffer a lot, also force EOF filtering (which means we tell the filters to flush buffered frames). CC: @mpv-player/stable
* player: don't reset buffering pausing state on seekswm42014-10-091-1/+0
| | | | | |