aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
...
* options: change --sub-file behaviorGravatar wm42014-06-08
| | | | | | | | | | | | | | | | | | | --sub-file is actually a string list, so you can add multipel external subtitle files. But to be able to set a list, the option value was split on ",". This made it impossible to add filenames. One possible solution would be adding escaping. That's probably a good idea (and some other options already do this), but it's also complicated both to implement and for the user. The simpler solution is making --sub-file appending, and make it take only a single entry. I'm not quite sure about this yet. It breaks the invariant that if a value is printed and parsed, you get the same value back. So for now, just go with the simple solution. Fixes #840.
* client API: restructure waiting, do log msg wakeup properlyGravatar wm42014-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | Until now, availability of new log messages (through the mechanism associated with mpv_request_log_messages()) did not wakeup the client API properly. Commit 3b7402b5 was basically a hack to improve that somewhat, but it wasn't a solution. The main problem is that the client API itself is producing messages, so the message callback would attempt to lock the client API lock, resulting in a deadlock. Even if the lock was recursive, we'd run into lock-order issues. Solve this by using a separate lock for waiting and wakeup. Also, since it's a natural addition, avoid redundant wakeups. This means the wakeup callback as well as the wakeup pipe will be triggered only once until the next mpv_wait_event() call happens. This might make the wakeup callback be invoked in a reentrant way for the first time, for example if a mpv_* function prints to a log. Adjust the docs accordingly. (Note that non-reentrant beheavior was never guaranteed - basically the wakeup callback is somewhat dangerous and inconvenient.) Also remove some traces of unneeded code. ctx->shutdown for one was never set, and probably a leftover of an abandoned idea.
* client API: rename mpv_destroy() to mpv_detach_destroy()Gravatar wm42014-06-07
| | | | | | A bit verbose, but less misleading. In most cases, the API user probably actually wants mpv_terminate_destroy() instead, so the less-useful function shouldn't have a simnpler name anyway.
* client API: clarify mpv_get_wakeup_pipe docsGravatar wm42014-06-07
| | | | | | | | | | | It wasn't necessarily clear how this works. Especially make clear that the API user shouldn't expect that there's one byte per readable event in the wakeup pipe. Actually, the reason why this currently won't work is because property notifications can generate more events than wakeups. The limit of 4096 is a more fundamental issue, but the event ringbuffer is currently limited to 1000 entries anyway. Also add some important comments to mpv_set_wakeup_callback.
* client API: add API function that ensures total destructionGravatar wm42014-06-07
| | | | | | | | | | | | mpv_destroy() should perhaps better be called mpv_detach(), because it destroys only the handle, not necessarily the player. The player is only terminated if a quit command is sent. This function quits automatically, and additionally waits until the player is completely destroyed. It removes the possibility that the player core is still uninitializing, while all client handles are already destroyed. (Although in practice, the difference is usually not important.)
* client API: docs: some clarificationsGravatar wm42014-06-07
|
* client API: change mpv_wait_event() timeout semanticsGravatar wm42014-06-07
| | | | | | | | | Now a negative timeout mean an infinite timeout. This is similar to the poll() system call. Apparently this is more intuitive and less confusing than specifying a "very high" value as timeout if you want to wait forever. For callers that never pass negative timeouts, nothing changes.
* build: prevent installation of client API exampleGravatar wm42014-06-06
| | | | | | | | This was never intended to be installed; waf just picked it up automagically. There's also a closed ticket on github where someone complains that the program "simple" is installed, and I didn't realize at this point that it was actually installed by default when enabling the client API.
* client API: enlarge the message buffer if log level is highGravatar wm42014-06-06
|
* client API: call wakeup callback if there are new messagesGravatar wm42014-06-06
| | | | | | | | | | | | | | | | | | Listening on messages currently uses polling (every time mpv_wait_event() has no new events, the message buffer is polled and a message event is possibly created). Improve this situation a bit, and call the user-supplied wakeup callback. This will increase the frequency with which the wakeup callback is called, but the client is already supposed to be able to deal with this situation. Also, as before, calling mpv_wait_event() from the wakeup callback is forbidden, so the client can't read new messages from the callback directly. The wakeup pipe is written either. Since the wakeup pipe is created lazily, we can't access the pipe handle without creating a race condition or a deadlock. (This is actually very silly, since in practice the race condition won't matter, but for now let's keep it clean.)
* x11: cleanup motif hints handlingGravatar wm42014-06-06
| | | | | | | | It seems we can't really get rid of this. There are no other hints to remove decorations that work across all reasonable WMs, so we're stuck with the ugly motif stuff. But at least we can make the code for it less ugly.
* client API: fix terminal usageGravatar wm42014-06-06
| | | | | | By default this is disabled. But if it's enabled, then we have to account for proper states when enabling/disabling the terminal state itself.
* client API: don't update properties in uninitialized stateGravatar wm42014-06-06
| | | | | | If an API user calls mpv_wait_event() and mpv_observe_property() before mpv_initialize(), it could happen that a property was accessed before initialization, which is not ok.
* client API: don't use the mpv config files by defaultGravatar wm42014-06-06
| | | | | | | | | This was always intended this way, and even documented in client.h. Due to an oversight it was never actually implemented. The intention is that mpv embedded in applications and "real mpv" don't conflict. An API user can undo this by setting the "config" option to "yes", if using the user's mpv config is desired.
* client API: use shared code for creating the wakeup pipeGravatar wm42014-06-06
| | | | Should be equivalent, reduces code duplication.
* client API: fix swapped pipe ends used with mpv_set_wakeup_callbackGravatar wm42014-06-06
| | | | | This was extremely wrong. It was never tested because nobody ever used it (the feature was added for someone who never tried it in the end).
* input: don't print warning when aboting playback via commandsGravatar wm42014-06-06
| | | | I don't really see a reason for this.
* wscript: update waf version check to the version in bootstrap.pyGravatar wm42014-06-06
|
* sub: remove old style override optionGravatar wm42014-06-05
| | | | Didn't work too well.
* sub: add --ass-style-override=force optionGravatar wm42014-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (The old "force" choice of that option is renamed to "force-default".) This allows overriding native ASS script subtitle styles with the style provided by the --sub-text-* options (like --sub-text-font etc.). This is disabled by default, and needs to be explicitly enabled with the --ass-style-override=force option and input property. This uses in fact exactly the same options (--sub-text-*) and semantics as the ones used to configure unstyled text subtitles. It's recommended to combine this with this in the mpv config file: ass-force-style="ScaledBorderAndShadow=1" # work around dumb libass behavior Also, adding a key binding to toggle this behavior should be added, because overriding can easily break: L cycle ass-style-override This would cycle override behavior on Shift+L and allows quickly disabling/enabling style overrides. Note: ASS should be considered a vector format rather than a subtitle format. There is no easy or reliable way to determine whether the style of a given subtitle event can be changed without destroying visuals or not. This patch relies on a simple heuristic, which often works and often breaks.
* stream/cache: handle failure of seeking underlying streamGravatar wm42014-06-05
| | | | | | | | | | | | This could for example happen when serving an incomplete file from http, and the demuxer tries reading data from the end of the file when opening it (e.g. with avi). Seeking past EOF fails with http, so the file could never be opened, and the cache would get stuck trying to seek to the position. We can't really make the cache report seek failure directly (it would suck for various reasons), so just make the cache report EOF if seeking fails.
* lua: make warning about unknown scripts -v onlyGravatar wm42014-06-04
|
* filter_kernels: fix nearest scalerGravatar wm42014-06-04
| | | | | | | | | | The previous commit assumed the filter would be 1x1 (then constant weight is correct) - but our code in fact uses at least a 2x2 filter. A 1x1 filter would generally be useless, except for nearest scaling - so it didn't exist. Insteasd of adding such a 1x1 filter, just turn the nearest weight function into a scare function, which should take care of the issue.
* filter_kernels: add nearest neighbour scalingGravatar lucy2014-06-03
| | | | | | This is useful for playing content containing pixel art that hasn't been pre-scaled, such as TASVideos' high quality encodes. The implementation is lifted from <https://code.google.com/p/glumpy/source/browse/glumpy/image/filter.py#413>.
* audio/out/push: don't attempt to fill AO buffer when pausedGravatar wm42014-06-03
| | | | Doing so will implicitly resume playback. Broken in commit 5929dc45.
* command: format_bitrate: fix conversion to kbits and mbitsGravatar Marcoen Hirschberg2014-06-02
| | | | | | | Bitrates are now expressed in bits/second. This commit fixes conversions which assumed it was still in bytes/second. Signed-off-by: wm4 <wm4@nowhere>
* osc: keep track of the "fullscreen" state when it changesGravatar Marcoen Hirschberg2014-06-02
| | | | | This avoids having to poll the "fullscreen" property in the tick callback.
* wayland: remove stub for unimplemented functionGravatar wm42014-06-02
|
* osd/libass: use BorderStyle=4 for backgroundGravatar wm42014-06-01
| | | | Avoids (some) overlaps. Hopefully fixes #822.
* player: write file name to the watch later config fileGravatar Alessandro Ghedini2014-06-01
| | | | | | | | | This simply writes the file name as a comment to the top of the watch later config file. It can be useful to the user for determining whether a watch later config file can be manually removed (e.g. in case the corresponding media file has been deleted) or not.
* audio: prefer dsound over wasapiGravatar wm42014-06-01
| | | | | ao_wasapi has too many subtle failures that were reported, but there's nobody to fix them. ao_dsound seems to be more robust; so prefer it.
* demux_lavf: support new rotation metadata APIGravatar wm42014-06-01
|
* command: improve video-bitrate propertyGravatar Andrey Morozov2014-06-01
| | | | | | Signed-off-by: wm4 <wm4@nowhere> Includes some cosmetic changes over the original PR.
* vo: correctly initialize parameters in corner casesGravatar wm42014-06-01
|
* m_option: use isfinite() instead of isnormal()Gravatar wm42014-06-01
| | | | | | This accidentally rejected d==0. We can actually deal with sub-normals fine, we just want to exclude nan and infinity (although infinity is already accounted for, but anyway).
* stream: remove VCD supportGravatar wm42014-06-01
| | | | | | | | | If a single person complains, I will readd it. But I don't expect that this will happen. The main reason for removing this is that it's some of the most unclean code remaining, it's unmaintained, and I've never ever heard of someone using it.
* client API: report success status when running commandsGravatar wm42014-06-01
| | | | | | Until now, an error was reported only if the command couldn't be parsed. Attempt to do more fine-grained reporting. This is not necessarily perfect, but it's an improvement.
* command: property notification when changing af/vfGravatar wm42014-06-01
|
* command: add const to mp_notify_propertyGravatar wm42014-06-01
|
* player: hide audio/video codec and file format messagesGravatar wm42014-05-31
| | | | | None of these are very important usually. For error analysis, the plain log is useless anyway, and this information is still printed with "-v".
* gl_common: remove dlsym() fallbackGravatar wm42014-05-31
| | | | See previous commits.
* gl_wayland: remove probably unneeded workaroundGravatar wm42014-05-31
| | | | | | | | This would imply eglGetProcAddress() doesn't work correctly, but using dlsym() does. For now get rid of it - it won't work in libmpv, and we'll probably need a better workaround if it's still broken. This code was in the initial wayland commit.
* gl_x11: remove workaround for PPC OSX 10.4Gravatar wm42014-05-31
| | | | | Added in 2010 with commit 4a8486f8 (svn commit 30994). I doubt anyone still uses X11 on OSX, and we probably don't support 10.4 either.
* gl_x11: always require some GLX API functions, avoid dlsym()Gravatar wm42014-05-31
| | | | | | | | | | | | | | The functions glXGetProcAddressARB() and glXQueryExtensionsString() were loaded using dlsym(). This could fail when compiling to libmpv, because then dlopen(NULL, ...) will look in the main program's list of libraries, and the libGL linked to libmpv is never considered. (Don't know if this somehow could be worked around.) The result is that using vo_opengl with libmpv can fail. Avoid this by not using dlsym(). glXGetProcAddressARB() was already used directly in the same file, and that never caused any problems. (Still add it to the configure test.) glXQueryExtensionsString() is documented as added in GLX 1.1 - that's ancient.
* ao_alsa: make device the first sub optionGravatar wm42014-05-31
| | | | This is more convenient.
* audio/out/push: keep some extra bufferGravatar wm42014-05-31
| | | | | | | | | | | | | | | | | | | So the device buffer can be refilled quickly. Fixes dropouts in certain cases: if all data is moved from the soft buffer to the audio device buffer, the waiting code thinks it has to enter the mode in which it waits for new data from the decoder. This doesn't work, because the get_space() logic tries to keep the total buffer size down. get_space() will return 0 (or a very low value) because the device buffer is full, and the decoder can't refill the soft buffer. But this means if the AO buffer runs out, the device buffer can't be refilled from the soft buffer. I guess this mess happened because the code is trying to deal with both AOs with proper event handling, and AOs with arbitrary behavior. Unfortunately this increases latency, as the total buffered audio becomes larger. There are other ways to fix this again, but not today. Fixes #818.
* ao_alsa: reduce spurious wakeupsGravatar wm42014-05-30
| | | | | | Apparently this can happen. So actually only return from waiting if ALSA excplicitly signals that new output is available, or if we are woken up externally.
* tv: remove sysinfo() usageGravatar wm42014-05-30
| | | | | | This call was used limited the buffer size if installed RAM was below 16 MB. This stopped being useful a decade ago. The check could also overflow on 32 bit systems. Just get rid of it.
* audio/out/push: handle draining correctlyGravatar wm42014-05-30
| | | | | | | | | This did not flush remaining audio in the buffer correctly (in case an AO has an internal block size). So we have to make the audio feed thread to write the remaining audio, and wait until it's done. Checking the avoid_ao_wait variable should be enough to be sure that all data that can be written was written to the AO driver.
* audio: change handling of an EOF corner caseGravatar wm42014-05-30
| | | | | | This code handles buggy AOs (even if all AOs are bug-free, it's good for robustness). Move handling of it to the AO feed thread. Now this check doesn't require magic numbers and does exactly what's it supposed to do.