| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Tired of seeing all these useless pseudo-demuxers in the log.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now (and in mplayer traditionally), avi timestamps were handled
with a timestamp FIFO. AVI timestamps are essentially just strictly
increasing frame numbers and are not reordered like normal timestamps.
Limiting the FIFO is required because frames can be dropped. To make
it worse, frame dropping can't be distinguished from the decoder not
returning output due to increasing the buffering required for B-frames.
("Measuring" the buffering at playback start seems like an interesting
idea, but won't work as the buffering could be increased mid-playback.)
Another problem are skipped frames (packets with data, but which do
not contain a video frame).
Besides dropped and skipped frames, there is the problem that we can't
always know the delay. External decoders like MMAL are not going to
tell us. (And later perhaps others, like direct VideoToolbox usage.)
In general, this works not-well enough that I prefer the solution of
passing through AVI timestamps as DTS. This is slightly incorrect,
because most decoders treat DTS as mpeg-style timestamps, which
already include a b-frame delay, and thus will be shifted by a few
frames. This means there will be a problem with A/V sync in some
situations.
Note that the FFmpeg AVI demuxer shifts timestamps by an additional
amount (which increases after the first seek!?!?), which makes the
situation worse. It works well with VfW-muxed Matroska files, though.
On RPI, the first X timestamps are broken until the MMAL decoder "locks
on".
|
| |
|
| |
|
|
|
|
| |
Also improve the error message for the missing label case.
|
|
|
|
|
| |
Android is well-known for not supporting SONAME'd libraries. All
libraries imported into an APK have to end with '.so'.
|
|
|
|
|
|
| |
* Add Android-specific OpenGL ES feature and checks
* Add missing GL_* symbols for Android
(list gathered by Ilya Zhuravlev <whatever@xyz.is>)
|
|
|
|
|
| |
* Adds an 'android' feature, which is automatically detected.
* Android has a broken strnlen, so a wrapper is added from FreeBSD.
|
|
|
|
|
| |
The only other place where glob() is used is windows-specific and
for windows mpv includes its own glob wrapper.
|
|
|
|
|
|
|
|
| |
It would make somewhat sense for libcs which don't implement locales at
all, such as Bionic.
Beyond that, setlocale() is specified that it can return NULL, and we
shouldn't crash if that happens.
|
|
|
|
| |
Caused by the recent refactoring for complex filters.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately I see no better solution.
The refresh seek is skipped if the amount of buffered audio is not
overly huge.
Unfortunately softvol af_volume insertion still can cause this issue,
because it's outside of the normal dynamic filter chain changing code.
Move the video refresh call to reinit_video_filters() to make it more
uniform along with the audio code.
|
|
|
|
|
|
|
| |
The ctx->redrawing field signals whether flip_page() should block. Do
not block if a black frame (i.e. nothing) is to be rendered.
Also, frame==NULL can never happen.
|
|
|
|
|
|
|
| |
The field was recently deprecated, and you're supposed to set the
private codec option instead.
Not sure if this really works as intended.
|
| |
|
|
|
|
| |
Mostly intended for use with --lavfi-complex.
|
|
|
|
|
|
|
|
|
|
|
|
| |
To be more specific, enable vo_opengl and vo_opengl_cb, if libmpv is
compiled, and the GL headers happen to be in the default search paths.
Although platform specific code can be useful for libmpv (for window
embedding, and even with vo_opengl_cb for certain forms of hardware
decoding), it's not a requirement to use the opengl_cb API.
Enabling vo_opengl is not useful here, but the rest of the build system
doesn't distinguish vo_opengl and vo_opengl_cb, and I see no reason to.
|
|
|
|
| |
OK, Android doesn't support it.
|
|
|
|
|
| |
In particular, get rid of the "vdpau" example profile, as it's pretty
useless and misleading.
|
|
|
|
| |
This is "more correct". See #2798.
|
|
|
|
|
|
|
| |
We either need to be on Windows, or have posix_spawn available.
If someone can come up with a system that is POSIX, but does not provide
posix_spawn, we could make it optional.
|
|
|
|
|
| |
Check and set the fullscreen mode on every surface configure event.
This prevents gnome from resizing mpvs fullscreen window to a smaller size.
|
|
|
|
|
|
|
| |
GUID_NULL is defined in <ks.h>
gcc 6.0 refuses to link the executable because of that
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
| |
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was dumb. Could make it burn 100% CPU and not exit at the end.
(Because it would retry as instructed, instead of terminating playback.)
It also needs to consider EOF as waiting for input. lavfi_process() will
decide if it's really EOF, or if further input might come in the future.
Without this, it'd would think that it does not need to wait for input,
i.e. that new input will be available immediately.
(Not so fond of the duplication of subtle logic.)
|
|
|
|
| |
The code for decoding the initial frame has to handle this explicitly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fd339e3f53996efd2dae9525990da433d1e1bf89 introduced a regression that caused
segfault while uniniting dxva2 decoder (and possibly vdpau too). The problem was
that it freed the avctx earlier, before calling the backend-specific uninit
which referenced it.
Revert some of the changes of that commit, and avoid calling flush by
checking whether the codec is open instead.
(Based on a PR by Kevin Mitchell.)
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
| |
These fields are already deallocated by uninit_decoder(). Also remove
the wrong/useless log message.
|
|
|
|
| |
Now it's used for initialization only for audio and video.
|
|
|
|
|
|
| |
It doesn't provide this function. The code is not really designed to
work without it, so it will probably mess up big time, but at least
make it compile again.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See --lavfi-complex option.
This is still quite rough. There's no support for dynamic configuration
of any kind. There are probably corner cases where playback might freeze
or burn 100% CPU (due to dataflow problems when interaction with
libavfilter).
Future possible plans might include:
- freely switch tracks by providing some sort of default track graph
label
- automatically enabling audio visualization
- automatically mix audio or stack video when multiple tracks are
selected at once (similar to how multiple sub tracks can be selected)
|
|
|
|
|
|
| |
The complex filter support that will be added makes much more complex
use of libavfilter, and I'm not going to bother with adding hacks to
keep libavfilter optional.
|
|
|
|
| |
Preparation.
|
|
|
|
|
|
| |
track can't be NLUL at this point, so the if is redundant. Remove it and
unindent the block. Also, make the function check whether the track is
selected at all, which makes it safer and idempotent.
|
|
|
|
|
| |
The main reason for changing the fullscreen default is that not doing it
would change the vo_rpi default behavior with the previous commit.
|
|
|
|
|
|
| |
This makes it possible to set video size and position using the
--geometry and/or --autofit options. It's also possible to switch
between fullscreen/non-fullscreen playback during runtime.
|
|
|
|
|
|
|
| |
It can be "dangerous". In particular, the decoder might have failed to
initialize, and is now in a broken state. avcodec_flush_buffers() is not
expected to be called in this state, and could trigger undefined
behavior.
|
|
|
|
|
|
| |
Apparently useful for window embedding.
Fixes #2750.
|
|
|
|
|
|
|
| |
For bitmap subs, implement it properly. For libass, you need newest git
master.
Fixes #2791.
|
|
|
|
|
| |
Might possible improve A/V sync, although this is at best approximate.
(AVI is just fucked.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I can't explain this, but it seems to be a similar case to the ALSA HDMI
one. I find it hard to tell because of the slightly different names and
conventions in use in libavcodec, WAVEEXT channel masks, decoders, codec
specifications, HDMI, and platform audio APIs.
The fix is the same as the one for ao_alsa (see commit be49da72). This
should fix at least playing 7.1 sources on OSX with 7.1(rear) selected
in Audio MIDI Setup. The ao_alsa commit mentions XBMC, but I couldn't
find out where it does that or if it also does that for CoreAudio. It's
woth noting that PHT (essentially an old XBMC fork) also exhibited the
incorrect behavior (i.e. side and back speakers were swapped).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove flc-frc <-> sl<->sr. This was just plain wrong, and a mistaken
change to make 7.1 work properly on CoreAudio with 7.1(rear) layout.
Also see the following commit.
Add br-br <-> sl<->sr, because we decided that it makes sense.
Note that this "fudging" is applied only if the channel pairs are
replaced, i.e. they would get dropped and be replaced with silence. This
is done to compensate for libswresample's default rematrixing (which
takes care of some more common cases).
|
|
|
|
| |
And some other simplifications.
|
|
|
|
|
|
|
|
|
|
| |
Avoids "problems". In particular, it makes MMAL output a NOPTS timestamp
if the input timestamp was NOPTS.
Don't do it for other decoders. Ideally, we will at some point in the
future switch to integer fractions for timestamps at least up until the
filter layer. But this would be a larger change, and for now I'd prefer
keeping the not-rounded demuxer timestamps (if we have them).
|
|
|
|
|
|
| |
Also remove the unused function argument.
Fixes #2784.
|
|
|
|
|
| |
Basically, just make it append " (original)" if the original aspect
ratio is selected.
|
|
|
|
|
|
|
|
| |
This is the "unicode" version of it. It appears Firefox uses it now?
I'm not sure if we still need to support the old variant, but hopefully
not.
Fixes #2782.
|
|
|
|
|
|
| |
When the directory contains files named such as xx-14.ext and
xx-14.5.ext, remove the extension to sort the table to load the
14 before the 14.5.
|
|
|
|
| |
Fixes #2710
|
|
|
|
| |
Don't mind me.
|
|
|
|
| |
Slightly better.
|
|
|
|
|
|
| |
Will be helpful for the coming filter support. I planned on merging
audio/video decoding, but this will have to wait a bit longer, so only
remove the duplicate status codes.
|
|
|
|
|
|
| |
Now I'm not sure if this is really necessary to explicitly mention. But
then there have been issues and pull requests without being properly
looked at for a week or longer.
|
|
|
|
| |
Not needed anymore, because the decoder was merged with FFmpeg.
|
|
|
|
|
|
|
| |
Since there can be multiple backends for a single API (vaapi can use GLX
or EGL), not logging the exact backend name is annoying. So add it. At
the same time, there is no need to duplicate the name as used by the
--hwdec options, so replace it with using the numeric hwdec API ID.
|
|
|
|
|
|
|
|
|
| |
Let's fix broken samples with questionable heuristic without real
reasoning. Until this gets fixed properly, this is a good compromise,
though. A proper fix would properly resync audio and video without
brutally resetting the decoders, but on the other hand not doing the
brutal reset would cause issues in other obscure corner cases such
resyncing might cause.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code is tricky because it has to wakeup the mainloop to make
progressing during syncing audio, but also has to avoid waking it up
when it's not needed. Failure to do so either burns CPU by not ever
going to sleep, or causes apparent "freezes" by going to sleep (and it
will continue if the mainloop is woken up e.g. due to user input).
In this case, simply starting A/V playback with --start=5 and removing
an unrelated wakeup in osd.c can trigger such a "freeze". The unrelated
wakeup did hide this bug, nonetheless it's a bug.
(Can't wait to rewrite this shitty audio resync code. And it's all my
fault.)
|
|
|
|
|
|
| |
Explains libdvdnav vs libdvdread situation (as much as I know),
workarounds for bugs, and limitations of image-based subtitles.
(try #4)
|
|
|
|
| |
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
|
|
|
|
|
| |
Commit b53cb8de added a delay queue for decoded frames. This is supposed
to be used with copy-back decoders like dxva2-copy and vaapi-copy.
Surfaces returned by them can't be referenced after uninitializing the
decoders, so they have to be released before destroying the decoder.
Move the flush_all() call above decoder uninit accordingly. Also move
the destruction of the AVFrame used for decoding (just for being
defensive - normally it doesn't hold any reference).
|
|
|
|
| |
I hope.
|
|
|
|
|
|
|
| |
We just need to provide an entrypoint for it, and move the main init
code to a separate function. This gets rid of the messy video chain full
reinit in command.c, which completely destroyed and recreated the video
state for the purpose of mid-stream hw/sw switching.
|
|
|
|
|
|
| |
Don't give the "software_fallback_decoder" field special meaning. Alwass
set it, and rename it to "decoder". Whether hw decoding is used is
determined by the "hwdec" field already.
|
|
|
|
|
|
| |
These changes don't make too much sense without context, but are
preparation for later. Then the audio_src/video_src fields will be
actually be NULL under circumstances.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this commit, reinit_audio_chain() did 2 things: create all the
management data structures and initialize the decoder, and handling lazy
filter/output init (as well as dealing with format changes). For the
second purpose, it could be called multiple times (even though it wasn't
really idempotent). This was pretty weird, so make them separate
functions. The new function is actually idempotent too.
It also turns out the reinit functions don't have to call themselves
recursively for the spdif PCM fallback.
|
|
|
|
| |
Reduces the dependency of the filter/output code on the decoder.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |