Commit graph

113094 commits

Author SHA1 Message Date
He Junyan
6a9f84a2de va: h265dec: Do not add non reference frames into ref list.
The VA's ReferenceFrames should only contain the reference frame, we
should not add the non reference frames into this list.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2414>
2021-07-16 15:50:47 +08:00
Seungha Yang
26fe552707 tests: Enable closedcaption test on Windows
... if closedcaption plugin is available

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2411>
2021-07-15 17:25:37 +00:00
Seungha Yang
9becc1fe7e mfvideoenc: Disable RGB format support
Some GPUs support BGRA format and it will be converted to subsampled
YUV format by GPU internally. Disable this implicit conversion
since the conversion parameters such as input/output colorimetry
are not exposed nor it's written in bitstream (e.g., VUI).
We prefer explicit conversion via our conversion elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2410>
2021-07-15 16:50:26 +00:00
Nicolas Dufresne
210cf85fdc gl: x11: Issue XSync to close our top level window
This is similar action as when the window handle is modified, we now issue
XSync whenever we destroy our internal window. This ensure that the window is
properly closed before the connecgtion is dropped.

Fixes #815

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1226>
2021-07-15 16:22:48 +00:00
Nicolas Dufresne
3e69c5546b gl: wayland: Fix hinding the window on close()
When the window is called, we properly destroy all surfaces, which effectively
will unmap that surface and should make it disapear on screen, but we also
destroy the wl_source, a GSource that is resposibble of dispatching and executing
messages to/from the Wayland server.

As a side effect, the server never gets the message and the surfaces are
"leaked" on the server. We fix this using wl_display_flush() before destroying
the wl_source.

Fixes #815

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1226>
2021-07-15 16:22:48 +00:00
Nicolas Dufresne
88e19f857a tests: example: Add missing glx_dep when building sdlshare
Might be realted to some recent Mesa cleanup, but GLX is not longer visible
through libOpenGL, so add the missing deps now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1227>
2021-07-15 11:11:00 -04:00
He Junyan
67d482f8fb va: h265dec: Fix a temp var overflow bug when write pred weight table.
The temp guint8 var of delta_chroma_offset_l0 and delta_chroma_offset_l1
can not cover the full range of delta_chroma_weight_l0/1 in the slice
header. When overflow happens, the decoder result is wrong.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2412>
2021-07-15 14:25:09 +00:00
Philippe Normand
bc09d8cc66 dash: Store entire ContentProtection node in protection event data
Some manifests use the ContentProtection node to store additional information
such as the license server url. Our MPD parser used to process the
ContentProtection node, extracting Playready PSSH boxes. However for other DRM
systems, only the `value` attribute was passed down to the protection event, so
for example, Widevine data was not parsed at all and "Widevine" was passed to
the event, which is not very useful for decryptors that require a PSSH init
data.

Parsing should now be done by decryptors which will receive the entire
ContentProtection XML node as a string. This gives more "freedom" to the
decryptor which can then detect and parse custom nodes as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2400>
2021-07-15 13:05:54 +00:00
Edward Hervey
cdfa0778c7 validate-media-descriptor: Don't check segment position field
The position field of GstSegment is meant for private usage within
elements. Don't compare the values of it when doing media-check.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/251>
2021-07-15 14:42:51 +02:00
He Junyan
ff0e42eb30 va: vp9dec: We need to check the resolution changes for every frame.
The VP9 streams have the ability to change the resolution dynamically
at any time point. It does not send ad KEY frame before change the
resolution, even the INTER frame can change the resolution immediately.
So we need to check the resolution change for each frame and do the
re-negiotiation if needed.

