| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a pretty big change. Instead of doing a half-hearted passthrough
of the playback timestamp, we attempt to rewrite the raw MPEG timestamps
such that they match with the playback time.
We add the offset between raw start timestamp and playback time to the
packet timestamps. This is the easy part; but the problem is with
timestamp resets. We simply detect timestamp discontinuities by checking
whether they are more than 500ms apart (large enough for all video
faster than 2 FPS and audio with reasonable framesizes/samplerates), and
adjust the timestamp offset accordingly.
This should work pretty well. There may be some problems with subtitles.
If the first packet after a timestamp reset is a subtitle instead of
video, it will fail. Also, selecting multiple audio or video streams
won't work (but mpv doesn't allow selecting several anyway). Trying to
demux subtitles with no video stream enabled will probably fail.
Untested with Bluray, because I have no Bluray sample.
Background:
libdvdnav/libdvdread/libbluray make this relatively hard. They return a
raw MPEG (PS/TS) byte stream, and additionally to that provide a
function to retrieve the current "playback" time. The playback time is
what should be displayed to the user, while the MPEG timestamps can be
completely different. Even worse, the MPEG timestamps can reset. Since
we use the libavformat demuxer (instead of parsing the MPEG packets in
the DVD/BD code), it's hard to associate between these timestamps. As a
result, the time display is special cased in the playloop, and of low
quality (updates only all 1 or 2 seconds, sometimes is incorrect). The
fact that the stream cache can be between demuxer and the stream source
makes things worse.
All the libs seem to provide an event that tells whether timestamps are
resetting. But since this signalling is byte based, it's hard to connect
it to the demuxed MPEG packets. It might be possible to create some sort
of table mapping file positions to discontinuities and new timestamps.
(For simplicity, this table could be 2 entries large, sufficient to
catch all discontinuities if the distance between them is larger than
the total buffering.)
|
| |
|
|
|
|
|
|
| |
It can happen that demux_fill_buffer() adds more than 1 packet, and then
the packets would add up. Affects demux_disc.c only (nothing else uses
this function).
|
|
|
|
|
|
| |
This was accidentally broken with moving the DVD code to demux_disc.c.
Also remove an abort() call meant for debugging.
|
|
|
|
| |
demux_disc.c takes care of this now.
|
|
|
|
| |
Oops, should have been part of commit 37085788.
|
|
|
|
| |
Will replace the generic XDG video icon inherited from media role.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When seeking, we violently destroy the filter, because vapoursynth has
no proper API for terminating a video with unknown frame count. This
looks like an error to vapoursynth, and the error is returned via the
frame callbacks. The bug is that we remember this error state across
reinitialization, so on the first filter call after reinitialization, we
thought filtering the current frame failed. This caused a shift by 1
frame on each seek.
CC: @mpv-player/stable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not all compilers on all platforms have atomics available (even if they
could, technically speaking).
We don't use atomics that much, only the following things rely on it:
1. the audio pull code, and all audio outputs using it
2. updating global msg levels
3. reading log messages through the client API
Just disable 1. and 3. if atomics are not available. For 2., using fake-
atomics isn't too bad; at worst, message levels won't properly update
under certain situations (but most likely, it will work just fine).
This means if atomics are not available, the client API function
mpv_request_log_messages() will do nothing.
CC: @mpv-player/stable
|
|
|
|
| |
CC: @mpv-player/stable
|
|
|
|
| |
CC: @mpv-player/stable
|
|
|
|
|
|
|
|
| |
This should be unneeded, and the packet position is already sufficient
for this case.
Accessing the stream position directly is going to be a problem when the
stream is accessed from another thread later.
|
|
|
|
|
| |
Now all demuxer implementations (at least demuxer API-wise) are in the
demux directory.
|
|
|
|
| |
Also some other unrelated minor changes.
|
|
|
|
|
| |
No need to provide a "nice" API for it; just do this stuff directly in
the command code.
|
|
|
|
|
|
|
|
|
|
|
| |
Suggested by tholin on github issue #882.
This is not entirely clean, but the fields we're accessing might be
considered internal to libavformat. On the other hand, existence of the
fields is guaranteed by the ABI, and nothing in the libavformat doxygen
suggestes they're not allowed to be accessed.
CC: @mpv-player/stable
|
|
|
|
|
|
|
|
|
|
|
|
| |
DVD and Bluray (and to some extent cdda) require awful hacks all over
the codebase to make them work. The main reason is that they act like
container, but are entirely implemented on the stream layer. The raw
mpeg data resulting from these streams must be "extended" with the
container-like metadata transported via STREAM_CTRLs. The result were
hacks all over demux.c and some higher-level parts.
Add a "disc" pseudo-demuxer, and move all these hacks and special-cases
to it.
|
| |
|
|
|
|
| |
Otherwise the position can be too far ahead.
|
| |
|
|
|
|
| |
Simpler, especially for later changes.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Again.)
This time, we simply make it event-based, as it should be. This is done
for both demuxer metadata and stream metadata.
For some ogg-over-icy streams, 2 updates are reported on stream start.
This is because libavformat reports an update right on start, while
including the same info in the "static" metadata. I don't know if that's
a bug or a feature.
|
|
|
|
|
|
| |
It's unlikely that files with multiple audio tracks and with replaygain
actually happen, but this change might help avoid minor corner cases
with later changes.
|
| |
|
|
|
|
| |
Move them to the only place where they are used, demux_subreader.c.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recently, libavformat added demuxers to open image files like normal
demuxers. This is a good thing, but for now they interfere with the
operation of demux_mf. Add them to the blacklist until there is a proper
solution.
(The list doesn't contain _all_ recognized image formats, just those
that might interfere with demux_mf.)
CC: @mpv-player/stable
|
|
|
|
| |
Apparently it's FFmpeg only.
|
|
|
|
| |
Probably useless.
|
|
|
|
| |
Remove unnecessary prefix, remove some messages.
|
|
|
|
|
|
|
| |
This returned a stream error value directly to libavformat, which can't
make sense. For example STREAM_ERROR (0) means success in libavformat
error codes. (The meaning of the libavformat read_seek return value is
underdocumented too.)
|
| |
|
|
|
|
|
|
|
|
| |
The intention is to make it obvious which mpv releases certain changes
will apply to.
Also attempt to fix RST formatting of the list. This is not very proper,
but probably good enough.
|
|\
| |
| | |
OS X bundle: Add more imported UTI
|
|/
|
| |
Not that there are widely used formats, but it will allow to play them directly from the Finder.
|
|
|
|
|
|
|
|
| |
The last title was ignored before.
CC: @mpv-player/stable
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
|
| |
CC: @mpv-player/stable
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
|
|
|
| |
libdvdnav returns an error is the seek position is out of range.
CC: @mpv-player/stable
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
| |
This is pretty dumb and extremely basic. The main purpose is
demonstrating how to integrate mpv into the Qt GUI thread.
|
|
|
|
|
|
| |
This is an oversight and a bug.
CC: @mpv-player/stable
|
|
|
|
|
|
|
|
|
|
|
| |
Cast away the "extra" bits (since apparently Window/XID is always
32 bit unsigned). This is not striclty needed, because you're not
supposed to pass garbage to --wid, just because the upper bits are
possibly not interpreted. But if you do so, this change increases
consistency in behavior and removes a strange behavior that was
thought to be a bug.
Also see github issue #906.
|
|
|
|
|
| |
Commit a6a4cd2c88 added reporting of playout latency, this commit also adds
support for reporting hardware and constant audio unit latency.
|
| |
|
|
|
|
|
| |
This stops options that are prefixes of other options from blocking
completion of values for the longer ones.
|
| |
|
|
|
|
|
|
|
|
|
| |
Don't use _x_arguments, as we don't support X arguments.
Get rid of -s, because we don't support multiple single-letter options
in one argument.
Add -S, because we ignore options after "--".
|
|
|
|
|
|
|
|
|
|
|
|
| |
Completion now uses "--opt=value" instead of "--opt value". Once the
user presses space and starts a new argument, the option just
completed is out of the picture, whether or not it was given an
argument. This handles options with no arguments or optional arguments
much better; previously, completing such an option would effectively
disable completion for the next argument.
Custom completed options such as "--ao" and friends will no longer
claim to consume an extra argument.
|
| |
|
| |
|
| |
|
| |
|