Commit graph

114382 commits

Author SHA1 Message Date
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
Stéphane Cerveau
63de6d564e videodecoder: add API to receive subframes
A video decoder can now receive subframes and start decoding
instead of waiting for the full frame to be complete.
Subframe support will reduce latency as described in the
video encoder base class.

A unit test illustrating this API is available in
tests/check/libs/videodecoder.c.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/454>
2021-07-08 13:19:21 +02:00
Seungha Yang
f57370c4db mfvideosrc: Fix negotiation when interlace-mode is specified
Given caps does not need to be strictly subset of device caps.
Allow accept it if device caps and requested caps can intersect

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1619
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2384>
2021-07-08 19:06:28 +09:00
Kasper Steensig Jensen
674e6fcf65 Add meson description for tracer_hooks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/849>
2021-07-08 11:48:58 +02:00
Mathieu Duponchelle
64190e7452 cccombiner: mark field 0 as valid when generating padding CDP
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2383>
2021-07-08 00:26:05 +00:00
Mathieu Duponchelle
a6d6e99f59 splitmuxsink: always use factory property when set
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1024>
2021-07-08 02:23:02 +02:00
Olivier Crête
81cbd0deb6 avviddec: Split allocation tracking from decode-only-ness
When doing subframe decoding, handle_frame will be called multiple
times, so the DECODE_ONLY flag gets re-set when it shouldn't. Instead,
let's create our own flag to track this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/66>
2021-07-07 18:45:51 +02:00
Seungha Yang
2cd83fb4ef mfvideobuffer: Don't error for unexpected Unlock/Unlock2D call
Some GPU vendor's MFT implementation calls IMFMediaBuffer::Unlock()
without previous IMFMediaBuffer::Lock() call. Which is obviously
driver bug but we can ignore the Unlock call.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2381>
2021-07-07 16:07:28 +00:00
Stéphane Cerveau
a8c2b65880 dashsink: fix crash with no pad name for representation
if there is no pad name, the representation id
was NULL, causing a crash when writing the mpd file.

gst-launch-1.0 videotestsrc num-buffers=900 ! video/x-raw, width=800,
height=600, framerate=30/1 ! x264enc ! video/x-h264, profile=high !
dashsink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2064>
2021-07-07 13:50:35 +00:00
Stéphane Cerveau
506bd90bf7 dashsink: Add signals for allowing custom playlist/fragment
Instead of always going through the file system API we allow the
application to modify the behaviour. For the playlist itself and
fragments, the application can provide a GOutputStream. In addition the
sink notifies the application whenever a fragment can be deleted.

Following the HLS change:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/918

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2064>
2021-07-07 13:50:35 +00:00
He Junyan
078b2699e7 codecs: h265dec: Disable the POC order warning for negative POC.
There may be leading frames after the IRAP frames, which has negative
POC. This kind of frames are allowed and they will be displayed before
the IRAP frame. So the warning should not be triggered for them. Init
the last_output_poc to G_MININT32 can avoid this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2380>
2021-07-06 14:33:21 +00:00
He Junyan
1fa9f26a53 codecs: h264dec: Disable the POC order warning for negative POC.
There may be leading frames after the IDR frame, which has negative
POC. This kind of frames are allowed and they will be displayed before
the IDR frame. So the warning should not be triggered for them. Init
the last_output_poc to G_MININT32 can avoid this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2380>
2021-07-06 14:33:21 +00:00
Yacine Bandou
ce0be27caf qtdemux: No need for new "application/x-cbcs" caps
Instead of using the new "application/x-cbcs" caps, we are just adding
a new structure field "ciphe-mode", to indicate which encryption scheme
is used: "cenc", "cbcs", "cbc1" or "cens".

Similarly for the protection metadata, we add the "cipher-mode" field
to specify the encryption mode with which the buffers are encrypted.

"cenc": AES-CTR (no pattern)
"cbc1": AES-CBC (no pattern)
"cens": AES-CTR (pattern specified)
"cbcs": AES-CBC (pattern specified, using a constant IV)

Currently only "cenc" and "cbcs" are supported.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1013>
2021-07-06 12:12:24 +00:00