aboutsummaryrefslogtreecommitdiffhomepage
path: root/player
Commit message (Collapse)AuthorAge
...
* command: don't seek immediately when setting a-b loop when pausedGravatar wm42016-04-28
| | | | | | | | | | Because it's annoying and feels unnatural. If the B point is set while paused, don't seek. If not paused, it should properly loop immediately. In theory there's a chance that it will show at least 1 frame after the loop point when setting the B point. But let's not care about that.
* player: strictly wait until done when backsteppingGravatar wm42016-04-27
| | | | | | | | | | | This fixes backstepping getting "stuck" when e.g. holding down a key bound to the backstep command. The reason is that even if the backstep itself is finished, the next backstep might not take the new video PTS as reference if the hr-seek itself isn't finished yet. The intention of not waiting for the hr-seek to finish was faster backstepping by possibly skipping audio decoding. But it probably doesn't matter enough to make the rest of the code more complex.
* lavfi: shut up false positive compiler warningsGravatar wm42016-04-26
| | | | | | | As a positive side-effect, this also errors out gracefully for the extremely unlikely but possible case certain builtin filters are not available. (This could happen only with crippled libavfilter builds that can't be used by anything using its public API.)
* player: fix memleak when using video-frame-infoGravatar trUSTssc2016-04-24
|
* player: always show the first frame in DS modeGravatar wm42016-04-24
| | | | Fixes bogus frame drop counter in cover art mode.
* player: assume video forwards timestamps jumps only with some formatsGravatar wm42016-04-24
| | | | | | | | | Another crappy fix for timestamp reset issues. This time, we try to fix files which have very weird but legitimate frame durations, such as cdgraphics. It can have many short frames, but once in a while there are potentially very long frames. Fixes #3027.
* player: force VO reconfig when unselecting video trackGravatar wm42016-04-23
| | | | | Switches to a black window if --force-window is used while coverart "video" is playing.
* player: cleaner determination of current playback PTSGravatar wm42016-04-23
| | | | | In particular, this won't overwrite the playback PTS in coverart mode, which actually fixes relative seeks.
* player: eagerly redraw OSD when seeking with coverartGravatar wm42016-04-23
|
* player: fix OSD bar chapter marksGravatar wm42016-04-22
| | | | Truly dumb bug introduced with the previous commit.
* command: if only ab-loop-b is set, loop from start of fileGravatar wm42016-04-21
| | | | | | | | | | Commit 382bafcb changed the behavior for ab-loop-a. This commit changes ab-loop-b so that the behavior is symmetric. Adjust the OSD rendering accordingly to the two changes. Also fix mentions of the "ab_loop" command to the now preferred "ab-loop".
* player: force wakeup on playback restartGravatar wm42016-04-20
| | | | Just a theoretical issue, most likely.
* player: really start audio only once video is readyGravatar wm42016-04-20
| | | | | | | | | | | | | | | The check whether video is ready yet was done only in STATUS_FILLING. But it also switched to STATUS_READY, which means the next time fill_audio_out_buffers() was called, audio would actually be started before video. In most situations, this bug didn't show up, because it was only triggered if the demuxer didn't provide video packets quickly enough, but did for audio packets. Also log when audio is started. (I hate fill_audio_out_buffers(), why did I write it?)
* player: reduce some timer callsGravatar wm42016-04-20
|
* player: minor simplification to buffering property updatesGravatar wm42016-04-20
| | | | | | | | | | Strictly schedule an update in regular intervals as long as either stream cache or demuxer are prefetching. Don't update just always because the stream cache is enabled ("idle != -1") or cache-related properties are observed (mp_client_event_is_registered()). Also, the "idle" variable was awkard; get rid of it with equivalent code.
* player: simplify an aspect of buffering determinationGravatar wm42016-04-19
| | | | | | | | | | | | | | | Calculate the buffering percentage in the same code which determines whether the player is or should be buffering. In particular it can't happen that percentage and buffering state are slightly out of sync due to calling DEMUXER_CTRL_GET_READER_STATE and reusing it with the previously determined buffering state. Now it's also easier to guarantee that the buffering state is updated properly. Add some more verbose output as well. (Damn I hate this code, why did I write it?)
* player: loop on end of file if ab-loop-b is unsetGravatar wm42016-04-18
| | | | Possibly slightly more useful/intuitive.
* command: log property set callsGravatar wm42016-04-15
| | | | | | | And remove the same thing from the client API code. The command.c code has to deal with many specialized M_PROPERTY_SET_* actions, and we bother with a subset only.
* command: allow setting panscan etc. properties if no video is activeGravatar wm42016-04-15
| | | | In that case, it merely changes the underlying option value.
* client API: improve mpv_set_property() handling of MPV_FORMAT_NODEGravatar wm42016-04-15
| | | | | | | | | If a mpv_node wrapped a string, the behavior was different from calling mpv_set_property() with MPV_FORMAT_STRING directly. Change this. The original intention was to be strict about types if MPV_FORMAT_NODE is used. But I think the result was less than ideal, and the same change towards less strict behavior was made to mpv_set_option() ages ago.
* player: fix use-after-free with --screenshot-directoryGravatar wm42016-04-14
| | | | Probably fixes #3049.
* command: add keepaspect propertyGravatar wm42016-04-08
| | | | | | Just a bridge to the option. (Did I ever mention that I hate the property/option separation.)
* player: hide cache in status line by default againGravatar wm42016-03-30
| | | | | | Commit 57506b27 accidentally broke this. The status (including the usually always active demuxer cache) should be shown only if the stream cache is actually enabled.
* cache: use a single STREAM_CTRL for various cache infoGravatar wm42016-03-29
| | | | | | | | Instead of having a separate for each, which also requires separate additional caching in the demuxer. (The demuxer adds an indirection, since STREAM_CTRLs are not thread-safe.) Since this includes the cache speed, this should fix #3003.
* command: add video-stereo-mode propertyGravatar wm42016-03-28
| | | | | | Enables runtime change of the option. Fixes #2994.
* player: fix breakage when combining 3D and rotate auto-filtersGravatar wm42016-03-28
| | | | | | | | | | | This would get stuck in reconfiguring the filter chain forever, because params was mutated ("params.rotate = 0;"). This was used as input for vf_reconfig(), but the filter chain input must always be equivalent to the decoder output, or filter chain reconfiguration will be triggered. The line of code to reset the rotation is from a time when this used to work differently. Also remove the unnecessary try_filter() parameter.
* player: remove auto-inserted filters before adding them againGravatar wm42016-03-28
| | | | | | | Makes certain cases of runtime changes actually work. Also change the label for the stereo3d filter and make it consistent with the rotate one.
* player: fix --stream-dump exit codeGravatar wm42016-03-26
| | | | | Inverted condition due to weird semantics after a refactor some time ago. Fixes #2848.
* player: add wv to list of external audio file extensionsGravatar Martin Herkt2016-03-26
|
* lua: don't require key for mp.add_key_binding()Gravatar wm42016-03-26
| | | | | Requested. The intention is that scripts can provide mappable actions for key bindings without setting a default key.
* ipc: add Windows implementation with named pipesGravatar James Ross-Gowan2016-03-23
| | | | | | | | | | | | | | | This implements the JSON IPC protocol with named pipes, which are probably the closest Windows equivalent to Unix domain sockets in terms of functionality. Like with Unix sockets, this will allow mpv to listen for IPC connections and handle multiple IPC clients at once. A few cross platform libraries and frameworks (Qt, node.js) use named pipes for IPC on Windows and Unix sockets on Linux and Unix, so hopefully this will ease the creation of portable JSON IPC clients. Unlike the Unix implementation, this doesn't share code with --input-file, meaning --input-file on Windows won't understand JSON commands (yet.) Sharing code and removing the separate implementation in pipe-win32.c is definitely a possible future improvement.
* command: change "cache-speed" OSD formattingGravatar wm42016-03-22
| | | | | Also change the property to an int, since using double is questionable and pointless.
* command: add cache-speed propertyGravatar wm42016-03-20
| | | | | | | Should reflect I/O speed. This could go into the terminal status line. But I'm not sure how to put it there, since it already uses too much space, so it's not there yet.
* lua: don't suspend core by default during script executionGravatar wm42016-03-18
| | | | | | | | | This changes behavior somewhat. The old behavior can be restored by running "mp.use_suspend=true". It was originally introduced for the OSC, but I can't reproduce whatever misbehavior I was seeing. (See mp.suspend()/resume() for explanations what the suspend mechanism does.)
* command: dump tracklist if sub-add is run with the "cached" flagGravatar wm42016-03-14
| | | | | mp_switch_track() doesn't do it automatically for whatever reason, so do it here.
* player: add missing audio reconfig eventsGravatar wm42016-03-13
| | | | | | | This also takes care of sending the required property change notifications. Fixes #2929 and maybe fixes #2920.
* ytdl_hook: handle optional format_noteGravatar ▟ ▖▟ ▖2016-03-10
| | | | | some extractors don't return a format_note for their audio stream which resulted in commandv complaining "argument 4 is not a string" (got nil).
* demux: replace demux_pause/demux_unpause with demux_run_on_threadGravatar wm42016-03-09
| | | | | | | This pause stuff is bothersome and is needed only for a few corner- cases. This commit removes it from the demuxer public API and replaces it with a demux_run_on_thread() function and refactors the code which needed demux_pause(). The next commit will change the implementation.
* command: change stream-pos semanticsGravatar wm42016-03-09
| | | | | | | | | | | | | Changing the byte stream position without cooperation of the demuxer seems a bit insane, and is certainly useless. A user should do factor seeks instead. For formats like ts, this will actually translate to byte seeks, while treating the rest of the playback chain a bit more gracefully. With this argument, remove write access to this property. If someone really complains, proper byte seeks could be added as seek mode (although I'm going to need a convincing argument for this). Read access changes too, but in a more subtle way.
* osd: cleanup: make OSDTYPE_ constants private to OSD codeGravatar wm42016-03-08
| | | | | | No need to have them everywhere. The only exception/annoyance is MAX_OSD_PARTS, which is now basically duplicated (and at runtime initialization is checked with an assert()).
* osd, lua: manage multiple ASS overlays set with set_osd_ass() callsGravatar wm42016-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | Until now, there was only 1 global ASS overlay that could be set by all scripts. This was often perceived as bug when multiple scripts tried to set their own ASS overlay. This was kind of hard to solve because the script could set its own ASS PlayResX/Y, which makes it impossible to share a single ASS_Renderer for multiple scripts. The OSC unfortunately makes use of this feature (and unfortunately can't be fixed because it's a POS), so we're stuck with this complication. Implement the worst-case solution and fix this by creating separate ASS track and renderer objects for each script that wants to set an ASS overlay. The z-order is decided by the order the scripts set their text first. This is essentially random, unless you do it at script init, and you pass scripts in a specific order. Script initialization is currently serialized (as a feature), so the first loaded script gets lowest Z-order. The Lua script API interestingly remains the same. (And also will remain undocumented, unsupported, and potentially volatile.)
* osc: fix mouse areasGravatar wm42016-03-08
| | | | | | | | The scaling was the wrong way around, and the section name was missing. Regression since commit 5fa45fb5. Fixes #2916.
* osd, lua: remove weird OSD scalingGravatar wm42016-03-07
| | | | | | | | | | | | | | | | | | | | | Do not scale OSD mouse input to the ASS OSD script resolution. The original idea of this mechanism was that the user doesn't have to care about the actual resolution of anything, and can just use the OSD resolution consistently. But this made things worse. Remove the implicit scaling, and always use the screen resolution. (Except with --vo=xv, where additional scaling is forced upon everything.) Drop get_osd_resolution(). There is no replacement. Rename get_screen_size() and get_screen_margins() to use "osd" instead of "screen". For anything but --vo=xv these are equivalent, but with --vo=xv the OSD resolution has additional implicit scaling. Add code to osc.lua which emulates the old behavior. Note that none of the changed functions were public API, so implicit breakage of scripts which used it is just going to happen.
* sub: make preloading more robustGravatar wm42016-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Subtitles can be preloaded, which means they're fully read and copied into ASS_Track. This in turn is mainly for the sake of being able to do subtitle seeking (when it comes down to it, subtitle seeking is the cause for most trouble here). Commit a714f8e92 broke preloaded subtitles which have events with unknown duration, such as some MicroDVD samples. The event list gets cleared on every seek, so the property of being preloaded obviously gets lost. Fix this by moving most of the preloading logic to dec_sub.c. If the subtitle list gets cleared, they are not considered preloaded anymore, and the logic for demuxed subtitles is used. As another minor thing, preloadeding subtitles did neither disable the demux stream, nor did it discard packets. Thus you could get queue overflows in theory (harmless, but annoying). Fix this by explicitly discarding packets in preloaded mode. In summary, now the only difference between preloaded and normal demuxing are: 1. a seek is issued, and all packets are read on start 2. during playback, discard the packets instead of feeding them to the subtitle decoder This is still petty annoying. It would be nice if maintaining the subtitle index (and maybe a subtitle packet cache for instant subtitle presentation when seeking back) could be maintained in the demuxer instead. Half of all file formats with interleaved subtitles have this anyway (mp4, mkv muxed with newer mkvmerge).
* sub: pass all attachments to the subtitle decoderGravatar wm42016-03-03
| | | | | | | | | | | | | | | | | Commit 8d4a179c made subtitle decoders pick up fonts strictly from the same source file (i.e. the same demuxer). It breaks some fucked up use-case, and 2 people on this earth complained about the change because of this. Add it back. This copies all attached fonts on each subtitle init. I considered converting attachments to use refcounting, but it'd probably be much more complex. Since it's slightly harder to get a list of active demuxers with duplicate removed, the prev_demuxer variable serves as a hack to achieve almost the same thing, except in weird corner cases. (In which fonts could be added twice.)
* command: fix property notification for cache-buffering-stateGravatar wm42016-03-02
|
* command: add encoder-list propertyGravatar wm42016-03-01
| | | | | Also change decoder-list (for the sake of sharing the underlying code for both properties).
* command: export canonical ffmpeg version identifierGravatar wm42016-02-29
| | | | Was printed only with "mpv -h" or so.
* command: export list of all decodersGravatar wm42016-02-29
| | | | | | | Was only available via --vd=help and --ad=help (i.e. not at all via client API). Not bothering with separating audio and video codecs, since this list isn't all that useful anyway in general. If someone complains, a type field could be added.
* command: export more information under track-listGravatar wm42016-02-29
| | | | | | | | | | | | | Export a number of container fields, which may or may not be useful in some scenarios. They are explicitly marked as originating from the demuxer, in order to make it explicit that they might be unreliable. I'd actually like to remove all other cases where container information is exported, but those numerous cases are going to be somewhat hard to deprecate. Also, not directly related, export the description of the currently active decoder. (This has been requested before.)