platform/upstream/gstreamer.git
16 months agodecklink: Calculate string size before malloc
Maksym Khomenko [Wed, 31 May 2023 20:44:42 +0000 (23:44 +0300)]
decklink: Calculate string size before malloc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4786>

16 months agodecklink: Use the macOS version of the SDK on macOS and not the Linux one
Sebastian Dröge [Tue, 30 May 2023 12:27:21 +0000 (15:27 +0300)]
decklink: Use the macOS version of the SDK on macOS and not the Linux one

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4786>

16 months agodecklink: Free SDK strings after usage on Linux
Sebastian Dröge [Tue, 30 May 2023 10:23:28 +0000 (13:23 +0300)]
decklink: Free SDK strings after usage on Linux

While they're const char* they still need to be freed like on Windows
and macOS and would be leaked otherwise.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4786>

16 months agodecklink: Correctly handle SDK strings on macOS
Sebastian Dröge [Tue, 30 May 2023 10:22:44 +0000 (13:22 +0300)]
decklink: Correctly handle SDK strings on macOS

They're CFStringRef* and not plain NUL-terminated char* C strings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4786>

16 months agov4l2videodec: treat MPEG 1 format as MPEG 2
Hou Qi [Tue, 6 Jun 2023 01:24:37 +0000 (09:24 +0800)]
v4l2videodec: treat MPEG 1 format as MPEG 2

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4787>

16 months agomeson: Support building qml6glsink on win32
Nirbheek Chauhan [Thu, 18 May 2023 08:53:49 +0000 (14:23 +0530)]
meson: Support building qml6glsink on win32

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4762>

16 months agomeson: Add more qt options and eliminate all automagic
Nirbheek Chauhan [Wed, 3 May 2023 15:35:54 +0000 (21:05 +0530)]
meson: Add more qt options and eliminate all automagic

The qt5 and qt6 plugins will now correctly error out if you enable the
option, and you can also now explicitly ensure that wayland, x11,
eglfs support is actually functional by enabling the options. It was
too easy to build non-functional support for these.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4776>

16 months agomeson: Add build_rpath for qt5 plugin on macOS
Nirbheek Chauhan [Tue, 10 Jan 2023 19:41:06 +0000 (01:11 +0530)]
meson: Add build_rpath for qt5 plugin on macOS

Without this, the plugin cannot be loaded in a devenv because the
RPATH is not added to the plugin dylib. This RPATH will be stripped on
install, which is what we want.

When deploying apps, people are supposed to use `macdeployqt` to
create an AppBundle that bundles Qt for you and sets the RPATHs
correctly to point to that bundled Qt.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4776>

17 months agodocs: Use backticks to escape * in markdown
Nirbheek Chauhan [Thu, 1 Jun 2023 09:19:06 +0000 (14:49 +0530)]
docs: Use backticks to escape * in markdown

Otherwise it's interpreted as emphasis.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4763>

17 months agopython: More functions can be called before gst_init()
Nirbheek Chauhan [Tue, 30 May 2023 15:18:39 +0000 (20:48 +0530)]
python: More functions can be called before gst_init()

Configuration of our debugging system is possible before init, and in
fact is necessary too, otherwise the settings won't apply to logging
that happens during init.

For instance, since you cannot register a log function before you call
init in python, there is no way for you to log errors during init to
whatever logging service your app uses.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4763>

17 months agopython: auto-pep8 whitespace issues in overrides
Nirbheek Chauhan [Tue, 30 May 2023 15:16:37 +0000 (20:46 +0530)]
python: auto-pep8 whitespace issues in overrides

Needed because the next commit edits this file.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4763>

17 months agointegration-testsuites/media: Update to tip of medias 1.22 branch
Philippe Normand [Fri, 2 Jun 2023 13:20:05 +0000 (14:20 +0100)]
integration-testsuites/media: Update to tip of medias 1.22 branch

This fixes the new media file that was added to git, instead of git-lfs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4761>

17 months agopngdec: Fix 16bit RGB images display
Piotr Brzeziński [Thu, 1 Jun 2023 14:21:47 +0000 (16:21 +0200)]
pngdec: Fix 16bit RGB images display

Due to the alpha value being inserted with _BEFORE, we were ending up
with ARGB instead of RGBA, thus displaying completely wrong colours.
According to libpng's manual, "to add an opaque alpha channel, use filler=0xff
or 0xffff and PNG_FILLER_AFTER which will generate RGBA pixels".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4759>

17 months agooggdemux: vp8: Detect keyframe packets
Philippe Normand [Sat, 27 May 2023 12:06:22 +0000 (13:06 +0100)]
oggdemux: vp8: Detect keyframe packets

decodebin3 drops data on video streams until a keyframe or header is detected,
so for Ogg/VP8 we now need to correctly flag and signal keyframes downstream.
The first buffer pushed from each src pad also has the HEADER flag set.

Fixes playback of
https://github.com/web-platform-tests/wpt/raw/master/media/test.ogv in playbin3.

Fixes #1418

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4745>

17 months agointegration-testsuites: Update to medias subproject 1.22
Philippe Normand [Thu, 1 Jun 2023 11:37:56 +0000 (12:37 +0100)]
integration-testsuites: Update to medias subproject 1.22

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4745>