Some insaned stream may play in resolution A first and then dynamically
changes to B, and after 1 or 2 frames, it use a show_existing_frame to
repeat the old frame of resolution A before. So, not only new_picture(),
but also duplicate_picture() need to check this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2407>
2021-07-15 09:42:51 +00:00
He Junyan
458ac4a693 va: vp9dec: Do not re-create context for dynamical resolution change.
The driver for VP9 should have the ability to handle the dynamical resolution
changes. So if only the resolution changes, we should not re-create the config
and context in negotiation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2407>
2021-07-15 09:42:51 +00:00
He Junyan
6887e77201 va: decoder: Add helper functions to get and change the resolution.
Some codecs such as VP9, its config and context have the ability to
dynamically. When we only change the width and height, no need to
re-create the config and context. The helper function can just change
the resolution without re-creating config and context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2407>
2021-07-15 09:42:51 +00:00
Stéphane Cerveau
342c05e778 gitlab: add bug template
To clarify what is expected in an issue description and avoid
issue which is just an usage issue, add a bug template in gitlab.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/836>
2021-07-15 11:17:10 +02:00
Jan Schmidt
30e105561d mpegtsmux: Quieten "missed PCR" warnings in VBR mode.
When the muxer is operating in VBR mode, it's kind of expected
for now that we might not put the PCR in exactly the right place,
because the muxer doesn't schedule packets that way. In that case
don't warn constantly about the PCR ending up a few ms off target.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2295>
2021-07-15 04:46:03 +00:00
Matthew Waters
fdca97eca8 rtmp2src: workaround a GLib race when destroying a GMainContext/GSource
https://gitlab.gnome.org/GNOME/glib/-/issues/803

Basically, if destruction of a GSource and its associated GMainContext are
not synchronised, Then the GSource destruction can access freed
GMainContext resources and cause a crash.  This is not super common but
can happen.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2405>
2021-07-15 14:10:04 +10:00
Mads Buvik Sandvei
bc6b68215f codecs: h265decoder: Always free messages while parsing SEI
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2390>
2021-07-14 17:56:27 +00:00
Ruben Gonzalez
4aa734919f application-development: Fix " Non-instantiatable classed types" link
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/160>
2021-07-14 17:00:56 +02:00
Seungha Yang
cd50b02bc9 vp9parse: Skip parsing decode-only frame
Decode-only frame (i.e., show_existing_frame == 1) doesn't hold
any valid information apart from the index of frame to be duplicated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2408>
2021-07-14 14:32:57 +00:00
Philippe Normand
108eba3603 wpesrcbin: Use gst_buffer_new_memdup()
g_memdup() is deprecated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2406>
2021-07-13 16:03:10 +00:00
He Junyan
55ccc581b2 codecs: vp9statefulparser: not init segmentation_abs_or_delta_update.
The segmentation_abs_or_delta_update is a stateful var, it should not
be inited every time when parsing the segmentation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2403>
2021-07-13 15:34:57 +00:00
Matthew Waters
2ed12573b8 examples/qt/textureshare: add explicit dep on glx_dep
Fixes linking:

/usr/bin/ld: subprojects/gst-plugins-base/tests/examples/gl/qt/qglwtextureshare/qglwtextureshare.p/qglrenderer.cpp.o: undefined reference to symbol 'glXGetCurrentContext'
/usr/bin/ld: /usr/lib64/libGLX.so.0: error adding symbols: DSO missing from command line

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1143>
2021-07-13 13:42:13 +00:00
Haelwenn (lanodan) Monnier
e08dcdf622 gl: Try GLVND 'opengl' and 'glx' first
This fixes targetting desktop OpenGL without libGL.so

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1143>
2021-07-13 13:42:13 +00:00
Mathieu Duponchelle
2c85fd1be9 deinterlace: reduce noise when gst_pad_set_caps fails
It may be that downstream is simply flushing, in which case logging
an error is misleading.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1029>
2021-07-13 06:52:26 +00:00
Seungha Yang
051b5de39e tests: wasapi2: Add more device reuse cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2402>
2021-07-13 03:36:37 +09:00
Seungha Yang
5932a853f8 wasapi2ringbuffer: Close IAudioClient on GstAudioRingBuffer::release
IAudioClient interface is not reusable once it's initialized.
So we should close the handle and reopen it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2402>
2021-07-13 03:36:37 +09:00
Seungha Yang
fa4fb4c47f wasapi2ringbuffer: Run gst-indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2402>
2021-07-13 03:36:37 +09:00
Daniel Almeida
d0e614b354 codecparsers: av1: fix underflow in last_frame_idx
The spec mandates this field be parsed using unsigned arithmetic. Nevertheless,
av1parser will use -1 apparently as an uninitialized value in
gst_av1_parse_frame_header. This immediately underflows last_frame_idx
though, since its type was defined as guint8. Fix this by converting to gint8.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2401>
2021-07-12 17:49:17 +00:00
Jakub Janků
211f968981 wasapi: fix reinit of audioclient in prepare()
When the sink goes from PLAYING to READY and then back to PLAYING,
the initialization of the audioclient in prepare() fails with the
error AUDCLNT_E_ALREADY_INITIALIZED. As a result, the playback
stops.

