| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
previously, this may have caused a leak
|
|
|
|
|
|
|
|
|
|
| |
Apparently, some drivers require you to allocate all of the decoder d3d surfaces
at once. This commit changes the strategy from allocating surfaces as needed via
mp_image_pool_set_allocator, to allocating all the surfaces in one call to
IDirectXVideoDecoderService_CreateSurface and adding them to the pool with
mp_image_pool_add.
fixes #2822
|
|
|
|
|
|
| |
Provide a way for the user to add mp_images to the pool. This is required for
dxva2, for which using set_allocator is extremely awkward since all the d3d9
surfaces must be allocated in advance and all together.
|
|
|
|
|
|
| |
I mistakenly copied the wrong license text into these files when
I created them. Since I'm the only one to have touched these files,
it should be OK to change them.
|
|
|
|
| |
Gets rid of a forward declaration.
|
|
|
|
|
|
|
|
| |
This is achieved indirectly by deslecting all streams for the non-
current segment (and if the segment doesn't share the demuxer with the
currently active one).
Restores functionality added with commit 46bcdb70.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This uses a different method to piece segments together. The old
approach basically changes to a new file (with a new start offset) any
time a segment ends. This meant waiting for audio/video end on segment
end, and then changing to the new segment all at once. It had a very
weird impact on the playback core, and some things (like truly gapless
segment transitions, or frame backstepping) just didn't work.
The new approach adds the demux_timeline pseudo-demuxer, which presents
an uniform packet stream from the many segments. This is pretty similar
to how ordered chapters are implemented everywhere else. It also reminds
of the FFmpeg concat pseudo-demuxer.
The "pure" version of this approach doesn't work though. Segments can
actually have different codec configurations (different extradata), and
subtitles are most likely broken too. (Subtitles have multiple corner
cases which break the pure stream-concatenation approach completely.)
To counter this, we do two things:
- Reinit the decoder with each segment. We go as far as allowing
concatenating files with completely different codecs for the sake
of EDL (which also uses the timeline infrastructure). A "lighter"
approach would try to make use of decoder mechanism to update e.g.
the extradata, but that seems fragile.
- Clip decoded data to segment boundaries. This is equivalent to
normal playback core mechanisms like hr-seek, but now the playback
core doesn't need to care about these things.
These two mechanisms are equivalent to what happened in the old
implementation, except they don't happen in the playback core anymore.
In other words, the playback core is completely relieved from timeline
implementation details. (Which honestly is exactly what I'm trying to
do here. I don't think ordered chapter behavior deserves improvement,
even if it's bad - but I want to get it out from the playback core.)
There is code duplication between audio and video decoder common code.
This is awful and could be shareable - but this will happen later.
Note that the audio path has some code to clip audio frames for the
purpose of codec preroll/gapless handling, but it's not shared as
sharing it would cause more pain than it would help.
|
| |
|
| |
|
|
|
|
|
| |
Preparation for the timeline rewrite. The codec will be able to change,
the stream header not.
|
|
|
|
| |
This is always the same value.
|
|
|
|
| |
Preparation for timeline rewrite.
|
|
|
|
|
| |
The handler was retrieving an invalid charcode for
accented characters, thus ignoring them.
|
|
|
|
| |
(Limited usefulness.)
|
|
|
|
|
|
|
|
|
| |
When playback of a video ends, and the next file has no video at all (no
cover art or anything), then the window must be cleared.
This also resizes the window forcibly, which is by design.
Fixes #2825.
|
|
|
|
|
|
| |
A client API user is allowed to call mpv_opengl_cb_uninit_gl() followed
by mpv_opengl_cb_init_gl(). This crashed; fix it by fixing the lifetime
of ctx->gl.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is required so that the individual surfaces can pass beyond the dxva2
decoder and be passed to the vo.
This also adds additional data to mp_image->planes[0] for IMGFMT_DXVA2, which is
required for maintaining and releasing the surface even if the decoder code is
uninited.
The IDirectXVideoDecoder itself is encapsulated together with its surface pool
and configuration in a dxva2_decoder structure whose creation and destruction is
managed by talloc.
|
| |
|
|
|
|
|
| |
use hwdec_get_max_refs and put the "4 base work surfaces" into
ADDITIONAL_SURFACES macro.
|
| |
|
|
|
|
| |
Fixes #2820.
|
|
|
|
|
| |
Seems like questions related to functionality covered by them are quite
often asked.
|
|
|
|
| |
It signalled failure instead.
|
|
|
|
| |
It's not exactly obvious how they interact.
|
|
|
|
|
|
|
|
| |
Especially useful to see what video formats are involved on the various
filter links.
I suspect this function is not available on Libav, so add necessary
ifdeffery preemptively.
|
|
|
|
|
|
|
| |
The sockaddr_un.sun_len field was not initialized. It seems our API use
is correct by simply making sure it's 0.
Fixes CID 1350075.
|
|
|
|
| |
Fixes CID 1350055 and CID 1350054.
|
|
|
|
|
|
|
|
| |
Don't allow rounding to let it underflow to 0. 0 width or height is
simply not allowed and could cause problems otherwhere.
Indirectly fixes CID 1350057, which complains about not checking the
resulting output size values before using it in divisions.
|
|
|
|
|
|
| |
Fixes CID 1350058.
(Still looks like this might be valid C, in some fucked up way.)
|
|
|
|
|
|
|
| |
Confuses Coverity with FORWARD_NULL on the mp_err() at the end of the
function. These pointers are never NULL.
Fixes CID 1350059.
|
|
|
|
|
|
|
|
|
| |
It thinks that integer_conv_fbo[index] is implied to be accessed with up
to index=5. Although that is theoretical only, it has a point that this
makes no sense. Use the same constant for the array allocation, to make
it more uniform and robust.
Fixes CID 1350060.
|
|
|
|
|
|
| |
Fixes CID 1350062 and 1350061.
Just for the sake of shutting up Coverity.
|
|
|
|
| |
Fixes CID 1350063.
|
|
|
|
|
|
|
| |
The code is shared with the --vd-lavc-threads option, so using 0 for
auto-detection just works.
But no, this is not useful. Just change it for orthogonality.
|
|
|
|
| |
Fixes #2808.
|
|
|
|
| |
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.
|
|
|
|
|