| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
Only print at most 2. Just because with some decoders, we will always
hit this code path, such as playing avi of vfw-muxed mkv on RPI.
|
|
|
|
|
|
| |
Same deal as with the previous commit.
(Unfortunately, this code is still duplicated.)
|
|
|
|
|
|
|
|
|
|
| |
The previous commit means subtitles were reinitialized on every seek
(even within a segment). This commit restores the old behavior.
To check whether the segment changed at all, we don't reset the current
start/end values. This assumes the decoder wrapper is always fed by a
stream which doesn't mix segment and non-segment packets, which is
currently always true.
|
|
|
|
|
|
|
|
| |
This is needed to put the decoders into the correct state. In
particular, decoders will not initialize the current segment without
this flag. The intention of not setting the flag for seeks within the
segments were to avoid costly decoder reinits, but it seems this is
better handled explicitly in the decoder wrappers.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fixes #3210
|
| |
|
|
|
|
|
|
| |
Implementation-wise, the values from the demuxer/codec header are merged
with the values from the decoder such that the former are used only
where the latter are unknown (0/auto).
|
|
|
|
|
|
|
|
|
| |
Matroska actually has lots of colorimetry metadata that video tracks can
use, including mastering metadata (HDR signal peak) etc.
This commit adds the EBML definitions and parses the most basic fields.
Note that nothing uses these fields yet, this commit is just adding the
necessary parsing and infrastructure.
|
|
|
|
|
|
|
|
|
|
| |
This happens when ALSA gives us more channels than we asked for, for
whatever reasons. It looks like this wasn't handled correctly. The mpv
and ALSA channel counts could mismatch, which would lead to UB.
I couldn't actually trigger this case, though. I'm fairly sure that
drivers or plugins exist that do it anyway. (Inofficial ALSA motto: if
it can be broken, then why not break it?)
|
|
|
|
|
|
|
|
|
|
| |
If the input is already mono or stereo, or if channel map selection
results in mono or stereo, then disable further use of the champ ALSA
API (or rather, stop trusting its results). Then we behave like a simple
application that only wants to output mono or stereo.
See #3045 and #2905. I couldn't actually test these cases, but this
commit is supposed to fix them.
|
|
|
|
|
|
|
|
|
|
|
| |
set_chmap() skipped _setting_ the ALSA chmap if chmap use was requested
to be disabled by setting dev_chmap.num=0 by the caller, but it still
queried the current ALSA channel map. We don't trust it that much, so
disable that as well.
But we still query and log it, because that could be helpful for
debugging. Otherwise we could skip the entire set_chmap() call in these
cases.
|
|
|
|
|
|
|
| |
Try to make it more compact, and also always list the reordered layout,
but only if it's actually different.
Should be the same functionally.
|
|
|
|
|
| |
Also extend the default buffer size for formatting this string, because
it can get too damn long.
|
|
|
|
| |
Fixes #3737
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The intention was that if --blend-subtitles is enabled, the frame should
always be re-rendered instead of using e.g. a cached scaled frame. The
reason is that subtitles can change anyway, e.g. if you pause and change
subtitle size and such.
On the other hand, if the frame is marked as repeated, it should always
use the cached copy. Actually "simplify" this and drop the cache only if
playback is paused (which frame->still indicates indirectly).
Also see PR #3773.
|
|
|
|
|
|
|
|
| |
unmap_current_image() is called after rendering. This essentially
invalidates the textures, so we can't assume that the image is still
present.
Also see PR #3773.
|
| |
|
| |
|
|
|
|
|
|
| |
This prevents the window scaling beyond screen dimensions
Fixes #3753
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Enumerate all of the scaling-related options, even for the ``--cscale``
/ ``--tscale`` etc. variants. Unfortunately this breaks 80col quite
severely, but there's nothing I can do about it due to a bug in rst2man
preventing definition list labels from spanning multiple lines.
Also reorder some of the scaling-related options to be closer together
and in a more consistent order (for a top-to-bottom reading flow).
|
|
|
|
|
|
|
| |
This allows us to define the tukey window (and other tapered windows).
Also add a missing option definition for `wblur` while we're at it, to
make testing out window-related stuff easier.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This deals with the estimation of buffered packets, which is used mostly
for display, but also things like pausing on low buffer levels.
If a stream is fully EOF (no more packets), we don't want to include it
in the total buffer amount. This also means we should make ds->eof less
flaky and more stable, so don't reset it in ds_get_packets() (this
function reset ds->eof just to retrigger a packet read attempt - we can
have this slightly simpler). This somewhat fixes buffering display when
e.g. issuing a refresh seek after re-enabling audio/video when playing
with subtitles only.
|
|
|
|
|
|
| |
This makes no sense, as the flag is supposed to be used for vsync
purposes only (when literally outputting the screen again with no
changes at all), and redrawing is often used for OSD updates.
|
|
|
|
|
|
|
|
|
|
| |
It's not that easy to decide whether a frame needs to be
reuploaded/rerendered. Using unique frame IDs for input makes it
slightly easier and more robust. This also removes the use of video PTS
in the interpolation path.
This should also avoid reuploading the video frame if it's just redrawn
in paused mode, or when using OSD/subtitles in cover art mode.
|
|
|
|
|
| |
Fixes lingering tooltip with full alpha if mouse leaves window
with OSC still active.
|
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
|
|
|
|
| |
When pthread_cond_timedwait(), the condition we are checking for could
be true or false. This code assumed it was always false.
This should be an extremely obscure race condition, since it can happen
only if timeout and the condition changing sort of happen at the same
time, or the lock is held for a longer time (which it normally isn't).
But I could observe it a few times.
|
|
|
|
| |
Commit e6291697 got this wrong.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Even if a frame is dropped due to the libmpv API user not drawing a
frame, it should be set as current frame. This avoids dropping a frame
forever in certain circumstances such as cover art of the API user was
stuck at initialization or such.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Same behavior as box/slimbox.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Whether this is a good or a bad thing, make sure it's consistent.
|
|
|
|
| |
Also, chapter position which wasn't changed to work with 1-based.
|
|
|
|
| |
Kind of sketchy, but happens to fix #3724.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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]:"
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Also, replace the UTF8 half block char at the source code with C escape.
|
|
|
|
| |
Also document pre-0.21.0 defaults.
|