aboutsummaryrefslogtreecommitdiffhomepage
path: root/player
Commit message (Collapse)AuthorAge
* command: fix reset-on-next-file=all and tv-freq optionGravatar wm42016-10-22
| | | | | | | | The tv-freq options and properties use different types, thus must be treated as incompatible. Fixes an assertion with reset-on-next-file=all, which tries to set the option. Fixes #3708.
* player: don't leave buffering during underflowGravatar wm42016-10-21
| | | | | | | | | | | | | | | | Don't leave the buffering state while the demuxer is still marked as having underflowed. It's unclear why this hasn't been done before - with the logic being complicated as it is, maybe there was a reason for this. This is actually still not very reliable, but should be better than what was before: on stream switching decoders can read packets all while the demuxer is executing a refresh seek, which creates the underrun situation - but nothing really totally guarantees that the underrun state remains stable when the demuxer is back at the current demuxer position. Anyway, it's an improvement. The rest of the touched condition is not changed, just moved around for cosmetic reasons.
* player: guard against MPSEEK_RELATIVE when current pts is unknownGravatar Aman Gupta2016-10-21
| | | | | | | | | | | in very rare circumstances, doing a relative seek like +1s will end up doing an absolute seek to 00:01. this guards against that possibility. so far i've only ever seen this issue when using --ad=lavc:ac3_at and doing several relative seeks in quick succession. this is likely either a bug in the audiotoolbox decoder in ffmpeg, or simply due to inherent latency in that hardware decoder which causes brief periods of time where the current audio pts is unknown.
* audio: force pts_reset only when pts jumps forward more than 5sGravatar Aman Gupta2016-10-21
| | | | | | i've seen several mpegts samples where pts jumps backwards and repeats itself. this usually happens on live tv streams from cable providers, particularly when the stream switches from one advertisement to another.
* player: speed up audio/video re-sync when there is a huge delayGravatar Aman Gupta2016-10-21
| | | | | | | | when there is a huge delay between audio/video sync, it can take a really long time to converge back. this speeds up the resync time by increasing the max_change allowed per iteration. Signed-off-by: wm4 <wm4@nowhere>
* osc: fix crash after reaching a certain position in limited listsGravatar Ricardo Constantino2016-10-20
| | | | | Don't try to display more items than there are in the chapter/playlist. Fixes #3691
* osc: use the same characters as track list for playlist/chapterGravatar Ricardo Constantino2016-10-17
| | | | | | | | | Had only tested with luajit which supports the \xHH syntax added in Lua 5.2. The arrow is troublesome to use since the ideal way to use it, as the OSD code uses it, needs \alpha&H00<arrow>\r to work, which does not in OSC's way of showing messages.
* osc: fix chapter/playlist listing if emptyGravatar Ricardo Constantino2016-10-15
|
* osc: show playlist/chapter list on prev/next instead of osdGravatar Ricardo Constantino2016-10-15
|
* osc: fix listing of chapters and playlistGravatar Ricardo Constantino2016-10-15
| | | | | | | Fixes regression since 05c398f. Add helper functions for limiting potentially huge lists of playlists and chapters and use them.
* osc: fix display of chapters and playlist scalingGravatar Ricardo Constantino2016-10-15
| | | | Compensate \fs when using non-default scale(fullscreen|windowed).
* osc: add user-alterable margin for top/bottombarGravatar Ricardo Constantino2016-10-15
|
* osc: add right-click behavior to playlist and chapter buttonsGravatar Ricardo Constantino2016-10-15
|
* osc: change default layout to bottombarGravatar Ricardo Constantino2016-10-15
| | | | | | Change a few other defaults accordingly: - seekbarstyle=bar looks better with bottombar. - Bigger scalewindowed and scalefullscreen make bottom/topbar more readable.
* ytdl_hook: Add title to playlist items if availableGravatar Ricardo Constantino2016-10-15
|
* osc: move tooltip to inside seekbar for top/bottombarGravatar Ricardo Constantino2016-10-07
| | | | Tooltip border is user-alterable
* osc: change seekbar background's alpha scalingGravatar Ricardo Constantino2016-10-07
| | | | | | This avoids a full transparent seekbar with only boxalpha=115. No change with default values.
* osc: align text vertically in top/bottombarGravatar Ricardo Constantino2016-10-07
| | | | Close #2093
* ytdl_hook: add chapters by parsing video's descriptionGravatar Maurycy Skier2016-10-06
|
* options: handle --audio-device changes like the other optionsGravatar wm42016-10-05
| | | | | | Don't require special property code for handling updates, and simply use the UPDATE_AUDIO flag instead. Also make runtime changes to --audio-client-name take effect.
* audio: move some fallback handling to common AO reload functionGravatar wm42016-10-05
| | | | | | | | | Now a reload requested by an AO behaves in exactly the same way as changing an AO-related options (like --audio-channels or --audio-exclusive). This is good for testing and uniform behavior. (You could go as far as saying it's a necessity, because the spotty and obscure AO reload behavior is hard to reproduce and thus hard to test at all.)
* command: flush and uninitialize audio output first on option changesGravatar wm42016-10-05
| | | | | | | | | | | | This affects changing audio configuration options. Explicitly flush and uninitialize the audio output first before doing the rest. This should ensure all state attached to the audio output is discarded and not used during the reconfiguration. Also add a comment to the reinit_audio_filters() call. It doesn't necessarily restore the audio chain fully, but makes sure a seek is issued if the amnount of buffered audio discarded was huge enough to cause "problems".
* command: include deprecated/aliased options in property bridgeGravatar wm42016-10-04
| | | | | | | | If we really want client API users to use mpv_set_property() instead of mpv_set_option(), then compatibility handling of deprecated options should be included. Otherwise, there's the danger that client API users either break too early (and without a warning), or mpv_set_option() will continue to have a reason to exist.
* player: fix previous commitGravatar wm42016-10-03
| | | | ...
* command: allow absolute seeks relative to end of streamGravatar Philip Sequeira2016-10-02
| | | | | | "seek -10 absolute" will seek to 10 seconds before the end. This more or less matches the --start option and negative seeks were otherwise useless (they just clipped to 0).
* audio: fix late audio startGravatar wm42016-10-02
| | | | | | | | | Regression since commit bbcd0b6a. This code is just cursed, because it's a fragile state machine with no proper tests, and which could be done in a much simpler way. Without doubt this change will cause a regression in some ridiculous corner case as well. Fixes #3610 (the cause of it, not the behavior it resulted in).
* player: make --stop-screensaver runtime-changeableGravatar wm42016-10-02
| | | | | | | | | | Move the screensaver enable/disable determination to a central place, and call it if the stop-screensaver property is changed. Also, do not stop the screensaver when in idle mode (i.e. no file is loaded). Fixes #3615.
* player: enable reading from stdin after loading input.confGravatar wm42016-09-29
| | | | Someone requested this.
* ytdl_hook: Set aspect ratio for anamorphic videoGravatar Ricardo Constantino2016-09-28
|
* win32: make --priority runtime-settableGravatar James Ross-Gowan2016-09-28
| | | | | | | | | | I'm not sure if this option affects anything or if it's a placebo, especially since the VO thread is now registered with MMCSS. Still, I think --priority=high may have helped back when I used mplayer2 on a netbook. It's also possible that encoding-mode users would want to set --priority=idle. Anyway, it was one of the last M_OPT_FIXED options, so fix that.
* command: fix inverted condition in sub-reload commandGravatar wm42016-09-26
| | | | Fixes #3586 (probably). Untested.
* player: allow opts in pseudo-gui set by the user to override user's defaultGravatar Ricardo Constantino2016-09-26
| | | | | | | | | | | | | | | | | | | | | This should still allow user-set default options to override built-in pseudo-gui while respecting user-set pseudo-gui options. Pros: - user option in default profile overrides built-in pseudo-gui's options Ex: screenshot-directory overrides built-in pseudo-gui's - user can "fix" pseudo-gui if some option like "force-window=no" is set in default by setting "force-window=yes" in [pseudo-gui] - `mpv --profile=pseudo-gui` will work as before Cons: - --show-profile=pseudo-gui won't display the built-in's options Original idea from wm4. Documentation edits mostly by wm4. Signed-off-by: wm4 <wm4@nowhere>
* video: trust demuxer framerate on invalid timestampsGravatar wm42016-09-26
| | | | | | | | | If the PTS goes backwards (whether it's a timestamp reset or some other problem) would just use 0 as frame duration. (At least until the logic for detecting divergence with the timestamps gets active.) Trust the demuxer framerate in these cases instead, if it's available. I think this improves behavior slightly with some broken files.
* scripting: don't attempt to load builtin scripts twiceGravatar wm42016-09-26
| | | | | | | | | During init it will first call mp_load_builtin_scripts(), and then again via mp_load_scripts(). This was harmless (a second attempt won't load it again if the first one was successful), but it's unnecessary, and also looks confusing if the scripts failed to load the first time.
* osc: Fix scaling issues when toggling fullscreenGravatar Ricardo Constantino2016-09-25
| | | | Fixes #3429
* lua: complain loudly if Lua state creation failsGravatar wm42016-09-25
| | | | | | | This should normally happen only if memory allocation for the state happens, which should be extremely rare. But with Luajit on OSX, it can happen if the magic compiler flags required by Luajit were not passed to mpv compilation. Print an error to reduce confusion.
* player: fix instant subtitle refresh on track switchesGravatar wm42016-09-24
| | | | | | | | | | | | | | | | | | | | | | | | When switching a subtitle track, the subtitle wasn't necessarily updated, especially when playback was paused. Some awfully subtle and complex interactions here. First off (and not so subtle), the subtitle decoder will read packets only on explicit update_subtitles() calls, which, if video is active, is called only when a new video frame is shown. (A simply video frame redraw doesn't trigger this.) So call it explicitly. But only if playback is "initialized", i.e. not when it does initial track selection and decoder init, during which no packets should be read. The second issue is that the demuxer thread simply will not read new packets just because a track was switched, especially if playback is paused. That's fine, but if a refresh seek is to be done, it really should do this. So if there's either 1. a refresh seek requested, or 2. a refresh seek ongoing, then read more packets. Note that it's entirely possible that we overflow the packet queue with this in unpredicated weird corner cases, but the queue limit will still be enforced, so this shouldn't make the situation worse.
* lua: fix array detectionGravatar wm42016-09-24
| | | | | | | This was dumb and could return something like "{name=123}" as an array. Also, fix the error message if a key is not a string. lua_typename() takes a type directly, not a stack item.
* command: some minor corrections to previous commitGravatar wm42016-09-24
| | | | | | | | | | | | | | | | | | | | | | | | The last commit was fine - just making some enhancements. Rename the function to parse_node_chapters(), since it really has not much to do with Lua. Don't use len<0 as check whether it makes sense to set chapters, and instead check for mpctx->demuxer (that includes the possibility to set chapters e.g. within a preload hook, but after chapters are initialized from the demuxer). Return M_PROPERTY_ERROR instead of M_PROPERTY_OK if the mpv_node has the wrong type. It's ok if a chapter has no title, so change the checks accordingly. Remove a Yoda condition. Notify that chapter metadata might have changed with mp_notify() (the chapter list itself is already taken care by generic code). Fix leaking the metadata allocations of the new chapter list.
* command: make it possible to set chapters via lua pluginsGravatar Maurycy Skier2016-09-24
|
* player: fix intended pseudo-gui behaviorGravatar wm42016-09-23
| | | | It's still supposed to be possible to customize the pseudo-gui section.
* player: do not let pseudo-gui override user config settingsGravatar wm42016-09-23
| | | | | | | | Seems like this confused users quite often. Instead of --profile=pseudo-gui, --player-operation-mode=pseudo-gui now has to be used to invoke pseudo GUI mode. The old way still works, and still behaves in the old way.
* m_config, command: remove some minor code duplicationGravatar wm42016-09-23
| | | | | | I would have been fine with this, but now I want to add another flag, and the duplication would become more messy than having a strange function for deduplication.
* command: make most options observableGravatar wm42016-09-23
| | | | | | | | | | | The property observation mechanism turns properties into integer IDs for fast comparison. This means if two properties get the same ID, they will receive the same notifications. Use this to make properties under options/ receive notifications. The option-property bridge marks top-level properties with the same name as the options. This still might not work in cases the C code sets values on options structs directly.
* command: fix potential UBGravatar wm42016-09-23
| | | | Pointed out by quilloss on github.
* x11: fix external fullscreen updateGravatar wm42016-09-23
| | | | | | | | | | | | On x11, you can change the fullscreen via the window manager and without mpv's involvement. In these cases, the internal fullscreen flag has to be updated. The hack used for this didn't really work properly. Change it accordingly. The important thing is that the shadow copy of the option is updated. This is still not really ideal. Fixes #3570.
* player: make audio-channels etc. runtime settableGravatar wm42016-09-22
| | | | | | | | | If one of the audio output format options is set, brually reinit the audio chain. Since the audio-channels property is still mapped to the deprecated read-only property, "options/audio-channels" currently has to be used, e.g. "cycle-values options/audio-channels 2 7.1".
* command: add a load-script commandGravatar wm42016-09-22
| | | | | | | The intention is to give libmpv users as much flexibility to load scripts as using mpv from CLI, but without restricting libmpv users from having to decide everything on creation time, or having to go through hacks like recreating the libmpv context to update state.
* player: remove some explicit options accesses when saving resume fileGravatar wm42016-09-22
| | | | | | | | | | | | | Basically, make use of all the new code. Unfortunately, the new code and it's "compromise semantics" with the old behavior before the options/properties merge bites back: this vid/aid/sid, deinterlace, and video-aspect properties have neutral default settings (such as "auto"), but return the current value during playback, so we would unnecessarily force this value when playback is resumed. So leave those as they are. Also, the colormatrix options were removed a long time ago.
* command: fix missing update notifications in some casesGravatar wm42016-09-22
|