To fix this, we need to drop the AudioClient in unprepare() and
grab a new one in prepare() to be able to initialize it again
with the new buffer spec.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2096>
2021-07-12 13:47:07 +02:00
Jakub Janků
766a126380 wasapi: split gst_wasapi_util_get_device_client()
The functionality now resides in
gst_wasapi_util_get_device() and
gst_wasapi_util_get_audio_client().

This is a preparatory patch. It will be used in the following
patch to init/deinit the AudioClient separately from the device.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2096>
2021-07-12 13:47:06 +02:00
Jakub Janků
d83881d43a tests: wasapi: check PLAYING -> READY -> PLAYING
Such sequence of state changes is valid and no error should happen.
At the moment, the test fails. Following patches aim to fix it.

Partially based on the code in tests/check/elements/wasapi2.c

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2096>
2021-07-12 13:47:06 +02:00
Sebastian Dröge
9243418a23 audioaggregator: Only post QoS messages if the property is enabled
Previously one of the branches did not check for the property value. To
avoid this in the future, check inside the QoS calculation function
instead.

As a side effect this now always prints the debug messages into the logs
when samples are dropped, which is useful information even without the
QoS messages.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1224>
2021-07-12 09:42:39 +03:00
Sebastian Dröge
71e46bcf38 audioaggregator: Resync on the next buffer when dropping a buffer on discont resyncing
If a buffer is dropped during resyncing on a discont because either its
end offset is already before the current output offset of the
aggregator or because it fully overlaps with the part of the current
output buffer that was already filled, then don't just assume that the
next buffer is going to start at exactly the expected offset. It might
still require some more dropping of samples.

This caused the input to be mixed with an offset to its actual position
in the output stream, causing additional latency and wrong
synchronization between the different input streams.

Instead consider each buffer after a discont as a discont until the
aggregator actually resynced and starts mixing samples from the input
again.

Also update the start output offset of a new input buffer if samples
have to be dropped at the beginning. Otherwise it might be mixed too
early into the output and overwrite part of the output buffer that
already took samples from this input into account.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/912
which is a regression introduced by https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1180/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1224>
2021-07-12 09:42:39 +03:00
Guido Günther
f331082b20 play: Emit correct signal
SIGNAL_MEDIA_INFO_UPDATED should be emitted on media info changes,
not SIGNAL_VIDEO_DIMENSIONS_CHANGED.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2398>
2021-07-12 06:28:41 +00:00
Víctor Manuel Jáquez Leal
c22ae0700b vulkan: Declare missing auto-pointer cleanup functions.
Also removed a couple guards since, given the glib dependency, they
are set.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2396>
2021-07-12 05:08:09 +00:00
Víctor Manuel Jáquez Leal
9c3363a25d vulkan: filter: Use filter variable name for choosing queue.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2396>
2021-07-12 05:08:09 +00:00
Víctor Manuel Jáquez Leal
1a32deefa6 vulkansink: Fix element metadata.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2396>
2021-07-12 05:08:09 +00:00
Yinhang Liu
2c70641b42 msdkvpp: use NV12 as default format on srcpad
By default, sinkpad is NV12 format and srcpad is BGRA format, the
different format will trigger an implicit format conversion in
msdkvpp, which will cause performance drop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2394>
2021-07-09 17:31:10 +00:00
Dominique Martinet
ff6442f6f9 gst-libs/gst/wayland: handle display passing better
failure to pass a display in 'handle' would result in uninitialized value
being returned, which would often segfault later down the road when trying
to initialize gstreamer context with it.
Check the return value of gst_structure_get() to make sure we return valid
data.