17 months agostreamsynchronizer: check reset-time when handling FLUSH_STOP
Guillaume Desmottes [Wed, 31 May 2023 14:26:45 +0000 (16:26 +0200)]
streamsynchronizer: check reset-time when handling FLUSH_STOP

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4755>

17 months agostreamsynchronizer: reset eos on STREAM_START
Guillaume Desmottes [Wed, 31 May 2023 14:05:48 +0000 (16:05 +0200)]
streamsynchronizer: reset eos on STREAM_START

self->eos was never reset after streamsynchronizer has sent EOS
(except on explicit flush or switching back to PAUSED).
As a result, synchronization was broken if new streams were pushed later
as gst_stream_synchronizer_wait() does not wait if self->eos is set.

Fix this by reseting self->eos on STREAM_START as that means a new
stream is being sent upstream and so a new EOS will follow later on.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4755>

17 months agowaylandsink: Emit "map" signal boarder surface is ready
Colin Kinloch [Fri, 26 May 2023 12:26:42 +0000 (13:26 +0100)]
waylandsink: Emit "map" signal boarder surface is ready

This allows gtkwaylandsink to queue a draw of its gtk widget at the
correct time, avoiding a race.

Signed-off-by: Colin Kinloch <colin.kinloch@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4754>

17 months agoges: tests: Use assert_equals_int where it makes sense
Thibault Saunier [Tue, 18 Apr 2023 21:19:16 +0000 (17:19 -0400)]
ges: tests: Use assert_equals_int where it makes sense

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4743>

17 months agoges: launcher: Never put sinks in a GstPipeline
Thibault Saunier [Fri, 28 Apr 2023 15:55:45 +0000 (17:55 +0200)]
ges: launcher: Never put sinks in a GstPipeline

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4743>

17 months agoqt/glrenderer: don't attempt to use QWindow from non-Qt main thread
Matthew Waters [Mon, 29 May 2023 07:01:01 +0000 (17:01 +1000)]
qt/glrenderer: don't attempt to use QWindow from non-Qt main thread

Use QObject::deleteLater() to schedule deletion in the main thread.

Remove the moveToThread of the QWindow.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4744>

17 months agofdkaacdec: Support up to 5 rear channels
Jan Alexander Steffens (heftig) [Thu, 25 May 2023 15:02:24 +0000 (17:02 +0200)]
fdkaacdec: Support up to 5 rear channels

The `switch (n_rear)` supports up to 5 rear channels, but our channel
set only had space for 3. Size the set properly to fix this.

This didn't actually cause any memory unsafety as `PUSH_CHAN` would stop
incrementing `n_rear` if the channel set is already full.

Thanks to @alatiera for noticing this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4740>

17 months agovideo-blend: Fix linking error with C++
Seungha Yang [Sun, 28 May 2023 17:14:44 +0000 (02:14 +0900)]
video-blend: Fix linking error with C++

Add missing extern "C"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4735>

17 months agoflvmux: use the correct timestamp to calculate wait times
Michael Olbrich [Wed, 24 May 2023 14:17:46 +0000 (16:17 +0200)]
flvmux: use the correct timestamp to calculate wait times

