summaryrefslogtreecommitdiffstats
path: root/player
Commit message (Collapse)AuthorAgeFilesLines
* manpage: replace `-vo` with `--vo`Douglas Christman2016-12-081-1/+1
|
* Remove compatibility thingswm42016-12-071-4/+0
| | | | | | Possible with bumped FFmpeg/Libav. These are just the simple cases.
* osc: replace length property with durationpavelxdd2016-12-041-1/+1
| | | | | | Length property is deprecated and no longer works. This fixes a bug when the total file duration wasn't visible if the option to display milliseconds was activated.
* osc: don't hide playlist buttons, just disableRicardo Constantino2016-12-021-5/+6
| | | | | | | | Having empty space before the title in layout=*bar looks worse than the floating buttons in layout=box. Also disable both playlist buttons selectively according to the current position.
* osc: topbar: use same styles as bottombarRicardo Constantino2016-12-021-13/+13
|
* player: don't print format detection error when aborting loadingwm42016-11-291-1/+1
| | | | | | | | The way playback/loading is stopped on the demuxer layer makes it report an error to the higher levels of the player. But if playback/loading was explicitly aborted, printing such an error is confusing and misleading. This was probably just an oversight anyway. Fix it by using the libmpv API reported error field instead, which handles this better.
* options: some simplificationswm42016-11-291-2/+1
| | | | | | | | Remove more stuff that was needed only for legacy suboptions. One user-visible change is that parent-options like --tv are now not visible anymore. They lead to a special error message when used before, but now they're simply not part of the option list anymore.
* command: warn against deprecated properties in all caseswm42016-11-231-13/+9
| | | | | | | | | For some reason, some types of accesses didn't warn, for example when using mp.observe_property() in Lua. This was because the deprecation handling code explicitly checks certain accesses. I'm not quite certain why it was done this way. Just make it warn always. This could be backported to the current release, if we cared.
* osc: fix use of deprecated idle propertyRicardo Constantino2016-11-221-1/+1
| | | | Fixes regression since 7201fd7d
* command: redefine some deprecated propertieswm42016-11-221-37/+0
| | | | | | | | | | | | | | As threatened by the API changes document. We can actually keep the deprecated --playlist-pos and --cache options, since they are aliases and not used by the corresponding properties. They are inconsistent, but do no harm. Keep them for now for the sake of the command line user. mpv_identify.sh partially stopped working, because it was never updated. The shell magic can't deal with property names that contain "/", so we can't replace "samplerate" with "audio-params/samplerate" - just remove these properties. (How about you use ffprobe?)
* client API: turn mpv_suspend() and mpv_resume() into stubswm42016-11-226-74/+8
| | | | | | | | | | | As threatened by the API changes document. This commit also removes or stubs equivalent calls in IPC and Lua scripting. The stubs are left to maintain ABI compatibility. The semantics of the API functions have been close enough to doing nothing that this probably won't even break existing API users. Probably.
* osc: fix possible race condition in right timecodeRicardo Constantino2016-11-211-2/+1
|
* player: removing last playlist entry while looping should not stopwm42016-11-181-1/+1
| | | | | | | Run "playlist-remove current" while the last playlist entry is being played stopped playback. Fix this and return to the first entry instead. Fixes #3808.
* player: make sure non-video subtitle rendering is reset if video resumeswm42016-11-181-3/+3
| | | | | | | | | | | | | | | | | If video reaches EOF, subtitle timing will be switched to timing without video frames. This means it calls osd_set_force_video_pts() and overrides the PTS of whatever video frame is current (since the video frame's PTS has nothing to do with the current playback position anymore). This was not reset when seeking back into video. Subtitles wouldn't show up, or if there was a subtitle displayed, it would get stuck with it. In particular, this could happen even if EOF was only temporary (such as with --keep-open). Fix this by clearing the override PTS whenever a video frame is shown. Fixes #3770.
* ytdl_hook: sort chapters by timeRicardo Constantino2016-11-151-1/+1
| | | | | mpv doesn't work well with unordered chapters. ex: https://youtu.be/DIKPUL6b4N8
* osc: add seekbarstyle=knobRicardo Constantino2016-11-091-4/+16
| | | | | | | | Most code from @leiserfg in #2365. Closes #2365 Cut guides to the center of the knob. This makes the knob knob look more like IRL knob sliders.
* osc: fix crashes when dragging seekbar across file changesRicardo Constantino2016-11-081-2/+3
| | | | Fixes #3210
* osc: slimbox: fix clipping with seekbarstyle=barRicardo Constantino2016-11-071-1/+3
| | | | Fixes #3737
* osc: add alpha animation to tooltipRicardo Constantino2016-10-311-1/+14
| | | | | Fixes lingering tooltip with full alpha if mouse leaves window with OSC still active.
* player: enable no-video subtitle display on coverart toowm42016-10-312-2/+2
| | | | | | | | | | | Coverart mode has the same issue as no-video mode, except that the video chain is fully active. It shows only 1 frame at the start, which would normally mean that only the subtitle at timestamp 0 is shown. Use the no-video subtitle rendering mode in this case instead. (This still doesn't handle subtitle display when playing cover-art without audio, or playing a single image. This is because there's nothing that will advance playback_pts.)
* player: don't try updating subtitles while playback PTS doesn't progresswm42016-10-301-2/+2
| | | | | | This code would just keep it busy while e.g. being paused. Even if it's not paused, it couldn't help with anything since we obviously still lock display to the externally updated PTS.
* osc: top/bottombar: rescale layout to same size with scale=1Ricardo Constantino2016-10-291-49/+53
| | | | | Basically, there's two less values to revert to previous defaults and top/bottombar now look at scale=1 like they looked with scale=1.5.
* osc: top/bottombar: scale title if too large like boxRicardo Constantino2016-10-291-14/+24
|
* osc: compromise on default deadzonesizeRicardo Constantino2016-10-291-2/+2
| | | | | | This way people can still use the mouse to quickly check the elapsed time without moving it all the way to the bottom while still having half the screen to ignore mouse movement.
* osc: don't wrap the titleRicardo Constantino2016-10-291-1/+1
|
* osc: top/bottombar: also scale when min-width is reachedRicardo Constantino2016-10-291-12/+34
| | | | Same behavior as box/slimbox.
* osc: top/bottombar: dynamically size timecodes according to timemsRicardo Constantino2016-10-291-9/+14
|
* osc: fix missing chapter ticks with seekbarstyle=barRicardo Constantino2016-10-291-0/+1
|
* player: show subtitles on VO if --force-window is usedwm42016-10-263-1/+17
| | | | | | | | | | | | | | | | | | | | | If a VO is created, but no video is playing (i.e. --force-window is used), then until now no subtitles were shown. This is because VO subtitle display normally depends on video frame timing. If there are no video frames, there can be no subtitles. Change this and add some code to handle this situation specifically. Set a subtitle PTS manually and request VO redrawing manually, which gets the subtitles rendered somehow. This is kind of shaky. The subtitles are essentially sampled at arbitrary times (such as when new audio data is decoded and pushed to the AO, or on user interaction). To make a it slightly more consistent, force a completely arbitrary minimum FPS of 10. Other solutions (such as creating fake video) would be more intrusive or would require VO-level API changes. Fixes #3684.
* player: consistently initialize screensaver state with --force-windowwm42016-10-261-1/+1
| | | | Whether this is a good or a bad thing, make sure it's consistent.
* osc: fix crash with no chaptersRicardo Constantino2016-10-251-4/+4
| | | | Also, chapter position which wasn't changed to work with 1-based.
* command: if window-scale can't be set properly, set it as optionwm42016-10-251-13/+8
| | | | Kind of sketchy, but happens to fix #3724.
* osc: Fix and simplify limited_listMiroslav Koskar2016-10-251-28/+25
| | | | | | | | | | | * Fixes: when on the end of playlist only half of entries are displayed. * Simplifies the logic of limited_list so it's easy to follow. * limited_list's pos parameter is now 1 based which seem more natural. * Few changes to comply with code style thorough the file. * Small format change: "Playlist: (%d/%d):" -> "Playlist [%d/%d]:" "Chapters: (%d/%d):" -> "Chapters [%d/%d]:"
* osc: add script message handlers for chapter/track/playlistsRicardo Constantino2016-10-241-0/+13
| | | | | | | | | | These can be used in input.conf for pretty formatting of lists as with shift+clicking the OSC buttons. Ex: z script-message osc-playlist Z script-message osc-chapterlist x script-message osc-tracklist
* player: make --start-time work with --rebase-start-time=noAman Gupta2016-10-221-0/+3
|
* command: silence deprecation warnings with --reset-on-next-file=allwm42016-10-221-2/+11
| | | | | | | | | | | | | | | | | | | | | | --reset-on-next-file=all triggers m_config_backup_all_opts(), which backups all options (even deprecated ones). Later, when the option values are reset with m_config_restore_backups(), mp_on_set_option() is called, which in turn calls mp_property_do_silent(), which in turn will call mp_property_generic_option() and m_config_get_co(), which triggers the deprecation message. Unfortunately there's no good way to determine whether an option has actually changed (there's no option value compare operation), so the deprecated options have to be set no matter what. On the other hand, we can't pass through additional flags through the property layer. So we add a dumb global flag to silence the deprecation warnings in these cases. Fortunately m_config_get_co_raw() works to silence the warnings. m_config_get_co() also resolves aliases (deprecated and non-deprecated), but aliased options are handled differently by the option-property bridge, so we don't need to do that here, so the only purpose of it is to trigger a warning for deprecated (non-alias) options.
* command: fix reset-on-next-file=all and tv-freq optionwm42016-10-221-1/+2
| | | | | | | | 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 underflowwm42016-10-211-2/+2
| | | | | | | | | | | | | | | | 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 unknownAman Gupta2016-10-211-0/+2
| | | | | | | | | | | 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 5sAman Gupta2016-10-211-2/+2
| | | | | | 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 delayAman Gupta2016-10-211-1/+2
| | | | | | | | 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 listsRicardo Constantino2016-10-201-1/+1
| | | | | 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/chapterRicardo Constantino2016-10-171-10/+4
| | | | | | | | | 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 emptyRicardo Constantino2016-10-151-1/+1
|
* osc: show playlist/chapter list on prev/next instead of osdRicardo Constantino2016-10-151-4/+16
|
* osc: fix listing of chapters and playlistRicardo Constantino2016-10-151-10/+87
| | | | | | | 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 scalingRicardo Constantino2016-10-151-2/+11
| | | | Compensate \fs when using non-default scale(fullscreen|windowed).
* osc: add user-alterable margin for top/bottombarRicardo Constantino2016-10-151-5/+6
|
* osc: add right-click behavior to playlist and chapter buttonsRicardo Constantino2016-10-151-0/+8
|
* osc: change default layout to bottombarRicardo Constantino2016-10-151-6/+6
| | | | | | 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 availableRicardo Constantino2016-10-151-0/+6
|
* osc: move tooltip to inside seekbar for top/bottombarRicardo Constantino2016-10-071-25/+28
| | | | Tooltip border is user-alterable
* osc: change seekbar background's alpha scalingRicardo Constantino2016-10-071-2/+4
| | | | | | This avoids a full transparent seekbar with only boxalpha=115. No change with default values.
* osc: align text vertically in top/bottombarRicardo Constantino2016-10-071-32/+39
| | | | Close #2093
* ytdl_hook: add chapters by parsing video's descriptionMaurycy Skier2016-10-061-0/+46
|
* options: handle --audio-device changes like the other optionswm42016-10-051-4/+1
| | | | | | 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 functionwm42016-10-053-34/+36
| | | | | | | | | 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 changeswm42016-10-051-1/+3
| | | | | | | | | | | | 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 bridgewm42016-10-041-18/+28
| | | | | | | | 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 commitwm42016-10-032-5/+10
| | | | ...
* command: allow absolute seeks relative to end of streamPhilip Sequeira2016-10-021-0/+9
| | | | | | "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 startwm42016-10-021-1/+3
| | | | | | | | | 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-changeablewm42016-10-025-8/+20
| | | | | | | | | | 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.confwm42016-09-293-7/+8
| | | | Someone requested this.
* ytdl_hook: Set aspect ratio for anamorphic videoRicardo Constantino2016-09-281-0/+6
|
* win32: make --priority runtime-settableJames Ross-Gowan2016-09-282-9/+16
| | | | | | | | | | 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 commandwm42016-09-261-1/+1
| | | | Fixes #3586 (probably). Untested.
* player: allow opts in pseudo-gui set by the user to override user's defaultRicardo Constantino2016-09-261-2/+5
| | | | | | | | | | | | | | | | | | | | | 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@nowh