Furthermore, the gstglimagesink in gst-plugins-base also has a similar
mechanism but uses 'display' as field name to pass the value; instead of
requiring the application to behave differently depending on what sink
was automatically detected just try to read both values here, with display
being the new default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2292>
2021-07-09 13:15:54 +00:00
Guillaume Desmottes
503db0f1af omxvideodec: fix OMX flags on header buffer
The header (SPS/PPS) buffer should have the CODECONFIG flag

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-omx/-/merge_requests/49>
2021-07-09 15:15:12 +02:00
Guillaume Desmottes
006e0636fd omxvideodec: allow to start decoder on HEADER buffer
If the headers are sent in their own buffer
it won't have the SYNC_FRAME flag but we still
do want to start decoding rather than dropping it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-omx/-/merge_requests/49>
2021-07-09 15:13:36 +02:00
Nicolas Dufresne
aa99c5387f omxh26xdec: videodecoder support subframe
Use of subframe API from videodecoder base class.
This subframe allows to decode subframe instead of
waiting for a whole frame.
The subframe uses the same frame over the whole
subframe passing process and will wait
for a signal to know the last subframe.
In this implementation it will use
GST_VIDEO_BUFFER_FLAG_MARKER as the
end of batch of subframes.

This implement subframe mode negotation for the Zynq based on caps
negotation. This mode can be combined with low-latency mode, in order to
reach the lowest possible latency (assuming the stream is within the
low-latency constraints for the HW).

... ! video/x-h264,alignment=nal ! omxh264dec ! ...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-omx/-/merge_requests/49>
2021-07-09 15:13:27 +02:00
Víctor Manuel Jáquez Leal
e0a56f3391 Revert "vaapi: Demote vaapidecodebin to rank NONE."
This reverts commit 7a25c5d4ec.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/436>
2021-07-09 11:01:14 +02:00
Olivier Crête
e8b4164a1f audiomixer: Add test for QoS message posting
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1209>
2021-07-08 23:01:13 -04:00
Olivier Crête
49f6d3bf33 audio aggregator: Post QoS message when dropping audio
Post a QoS message every time some audio samples are dropped.
Also print log messages to make it easier to debug

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1209>
2021-07-08 23:01:13 -04:00
Olivier Crête
ea516aee33 audio aggregator: Count samples that are dropped or processed
Keep a count of samples that are dropped or processed as statistics

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1209>
2021-07-08 23:01:13 -04:00
Olivier Crête
e3be1b8490 audio aggregator: Add QoS property to pad
Add a property to emit a QoS message whenever any data is dropped.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1209>
2021-07-08 23:01:13 -04:00
Olivier Crête
1eff5ffef6 audio aggregator: Rename property enum to match class name
Add "CONVERT" into the property enum as we're going to add an
enum specifically for the base pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1209>
2021-07-08 22:34:49 +00:00
Olivier Crête
17aca8a8c2 avviddec: Enable subframe decoding for H.264
Enable sending NAL units to the decoder without having to first
group them in a frame (an AU).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/66>
2021-07-08 18:39:28 +02:00
Philippe Normand
be7e0600ec dashdemux: Log protection events on corresponding pad
GstDashDemuxStream is not a GstObject, so use its pad as associated object when
emitting log messages.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2389>
2021-07-08 14:42:12 +00:00
He Junyan
cbb1096c52 va: vpp: Improve the color properties setting.
The current setting of color properties are not very correct and
we will get some kind of "unknown Color Standard for YUV format"
warnings printed out by drivers. The video-color already provides
some standard APIs for us, and we can use them directly.
We also change the logic to: Finding the exactly match or explicit
standard first. If not found, we continue to find the most similar
one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2385>
2021-07-08 13:36:05 +00:00