Since c0bf793c05cf793aa18a8548cda702625e388115 ("flvmux: Set PTS based on
running time") the timestamp of the output buffer is already in running
time. So using that for 'srcpad->segment.position' does not work correctly
because gst_aggregator_simple_get_next_time() will convert it again with
gst_segment_to_running_time().
This means that the timestamp returned by
gst_aggregator_simple_get_next_time() may be incorrect. For example, if
flvmux is added to a already runinng pipeline then the timestamp is too
small and gst_aggregator_wait_and_check() returns immediately. As a result,
buffers may be muxed in the wrong order.

To fix this, use the PTS of the incoming buffer instead of the outgoing
buffer. Also add the duration as get_next_time() is supposed to return the
timestamp of the next buffer, not the current one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4734>

17 months agojpegdec: be stricter when detecting interlaced video
Michael Olbrich [Mon, 31 Aug 2020 14:38:48 +0000 (16:38 +0200)]
jpegdec: be stricter when detecting interlaced video

There are broken(?) mjpeg videos that are incorrectly detected as
interlaced. This happens because 'info.height > height' (e.g. 1088 > 1080).

In the interlaced case info.height is approximately 'height * 2' but not
exactly because height is a multiple of DCTSIZE. Make the check more
restrictive but take the rounding effect into account.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4717>

17 months agojpegdec: decode the correct number of lines for interlaced frames
Michael Olbrich [Mon, 31 Aug 2020 14:12:33 +0000 (16:12 +0200)]
jpegdec: decode the correct number of lines for interlaced frames

For interlaced jpeg, gst_jpeg_dec_decode_direct() is called twice, once for each
field. In this case, stride[n] is plane_stride[n] * 2 to ensure that only every
other line is written. So the loop must stop at height / num_fields.

If the frame is really interlaced then continuing beyound this, is not harmful,
because jpeg_read_raw_data() will do nothing and return 0, so am info message is
printed.

However, if the frame is not actually interlaced, just misdetected as interlaced
then there is still data available from the second half of the frame. Now
line[0][j] is set to the scratch buffer. If the scratch buffer is not allocated
(because the height is a multiple of v_samp[0] * DCTSIZE) then the result is a
segfault due to a null-pointer dereference.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4717>

17 months agod3d11videosink: Fix error on pause and play
Seungha Yang [Wed, 24 May 2023 13:12:51 +0000 (22:12 +0900)]
d3d11videosink: Fix error on pause and play

The show_frame() can be called without prepare() call on paused to
playing state change. Thus the prepared buffer should not be cleared
on show_frame()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4714>

17 months agovideometa: Only validate the alignment only when it contains some info
He Junyan [Fri, 19 May 2023 07:20:16 +0000 (15:20 +0800)]
videometa: Only validate the alignment only when it contains some info

When the alignment contains nothing, all its fields are 0 and always
can be satisfied. So there is no need to validate it in this case.
And there are a lot of places just setting this alignment to default
all zero value, this validation generates lots of warnings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4704>

17 months agov4l2videoenc: support force keyframe event in v4l2 encoder
YURI FEDOSEEV [Fri, 5 May 2023 07:12:46 +0000 (15:12 +0800)]
v4l2videoenc: support force keyframe event in v4l2 encoder

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4702>

17 months agoalsasink: Fix stall for transition of alsasink from PAUSED to READY with USB speakerphone
Nicolas Beland [Mon, 15 May 2023 19:57:15 +0000 (15:57 -0400)]
alsasink: Fix stall for transition of alsasink from PAUSED to READY with USB speakerphone

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4699>

17 months agovideo: convertframe: Add D3D11 specific conversion path
Seungha Yang [Mon, 4 Jul 2022 20:14:01 +0000 (05:14 +0900)]
video: convertframe: Add D3D11 specific conversion path

Add d3d11 conversion path to make gst_video_convert_sample() work
for GstD3D11Memory.

Note that just adding "d3d11download" to the exisitng code is
suboptimal from GstD3D11 point of view because:
* d3d11convert element can support crop/colorspace-conversion/scale
  all at once while existing software pipeline needs intermediate steps
  for the conversion
* "Process everything on GPU then download it to CPU memory" would be likely
  faster than "download GPU memory to CPU then processing it on CPU"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4689>

17 months agovideo: convertframe: Remove pointless const qualifier
Seungha Yang [Mon, 4 Jul 2022 19:42:57 +0000 (04:42 +0900)]
video: convertframe: Remove pointless const qualifier

const keyword for refcounted object does not very make sense
and unnecessary in this case

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4689>

17 months agotestsrcbin: Remove spurious caps unref
Thibault Saunier [Thu, 18 May 2023 13:27:29 +0000 (09:27 -0400)]
testsrcbin: Remove spurious caps unref

Caps are cleared at the end of the function

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2575

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4685>

17 months agoptp: Work around bug in ptpd in default configuration
Sebastian Dröge [Wed, 17 May 2023 07:01:30 +0000 (10:01 +0300)]
ptp: Work around bug in ptpd in default configuration

ptpd is defaulting to the hybrid mode, and was sending invalid multicast
PTP messages in that configuration until ce96c742a88792a8d92deebaf03927e1b367f4a9.
While this commit was made in 2015 there was no release in the meantime.

Work around this by detecting this case and defaulting to the default
values for the given intervals as given by the PTP standard.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4683>

17 months agoBack to development
Tim-Philipp Müller [Fri, 19 May 2023 11:36:19 +0000 (12:36 +0100)]
Back to development

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4679>

17 months agoRelease 1.22.3
Tim-Philipp Müller [Fri, 19 May 2023 08:23:19 +0000 (09:23 +0100)]
Release 1.22.3

17 months agov4l2object: fix some errors in probe_caps_for_fromat
Shengqi Yu [Sat, 6 May 2023 03:17:43 +0000 (11:17 +0800)]
v4l2object: fix some errors in probe_caps_for_fromat

1, there is a mistake when print stepwise.max_height, fix it
2, modify the calculation of width and height under the step wise
condition

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4672>

17 months agov4l2: videodec: Fix stalls on empty buffer
Nicolas Dufresne [Thu, 18 May 2023 15:58:51 +0000 (11:58 -0400)]
v4l2: videodec: Fix stalls on empty buffer

Drivers may signal end of sequence using an empty buffer and LAST buffer
set, or just an empty buffer on certain legacy implementation. When this
occured, we'd send GST_V4L2_FLOW_LAST_BUFFER were the code expected
GST_FLOW_EOS. Stop abusing GST_FLOW_EOS and port all the code to the new
GST_V4L2_FLOW_LAST_BUFFER.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4671>

17 months agogstplay: fix critical log when enable playbin3
Haihua Hu [Thu, 20 Apr 2023 08:41:11 +0000 (16:41 +0800)]
gstplay: fix critical log when enable playbin3

when play rtsp stream with playbin3 enabled, there are some critical logs:

g_object_get_is_valid_property: object class 'GstPlayBin3' has no property named 'n-video'
g_object_get_is_valid_property: object class 'GstPlayBin3' has no property named 'n-audio'
g_object_get_is_valid_property: object class 'GstPlayBin3' has no property named 'n-text'

self->collection could be NULL when READY->PAUSED if the pipeline
is live, then it will fallback to query playbin2's property,
we can call gst_play_streams_info_create_from_collection
directly, it will check self->collection internal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4666>

17 months agogstplay: avoid getting property of playbin2 if subtitle_sid is null
Elliot Chen [Thu, 2 Mar 2023 10:09:54 +0000 (18:09 +0800)]
gstplay: avoid getting property of playbin2 if subtitle_sid is null

 There is a probability of getting "current-text" property
 when play with playbin3, and this property is available
 only in playbin2.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4661>

17 months agosplitmuxsrc: Make PTS contiguous by preference
Jan Schmidt [Mon, 15 May 2023 09:10:39 +0000 (19:10 +1000)]
splitmuxsrc: Make PTS contiguous by preference

Make splitmuxsrc deal better with stream reordering by
making the largest observed PTS contiguous in the
next fragment. Previously, it selected DTS, but then
aligned that with the segment start of the next fragment,
which holds PTS values - leading to glitches in
streams that don't have PTS = DTS at the start.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4660>

17 months agod3d11convert: Fix for runtime property update
Seungha Yang [Tue, 16 May 2023 13:56:15 +0000 (22:56 +0900)]
d3d11convert: Fix for runtime property update

Every setup happens in set_caps() method but basetransform will not
call the set_caps() if in/out caps were not changed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4652>

17 months agod3d11convert: protect 'add-borders' with mutex
Aleksandr Slobodeniuk [Fri, 17 Mar 2023 19:44:30 +0000 (20:44 +0100)]
d3d11convert: protect 'add-borders' with mutex

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4652>

17 months agoRevert "meson: Install viv-fb GL headers, needed by i.MX"
Matthew Waters [Wed, 17 May 2023 11:43:21 +0000 (21:43 +1000)]
Revert "meson: Install viv-fb GL headers, needed by i.MX"

Missing pkg-config files and gir files as is required from any public
facing GL API for bindings reasons.

This reverts commit c95b7b8e7aa80276c0604dd3dd03eeda634f42b9.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4657>

17 months agodecodebin3: fix random hang when remove failing stream
Haihua Hu [Wed, 10 May 2023 08:34:16 +0000 (16:34 +0800)]
decodebin3: fix random hang when remove failing stream

When reconfigure_output_stream entry missing decoder path,
requested_selection should been update with what is really
active/selected immdiately with SELECTION_LOCK hold. So
use an optional message return from reconfigure_output_stream
and post it after release SELECTION_LOCK. This can make sure
other thread call to check_slot_reconfiguration will got
a correct requested_selection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4656>

17 months agoavdtputil: Use int instead of int range for fixed bitpool values
Carlos Rafael Giani [Mon, 15 May 2023 11:47:16 +0000 (13:47 +0200)]
avdtputil: Use int instead of int range for fixed bitpool values

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1698

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4655>

17 months agoRevert "webrtc/nice: support consent-freshness RFC7675"
Tim-Philipp Müller [Tue, 16 May 2023 15:17:05 +0000 (16:17 +0100)]
Revert "webrtc/nice: support consent-freshness RFC7675"

This reverts commit 0161687505156f54ff38b976668804ac2763a863.

This causes problems when the connection is congested because
libnice uses a too agressive timeout contrary to the spec, so
it's easy for consent to lapse and streaming to stop if there's
packet loss.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4649>

17 months agoqtmux: Fix extraction of CEA608 data from S334-1A packets
Sebastian Dröge [Mon, 15 May 2023 08:45:12 +0000 (11:45 +0300)]
qtmux: Fix extraction of CEA608 data from S334-1A packets

The index is already incremented by 3 every iteration so multiplying it
by 3 additionally on each array access is doing it twice and does not
work.

This caused invalid files to be created if there's more than one CEA608
triplet in a buffer, and out of bounds memory reads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4645>

17 months agosctpenc: Fix potential shutdown deadlock
Johan Sternerup [Wed, 10 May 2023 10:00:15 +0000 (12:00 +0200)]
sctpenc: Fix potential shutdown deadlock

When transitioning from state PAUSED to READY, the sctpenc element
could previously be stuck in an endless loop trying to resend data
in case the underlying sctp stream was in the process of
resetting. usrsctp_sendv() would repeatedly return EAGAIN with the
result that 0 bytes were sent and then sctpenc would retry forever.

To bring sctpenc out of the resend loop we just need to inform the
sink pad that it is flushing, which is already done for the associated
data queue, but we also need to set the bools associated with the
sinkpads that are used as the loop criterion.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4636>

17 months agowebrtc: do not tear down data channel before data is flushed
Daniel Moberg [Tue, 18 Apr 2023 09:21:05 +0000 (11:21 +0200)]
webrtc: do not tear down data channel before data is flushed

Current implementation can in some cases detect
that all data is sent but in reality it is not,
leading to a push to an unlinked pad.
This is a race between the probe used to track data sent and a
call to close.

This patch sends an EOS before starting the close procedure
and then waits for the EOS event to come through to the
src pad before commencing with tear down.
This ensures that any queued data before EOS is flushed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4633>

17 months agoosxvideosink: fix deadlock upon closing output window
Piotr Brzeziński [Fri, 5 May 2023 16:27:14 +0000 (18:27 +0200)]
osxvideosink: fix deadlock upon closing output window

Invoking gst_osx_video_sink_osxwindow_destroy() can currently cause a deadlock
because showFrame() keeps trying to get the same lock as well. Moving the lock
closer to where it's actually needed seems to be enough to fix the issue for now.

Reported-by: Alexande B <abobrikovich@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4627>

17 months agoavviddec: Temporarily unlock stream lock while flushing buffers
Sebastian Dröge [Fri, 12 May 2023 06:50:04 +0000 (09:50 +0300)]
avviddec: Temporarily unlock stream lock while flushing buffers

This can call into the decoder again from other threads and try to take
the stream lock from there, which would cause a deadlock.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2558

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4625>

17 months agoparse/grammar: fix missing unref of looked up child
Mathieu Duponchelle [Fri, 12 May 2023 16:35:48 +0000 (18:35 +0200)]
parse/grammar: fix missing unref of looked up child

the target parameter of gst_child_proxy_lookup() is (transfer full)

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2560
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4624>

17 months agompegpsdemux: Rework gap sending
Jan Schmidt [Tue, 4 Apr 2023 11:50:01 +0000 (21:50 +1000)]
mpegpsdemux: Rework gap sending

Take the gap logic from mpegtsdemux, and don't
send gap events on a stream that's outputting buffers with
no timestamps. Time isn't advancing, but the stream has
buffers - so it's not sparse.

Fixes #2374

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4623>

17 months agouridecodebin3: Ensure atomic urisourcebin state change
Edward Hervey [Tue, 7 Mar 2023 10:40:42 +0000 (11:40 +0100)]
uridecodebin3: Ensure atomic urisourcebin state change

When dynamically adding and synchronizing the state of urisourcebin, we need to
ensure that no-one else attempts to change the state in case of failures

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1803

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4620>

17 months agomeson: Install viv-fb GL headers, needed by i.MX
Nirbheek Chauhan [Wed, 8 Mar 2023 18:55:51 +0000 (00:25 +0530)]
meson: Install viv-fb GL headers, needed by i.MX

Needed by qmlglsink at build time to allocate a viv-fb display.

Without this, the GL fastpath doesn't work, and performance is really
bad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4618>

17 months agogstutils: Add category and object to most logging messages
Juan Navarro [Tue, 28 Mar 2023 14:13:51 +0000 (16:13 +0200)]
gstutils: Add category and object to most logging messages

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4615>

17 months agovavp8dec: Fix return type of decode_picture()
Seungha Yang [Sun, 5 Mar 2023 11:15:19 +0000 (20:15 +0900)]
vavp8dec: Fix return type of decode_picture()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4614>

17 months agovajpegdec: Hide gst_jpeg_decoder_get_type() symbol
Seungha Yang [Sun, 5 Mar 2023 11:14:06 +0000 (20:14 +0900)]
vajpegdec: Hide gst_jpeg_decoder_get_type() symbol

It's not a public symbol yet

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4614>

17 months agovabaseenc: Fix return type of encode_frame vfunc
Seungha Yang [Sun, 5 Mar 2023 11:01:44 +0000 (20:01 +0900)]
vabaseenc: Fix return type of encode_frame vfunc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4614>

17 months agova: Fix struct empty initialization syntax
Seungha Yang [Sun, 5 Mar 2023 10:53:37 +0000 (19:53 +0900)]
va: Fix struct empty initialization syntax

"struct Foo bar; bar = {};" is not a valid syntax. Also remove use
of __typeof__ which is GCC specific

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4614>

17 months agoqtdemux: add unit test for edit list regression
Tim-Philipp Müller [Thu, 11 May 2023 15:25:11 +0000 (16:25 +0100)]
qtdemux: add unit test for edit list regression

File is the mp4 file from #2549 with the mdat atom
zeroed out and compressed. We compress twice because
apparently compressing 5MB of zeroes effectively in
one run is too difficult for gzip.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2549

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4605>

17 months agoRevert "qtdemux: fix conditions for end of segment in reverse playback"
Mathieu Duponchelle [Fri, 5 May 2023 17:41:34 +0000 (19:41 +0200)]
Revert "qtdemux: fix conditions for end of segment in reverse playback"

This reverts commit 9deb3c27acd4161f810cd782f03bcdaccf2643c7.

The test case that was described in the associated MR
(https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/262)
remains adequately fixed by a related MR that was merged later
(https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/275).

It introduced incorrect logic that broke edit lists as described in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2549

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2549
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4605>

17 months agod3d11videosink: Don't clear prepared buffer on unlock_stop()
Seungha Yang [Tue, 9 May 2023 15:51:31 +0000 (00:51 +0900)]
d3d11videosink: Don't clear prepared buffer on unlock_stop()

That can be called between prepare() and render() which results in
unexpected error flow return

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4596>

17 months agoh264decoder: Drop nonexisting picture silently without error
Seungha Yang [Fri, 5 May 2023 19:14:49 +0000 (04:14 +0900)]
h264decoder: Drop nonexisting picture silently without error

If end_picture() was not successful, we do drop corresponding
GstVideoCodecFrame and therefore gst_video_decoder_get_frame()
will return nullptr which is expected behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4586>

17 months agortpmanager/rtsession: data race leading to critical warnings
François Laignel [Tue, 9 May 2023 15:28:49 +0000 (17:28 +0200)]
rtpmanager/rtsession: data race leading to critical warnings

This is a fix for a data race leading to:

> GLib-CRITICAL: g_hash_table_foreach:
>   assertion 'version == hash_table->version' failed

Identified sequence:

* `rtp_session_on_timeout` acquires the lock on `session` and proceeds with its
  processing.
* `rtp_session_process_rtcp` is called (debug log : received RTCP packet) and
  attempts to acquire the lock on `session`, which is still held by
  `rtp_session_on_timeout`.
* as part of an hash table iterator, `rtp_session_on_timeout` transitively
  invokes `source_caps` which releases the lock on `session` so as to call
  `session->callbacks.caps`.
* Since `rtp_session_process_rtcp` was waiting for the lock to be released, it
  succeeds in acquiring it and proceeds with `rtp_session_process_rr` which
  transitively calls `g_hash_table_insert` via `add_source`.
* After `source_caps` re-acquires the lock and gives the control flow back to
  `rtp_session_on_timeout`, the hash table iterator is changed, resulting in the
  assertion failure.

This commits copies `sess->ssrcs[sess->mask_idx]` and iterates on the copy so
the iterator is not affected by a concurrent change due to the lock being
released in the `source_caps` callback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4585>

17 months agortpdtmfdepay: Classify as RTP element
Philippe Normand [Tue, 9 May 2023 13:37:25 +0000 (14:37 +0100)]
rtpdtmfdepay: Classify as RTP element

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4584>

17 months agortpdtmfsrc: Classify as RTP source
Philippe Normand [Tue, 9 May 2023 13:36:56 +0000 (14:36 +0100)]
rtpdtmfsrc: Classify as RTP source

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4584>

17 months agov4l2: device provider: Fix GMainLoop leak
Nicolas Dufresne [Mon, 1 May 2023 18:01:02 +0000 (14:01 -0400)]
v4l2: device provider: Fix GMainLoop leak

On very quick start/stop, the mainloop may never be run. As a side
effect, our idle stop function is not really being ran, so we can't rely
on that to free the main loop. Simply unref the mainloop when the
thread have completely stop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4539>

17 months agowebrtcdatachannel: Bind to parent webrtcbin using a weak reference
Philippe Normand [Sun, 12 Mar 2023 14:55:22 +0000 (14:55 +0000)]
webrtcdatachannel: Bind to parent webrtcbin using a weak reference

The previous approach of using a simple pointer could lead to a use-after-free
in case a data-channel was created and its parent webrtcbin was disposed soon
after.

Fixes #2103

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4580>

17 months agowebrtc/nice: support consent-freshness RFC7675
Matthew Waters [Thu, 4 May 2023 06:30:09 +0000 (16:30 +1000)]
webrtc/nice: support consent-freshness RFC7675

As is supported by libwebrtc already.  This allows ICE components to
transition to failed if consent to send from the peer is revoked or if
multiple consent packets are lost.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4575>

17 months agod3d11memory: Don't clear wrapped texture memory
Seungha Yang [Fri, 5 May 2023 12:53:44 +0000 (21:53 +0900)]
d3d11memory: Don't clear wrapped texture memory

The external texture may hold already rendered scene and therefore
it should not be cleared in alloc method

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4558>

17 months agoqtdemux: emit no-more-pads after pruning old pads
Xabier Rodriguez Calvar [Wed, 3 May 2023 11:21:23 +0000 (13:21 +0200)]
qtdemux: emit no-more-pads after pruning old pads

If we don't do that, clients can rely on this signal to see the final pad
topology but it won't be the real one as some of them will disappear after
emitting that signal. This can happen after injecting a different init segment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4557>

17 months agovideoflip: fix setting of method property at construction time
Mathieu Duponchelle [Wed, 3 May 2023 13:42:01 +0000 (15:42 +0200)]
videoflip: fix setting of method property at construction time

Since c2f890ab, element properties are gathered from the parse-launch
line and passed at object construction.

This caused the following issue to happen in videoflip:

* videoflip installed a CONSTRUCT property named method, now deprecated
* videoflip now also overrides that property with a video-direction
  property

GObject construction causes method to be set first at construct time,
with the user-provided value, then video-direction with the default
value.

The user-provided value was thus overridden, causing a regression.

Fix by not installing the properties as CONSTRUCT, and explicitly
implementing constructed() instead in order to ensure that we do still
call gst_video_flip_set_method() at least once during construction.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2529

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4551>

17 months agomfvideoenc: Allow only even resolution numbers
Seungha Yang [Wed, 3 May 2023 19:44:31 +0000 (04:44 +0900)]
mfvideoenc: Allow only even resolution numbers

Some H/W vendors support odd resolution if D3D11 texture is used
or via IMF2DBuffer, but not all vendors support it.
Also software MFT does not allow odd resolution.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1165
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2537
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4548>

18 months agowebrtcbin: Fix potential deadlock when closing before any data was sent
Philippe Normand [Tue, 2 May 2023 17:14:20 +0000 (18:14 +0100)]
webrtcbin: Fix potential deadlock when closing before any data was sent

A blocking pad probe is added on new sink pads, it's usually removed after the
caps have been negotiated or the signaling state switched to stable, but if that
never happens and the pad is released we kept the pad probe active, leaving the
pad blocked, preventing clean disposal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4533>

18 months agortpmanager/rtsession: race conditions leading to critical warnings
François Laignel [Mon, 1 May 2023 12:14:25 +0000 (14:14 +0200)]
rtpmanager/rtsession: race conditions leading to critical warnings

While testing the [implementation for insertable streams] in `webrtcsink` &
`webrtcsrc`, I encountered critical warnings, which turned out to result from
two race conditions in `rtpsession`. Both race conditions produce:

> GLib-CRITICAL: g_hash_table_foreach:
>   assertion 'version == hash_table->version' failed

This commit fixes one of the race conditions observed.

In its simplest form, the test consists in 2 pipelines and a Signalling server:

* pipelines_sink: audiotestsrc ! webrtcsink
* pipelines_src: webrtcsrc ! appsrc

1. Set `pipelines_sink` to `Playing`.
2. The Signalling server delivers the `producer_id`.
3. Initialize `pipelines_src` to establish a session with `producer_id`.
4. Set `pipelines_src` to `Playing`.
5. Wait for a buffer to be received by the `appsrc`.
6. Set `pipelines_src` to `Null`.
7. Set `pipelines_sink` to `Null`.

The race condition happens in the following sequence:

* `webrtcsink` runs a task to periodically retrieve statistics from `webrtcbin`.
  This transitively ends up executing `rtp_session_create_stats`.
* `pipelines_sink` is set to `Null`.
* In `Paused` to `Ready`, `gst_rtp_session_change_state()` calls
  `rtp_session_reset()`.
* The assertion failure occurs when `rtp_session_reset` is called while
  `rtp_session_create_stats` is executing.

This is because `rtp_session_create_stats` acquires the lock on `session` prior
to calling `g_hash_table_foreach`, but `rtp_session_reset` doesn't acquire the
lock before calling `g_hash_table_remove_all`.

Acquiring the lock in `rtp_session_reset` fixes the issue.

[implementing insertable streams support]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1176

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4532>

18 months agov4l2: pool: Flush events on capture queue
Nicolas Dufresne [Wed, 26 Apr 2023 19:58:23 +0000 (15:58 -0400)]
v4l2: pool: Flush events on capture queue

Unfortunately streamoff does not flush the events, and this can cause all
sort of issues. Flush events on capture queue. We also return
GST_V4L2_FLOW_RESOLUTION_CHANGE in case a resolution change was seen.
This allow skipping streamon(capture) on flush, which could lead to a
configuration miss-match, or failure if the buffers aren't of the right
size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

18 months agov4l2: videodec: Detect flushes while setting up the capture
Nicolas Dufresne [Fri, 21 Apr 2023 17:33:11 +0000 (13:33 -0400)]
v4l2: videodec: Detect flushes while setting up the capture

As we missed the fact we were flushing, we could create and activate
that buffer pool, and wait on it, causing a hang. We detect that we
are flushing by checking the related pad state.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

18 months agov4l2: bufferpool: Don't copy buffer when flushing
Nicolas Dufresne [Fri, 21 Apr 2023 17:30:43 +0000 (13:30 -0400)]
v4l2: bufferpool: Don't copy buffer when flushing

Threshold handling can race with flushing operation. This can lead to
avoidable buffer copies. Simply check and return the flushing status.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

18 months agov4l2: videodec: Don't forcibly drain on resolution changes
Nicolas Dufresne [Wed, 19 Apr 2023 18:19:13 +0000 (14:19 -0400)]
v4l2: videodec: Don't forcibly drain on resolution changes

Let the driver detects the change and reconfigure the capture side
transparently from there. This avoid reallocation of the output buffers,
and eliminates the need to stop and restart the capture task. This is
only happening if the driver have support for this, otherwise the old
behaviour is maintained.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

18 months agov4l2: videodec: Remove the spurious srccaps probe
Nicolas Dufresne [Tue, 18 Apr 2023 15:42:06 +0000 (11:42 -0400)]
v4l2: videodec: Remove the spurious srccaps probe

We don't need to probe the srccaps in set_format() anymore, this
handled already in the capture thread while setting up the capture
queue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

18 months agov4l2: videodec: Improve few logs
Nicolas Dufresne [Mon, 17 Apr 2023 20:10:34 +0000 (16:10 -0400)]
v4l2: videodec: Improve few logs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

18 months agov4l2: videodec: Only warn of incomplete drain on success
Nicolas Dufresne [Mon, 17 Apr 2023 20:07:21 +0000 (16:07 -0400)]
v4l2: videodec: Only warn of incomplete drain on success

We may have hit an error, or just flushing in order to stop the thread,
in which case, not having drain everything is expected and not a
driver bug.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

18 months agov4l2: bufferpool: Don't assert when orphaning is not needed
Nicolas Dufresne [Mon, 17 Apr 2023 20:05:35 +0000 (16:05 -0400)]
v4l2: bufferpool: Don't assert when orphaning is not needed

This may happen when shutting down and should not cause
any harm. This removes the associated assert when shutting
down the pipeline, notably with CTRL+C.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

18 months agov4l2: videodec: Wait for source change event
Nicolas Dufresne [Fri, 14 Apr 2023 22:54:22 +0000 (18:54 -0400)]
v4l2: videodec: Wait for source change event

Stop doing capture buffer allocation based on guesses
and wait for the source change event when available.
Unlike stateless decoder, the stateful decoder is not aware of
the coded resolution, and this may lead to the wrong result
even when using TRY_FMT.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

18 months agov4l2: object: Move the GstPoll into v4l2object
Nicolas Dufresne [Sat, 15 Apr 2023 02:22:06 +0000 (22:22 -0400)]
v4l2: object: Move the GstPoll into v4l2object

Moves the GstPoll from the buffer pool into v4l2object. This will be
needed to poll for events before the pool has been created.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

18 months agov4l2: object: Fix bogus debug objects pointers
Nicolas Dufresne [Sat, 15 Apr 2023 03:38:34 +0000 (23:38 -0400)]
v4l2: object: Fix bogus debug objects pointers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

18 months agov4l2: videodec: Move the capture setup into the processing loop
Nicolas Dufresne [Fri, 14 Apr 2023 13:53:15 +0000 (09:53 -0400)]
v4l2: videodec: Move the capture setup into the processing loop

In previous implementation that job was split between handle_frame and
the processing loop and it wasn't clear if this mechanism was race
free. The capture setup would also be tried for every buffer, which was
not necessary.

This also simplify the handling of SRC_CH event, dropping the unneeded
atomic boolean.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

18 months agov4l2: videodec: Ensure object is inactive on failure
Nicolas Dufresne [Fri, 14 Apr 2023 13:51:39 +0000 (09:51 -0400)]
v4l2: videodec: Ensure object is inactive on failure

Sprinkle stop() calls in error case to guaranty that the capture object
is inactive on failure. Not doing so could allow some code to be called
in unexpected (and possibly undefined) conditions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

18 months agoci: Always run the windows build image job
Jordan Petridis [Fri, 21 Apr 2023 15:28:23 +0000 (18:28 +0300)]
ci: Always run the windows build image job

Much like the linux counterparts, this either build the image
once the tags change or quickly exits if that has been done
already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4474>

18 months agodtlstransport: Keep strong ref of dtls encoder/decoder
Philippe Normand [Mon, 1 May 2023 16:46:25 +0000 (17:46 +0100)]
dtlstransport: Keep strong ref of dtls encoder/decoder

Otherwise get_property() calls for the client, certificate and/or
remote-certificate properties might access moved objects, since the encoder and
decoder are added to the transportsendbin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4526>

18 months agogstcodectimestamper: remove PC file generation from plugin's own meson.build
Mihail Ivanchev [Mon, 1 May 2023 10:24:54 +0000 (10:24 +0000)]
gstcodectimestamper: remove PC file generation from plugin's own meson.build

The file generated here is incomplete; it is generated for all plugins in a loop at an upper level.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4520>

18 months agowasapi2: Allows process loopback capture on Windows 10
Seungha Yang [Thu, 27 Apr 2023 19:28:24 +0000 (04:28 +0900)]
wasapi2: Allows process loopback capture on Windows 10

As per MS documentation[1], it requires Windows 10 Build 20348
but it seems to be supported by old versions too

[1] https://learn.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/
ns-audioclientactivationparams-audioclient_process_loopback_params

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2524
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4517>

18 months agoRevert "splitmuxsink: Avoid assertion when WAITING_GOP_COLLECT on reference context"
Sebastian Dröge [Thu, 27 Apr 2023 13:33:25 +0000 (16:33 +0300)]
Revert "splitmuxsink: Avoid assertion when WAITING_GOP_COLLECT on reference context"

This reverts commit f29c19be5821d26a6b7682d0c69ff31d0815e072. If this is
called for the reference context then we would run into an infinite
loop, which is not really better than an assertion.

By fixing up DTS to never be ahead of the PTS in the previous commit
this situation should be impossible to hit now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4515>

18 months agosplitmuxsink: Catch invalid DTS to avoid running into problems later
Sebastian Dröge [Thu, 27 Apr 2023 13:29:53 +0000 (16:29 +0300)]
splitmuxsink: Catch invalid DTS to avoid running into problems later

DTS > PTS makes no sense, so we clamp DTS to the PTS. Also if there's a
PTS but no DTS, then assume that PTS=DTS to make sure we're not working
with a much older DTS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4515>

18 months agocudamemory: Fix for semi planar YUV memory size decision
Seungha Yang [Fri, 28 Apr 2023 09:52:48 +0000 (18:52 +0900)]
cudamemory: Fix for semi planar YUV memory size decision

UV plan of the semi planar format requires only half of Y plane size

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4506>

18 months agortspsrc: Fix handling of `*` control path
Sebastian Dröge [Thu, 27 Apr 2023 10:00:42 +0000 (13:00 +0300)]
rtspsrc: Fix handling of `*` control path

Regression introduced by 7f9d689572843ff9e0b8a92128034a8fc4a14d96.
Thanks to Tristan Matthews for reporting this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4503>

18 months agodecodebin3: Handle streams without CAPS or TIME segment
Edward Hervey [Wed, 26 Apr 2023 10:20:25 +0000 (12:20 +0200)]
decodebin3: Handle streams without CAPS or TIME segment

decodebin3 will do its best to figure out whether a parsebin is required to
process the incoming stream.

The problem is that for push-based stream it could happen that the stream would
not provide any caps, resulting in nothing being linked internally.

Furthermore, there is the possibility that a stream *with* caps would not be
using a TIME segment, which is required for multiqueue to properly work.

In order to fix those two issues, we force the usage of parsebin on push-based
streams:
* When the pad is linked, if upstream can't provide any caps
* When we get a non-TIME segment

Fixes #2521

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4499>

18 months agod3d11videosink: Fix for ignored initial render rectangle
Seungha Yang [Mon, 24 Apr 2023 19:59:33 +0000 (04:59 +0900)]
d3d11videosink: Fix for ignored initial render rectangle

Application can set target render rect before internal HWND
configuration

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2518
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4496>