platform/upstream/gstreamer.git
17 months agovideodecoder: Make data processing errors non-fatal by default
Philippe Normand [Wed, 30 Nov 2022 10:27:27 +0000 (10:27 +0000)]
videodecoder: Make data processing errors non-fatal by default

The previous default value of `max-errors` was too small and would potentially trigger the
decoder to emit errors too often for most cases.

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

17 months agosdpmessage: Annotate SDP message parameters for `parse_uri()` and `parse_buffer(...
Sebastian Dröge [Tue, 29 Nov 2022 12:02:55 +0000 (14:02 +0200)]
sdpmessage: Annotate SDP message parameters for `parse_uri()` and `parse_buffer()` correctly

They are not actually `out` parameters but must be allocated and
initialized to a valid SDP message by the caller. Just allocating them
without initialization will cause memory corruptions because the
functions will try to clear/append to the existing SDP message.

As such they should be just marked as `transfer none`.

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

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

17 months agomfvideosrc: Fix buffer leak
Seungha Yang [Mon, 28 Nov 2022 17:22:50 +0000 (02:22 +0900)]
mfvideosrc: Fix buffer leak

The allocated buffer should be released

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

17 months agomediafoundation: Chain up from GObject::constructed
Seungha Yang [Mon, 28 Nov 2022 17:10:42 +0000 (02:10 +0900)]
mediafoundation: Chain up from GObject::constructed

... so that GstTracer can trace it

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

17 months agod3d11: Use correct ref/unref methods
Seungha Yang [Mon, 28 Nov 2022 17:06:11 +0000 (02:06 +0900)]
d3d11: Use correct ref/unref methods

Those objects are GstObject subclasses

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

17 months agosdp: use g_strdup instead of strdup
Ignacio Casal Quinteiro [Mon, 28 Nov 2022 09:19:20 +0000 (10:19 +0100)]
sdp: use g_strdup instead of strdup

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

17 months agoglimagesink: Fix render rect assertion
Nicolas Dufresne [Fri, 25 Nov 2022 15:01:06 +0000 (10:01 -0500)]
glimagesink: Fix render rect assertion

Whenever the surface is resized before the stream is negotiated, we endup
with an assertion in libgstvideo.

  gst_video_center_rect: assertion 'src->h != 0' failed

This fixes it, by following the style aready in place, which is to ensure
surfaces have a minimum size of 1x1.

Fixes #1139

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

17 months agoaudioconvert, audioresample, audiofilter: fix divide by 0 for input buffer without...
Tim-Philipp Müller [Sat, 26 Nov 2022 08:23:59 +0000 (09:23 +0100)]
audioconvert, audioresample, audiofilter: fix divide by 0 for input buffer without caps

gst-launch-1.0 audiotestsrc ! udpsink host=127.0.0.1
gst-launch-1.0 udpsrc ! audioconvert ! autoaudiosink

would crash with a floating point exception when clipping the input
buffer owing to a division by zero because no caps event was received.

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

17 months agowin32ipcvideosrc: Fix property name and enum value mismatch
Seungha Yang [Fri, 25 Nov 2022 11:19:22 +0000 (20:19 +0900)]
win32ipcvideosrc: Fix property name and enum value mismatch

Make them consistent

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

17 months agowin32ipcvideosrc: Protect pipe from flush thread
Seungha Yang [Fri, 25 Nov 2022 11:14:43 +0000 (20:14 +0900)]
win32ipcvideosrc: Protect pipe from flush thread

The pipe object must be protected against GstBaseSrc::unlock()
thread.

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

17 months agoh264parser: Fix a typo in pred_weight_table parsing.
He Junyan [Fri, 25 Nov 2022 10:38:27 +0000 (18:38 +0800)]
h264parser: Fix a typo in pred_weight_table parsing.

When setting default values, the reference list number of l1 is wrong.

Fix: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/336
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3464>

17 months agomsdkdec: Update decoding pts
Ma, Mingyang [Tue, 22 Nov 2022 09:01:37 +0000 (17:01 +0800)]
msdkdec: Update decoding pts

Update frame pts before calling gst_video_decoder_finish_frame, or frames may be lost when transcoding in specific stream

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

17 months agoInstall meson from git when MESON_COMMIT variable is set
Xavier Claessens [Fri, 16 Sep 2022 12:28:49 +0000 (08:28 -0400)]
Install meson from git when MESON_COMMIT variable is set

When starting manually a CI pipeline with MESON_COMMIT variable defined,
install the specified version of Meson. This can be used to help the
Meson project smoke testing RC releases or investigate eventual
regressions.

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

17 months agowin32ipc: Add WIN32 shared memory videosrc/sink elements
Seungha Yang [Fri, 18 Nov 2022 17:56:27 +0000 (02:56 +0900)]
win32ipc: Add WIN32 shared memory videosrc/sink elements

Windows supports various IPC methods but that's completely
different form that of *nix from implementation point of view.
So, instead of adding shared memory functionality to existing
shm plugin, new WIN32 shared memory source/sink elements
are implemented in this commit.

Each videosink (server) and videosrc (client) pair will communicate
using WIN32 named pipe and thus user should configure unique/proper
pipe name to them (e.g., \\.\pipe\MyPipeName).
Once connection is established, videosink will create named shared memory
object per frame and client will be able to consume the object
(i.e., memory mapped file handle) without additional copy operation.

Note that implementations under "protocol" directory are almost
pure C/C++ with WIN32 APIs except for a few defines and debug functions.
So, applications can take only the protocol part so that the application
can send/receive shared-memory object from/to the other end
even if it's not an actual GStreamer element.

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

17 months agortpsession: Support disabling late adjustment of ntp-64 header ext
Matt Crane [Tue, 22 Nov 2022 16:32:57 +0000 (11:32 -0500)]
rtpsession: Support disabling late adjustment of ntp-64 header ext

Currently in rtp_session_send_rtp(), the existing ntp-64 RTP header
extension timestamp is updated with the actual NTP time before sending
the packet. However, there are some circumstances where we would like
to preserve the original timestamp obtained from reference timestamp
buffer metadata.

This commit provides the ability to configure whether or not to update
the ntp-64 header extension timestamp with the actual NTP time via the
update-ntp64-header-ext boolean property. The property is also exposed
via rtpbin. Default property value of TRUE will preserve existing
behavior (update ntp-64 header ext with actual NTP time).

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

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

17 months agoadd new plugin for Qt 6 rendering inside a QML scene
Matthew Waters [Thu, 6 Oct 2022 06:08:54 +0000 (17:08 +1100)]
add new plugin for Qt 6 rendering inside a QML scene

- Based heavily on the existing Qt5 integration however:
  - The sharing of OpenGL resources is slightly different
  - The integration with the scengraph is a bit different
- Wayland, XCB and KMS have been smoke tested.  Android, MacOS/iOS,
  Windows may or may not work.

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

17 months agomfvideosrc: check HRESULT of CreateClassEnumerator correctly
Jan Lorenz [Wed, 23 Nov 2022 13:35:07 +0000 (14:35 +0100)]
mfvideosrc: check HRESULT of CreateClassEnumerator correctly

Fixes a crash during direct show device enumeration

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

17 months agov4l2: bypass check some transfer types in colorimetry
Elliot Chen [Mon, 21 Nov 2022 07:35:58 +0000 (15:35 +0800)]
v4l2: bypass check some transfer types in colorimetry

v4l2 will report fail for some streams whose colorimetry value such as 2:4:8:3.
Can bypass check these transfer types in colorimetry to avoid error.

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

17 months agodocs/design: Add document detailing the new gapless/instant-uri changes
Edward Hervey [Fri, 12 Aug 2022 15:25:28 +0000 (17:25 +0200)]
docs/design: Add document detailing the new gapless/instant-uri changes

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

17 months agouridecodebin3: propagate about-to-finish for new inputs
Edward Hervey [Tue, 9 Aug 2022 08:26:00 +0000 (10:26 +0200)]
uridecodebin3: propagate about-to-finish for new inputs

If the pending next urisourcebin is already draining, make sure we propagate it
when activating it.

Fixes gapless playback of small entries

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

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

17 months agouridecodebin3: Remove old fixme
Edward Hervey [Wed, 10 Aug 2022 14:52:23 +0000 (16:52 +0200)]
uridecodebin3: Remove old fixme

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

17 months ago(uri)decodebin3: Ensure group-id consistency
Edward Hervey [Tue, 9 Aug 2022 14:31:26 +0000 (16:31 +0200)]
(uri)decodebin3: Ensure group-id consistency

Make sure that group-id of a given play item are made consistent from the
start (sources) and all the way through the output.

This ensures that we can reliably detect that we have switched to the next play
item on the output of decodebin3 (and we can therefore properly free/release it)

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

17 months agouridecodebin3: Fix shutdown procedures in probe
Edward Hervey [Tue, 9 Aug 2022 08:42:22 +0000 (10:42 +0200)]
uridecodebin3: Fix shutdown procedures in probe

When shutting down, we want to remove the urisourcebin blocking probes ... but
we also want to propagate a GST_FLOW_FLUSHING upstream (and not
GST_FLOW_NOT_LINKED) to make the upstream task gracefully stop instead of
posting an error message.

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

17 months agodecodebin3: Properly reset when going back to READY
Edward Hervey [Fri, 5 Aug 2022 14:58:08 +0000 (16:58 +0200)]
decodebin3: Properly reset when going back to READY

Clear the remaining stream-related fields when going from PAUSED to READY, and
use when disposing.

Fixes various issues when re-using decodebin3/playbin3

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

17 months agodecodebin3: Don't output bogus GST_MESSAGE_STREAMS_SELECTED
Edward Hervey [Fri, 5 Aug 2022 08:37:23 +0000 (10:37 +0200)]
decodebin3: Don't output bogus GST_MESSAGE_STREAMS_SELECTED

When `is_selection_done` is called, it checks that all the requested streams are
present in the active stream list ...

... except there could very well be a (about to be removed) stream from the
previous selection present.

Therefore filter the list of streams we add to the message by the streams which
are actually requested.

Fixes issues when switching between different stream types (ex: video-only to
audio-only).

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

17 months agoUse the correct SSRC(s) when routing a RTCB FB FIR
Johan Sternerup [Thu, 27 Oct 2022 15:30:28 +0000 (17:30 +0200)]
Use the correct SSRC(s) when routing a RTCB FB FIR

Previously we tried to route an incoming RTCP FB FIR to the correct ssrc
using the "media source" component of the RTCP FB message. However,
according to RFC5104 (section 4.3.1.2) the "media source" SHALL be set
to 0. Instead the ssrc(s) in use are propagated via the FCI data. Now
a specific GstForceKeyUnit event is sent for every ssrc.

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

17 months agortpsource: Track the seqnum for senders
Jan Schmidt [Wed, 23 Nov 2022 05:37:40 +0000 (16:37 +1100)]
rtpsource: Track the seqnum for senders

RTP source statistics are tracked for local senders by
treating them as a receiver of their own outbound packets.

Accordingly, track the highest packet seqnum so that the
packets-lost calculation generates a sensible number instead
of always reporting -$number_of_packets_sent

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

17 months agoadaptivedemux2: Add GStreamer to the deps list
Jan Schmidt [Tue, 22 Nov 2022 10:57:16 +0000 (21:57 +1100)]
adaptivedemux2: Add GStreamer to the deps list

Explicitly dep on GStreamer so as not to accidentally
link to the system version in a git build

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

17 months agokmssink: Fix compilation without kernel headers
Nicolas Dufresne [Tue, 22 Nov 2022 20:27:38 +0000 (15:27 -0500)]
kmssink: Fix compilation without kernel headers

There was a drm/drm_mode.h included added recently, drm/ is usually
referencing the linux kernel header, but we only requires the libdrm
headers to be installed. On top of this, including drm_mode.h is never
needed as its already included by drm.h.

Fixes #1596

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

17 months agoonnx: Update to OnnxRT >= 1.13.1 API
Daniel Morin [Thu, 10 Nov 2022 13:50:35 +0000 (08:50 -0500)]
onnx: Update to OnnxRT >= 1.13.1 API

- Replace deprecated methods
- Add a check on ORT version we are compatible with.
- Add clarification to the example given.
- Add the url to retrieve the model mentioned in the example.

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

17 months agoh265parse: Add the missing timestamp when splitting a frame.
He Junyan [Tue, 22 Nov 2022 08:42:26 +0000 (16:42 +0800)]
h265parse: Add the missing timestamp when splitting a frame.

When splitting a frame, the gst_buffer_copy_region() does not copy
the timestamp correctly for sub frames when the offset is not 0.
We still need those timestamps for each output sub frame.

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

17 months agoh264parse: Add the missing timestamp when splitting a frame.
He Junyan [Tue, 22 Nov 2022 07:50:44 +0000 (15:50 +0800)]
h264parse: Add the missing timestamp when splitting a frame.

When splitting a frame, the gst_buffer_copy_region() does not copy
the timestamp correctly for sub frames when the offset is not 0.
We still need those timestamps for each output sub frame.

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

17 months agodvbsubenc: Write Display Definition Segment if a non-default width/height is used
Sebastian Dröge [Mon, 21 Nov 2022 17:40:35 +0000 (19:40 +0200)]
dvbsubenc: Write Display Definition Segment if a non-default width/height is used

Otherwise it can't be rendered by dvbsuboverlay or ffmpeg at least.

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

17 months agoinputselector: Add drop-backwards property
Vivia Nikolaidou [Mon, 24 Oct 2022 15:02:27 +0000 (18:02 +0300)]
inputselector: Add drop-backwards property

When sync-streams=true, drop backwards buffers on pad switch.

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

17 months agoinputselector: Fix waiting on sync-mode=clock
Vivia Nikolaidou [Mon, 24 Oct 2022 13:49:47 +0000 (16:49 +0300)]
inputselector: Fix waiting on sync-mode=clock

Basically copy over what clocksync does, but taking into account that we
have multiple upstream latencies.

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

17 months agoav1dec: Demote rank to secondary
Seungha Yang [Thu, 27 Oct 2022 15:06:23 +0000 (00:06 +0900)]
av1dec: Demote rank to secondary

cerbero does not build this plugin for now, and there's altanative
dav1ddec

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

17 months agortspsrc: Don't replace 404 errors with "no auth protocol found"
Jan Alexander Steffens (heftig) [Tue, 15 Nov 2022 10:56:35 +0000 (11:56 +0100)]
rtspsrc: Don't replace 404 errors with "no auth protocol found"

When getting a "404 Not Found" response from the DESCRIBE request, the
source produced a "No supported authentication protocol was found" error
instead of passing on the 404, which was confusing.

Only produce this error message when we're handling a response of "401
Unauthorized" without a compatible WWW-Authenticate header.

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

17 months agovaapipostproc: Fix the negotiation failure of some formats
Mengkejiergeli Ba [Mon, 14 Nov 2022 07:59:37 +0000 (15:59 +0800)]
vaapipostproc: Fix the negotiation failure of some formats

This patch fixes issue https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1565

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

17 months agokmssink: add HDR10 infoframe support
Bill Hofmann [Fri, 18 Nov 2022 21:32:10 +0000 (13:32 -0800)]
kmssink: add HDR10 infoframe support

If stream has HDR10 metadata and HDMI device EDID supports it, this patch
will set the DRM properties accordingly.

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

17 months agokmssink: Add skip-vsync property
Bill Hofmann [Mon, 21 Nov 2022 20:48:49 +0000 (15:48 -0500)]
kmssink: Add skip-vsync property

The legacy emulation in DRM/KMS drivers badly interact with GStreamer and
may cause the framerate to be halved. With this property, users can disable
vsync (which is handled internally by the emulation) in order to regain the
full framerate.

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

17 months agoadaptivedemux2: Don't leak caps in debug statements
Edward Hervey [Mon, 21 Nov 2022 16:24:38 +0000 (17:24 +0100)]
adaptivedemux2: Don't leak caps in debug statements

Instead just directly use the stream object (which will report the caps)

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

17 months agoadaptivedemux2: Don't leak tags
Edward Hervey [Mon, 21 Nov 2022 16:23:44 +0000 (17:23 +0100)]
adaptivedemux2: Don't leak tags

If we got them from GstStream, we should unref them when done

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

17 months agoadaptivedemux: Use gst_clear_tag_list_where applicable
Edward Hervey [Mon, 21 Nov 2022 16:23:10 +0000 (17:23 +0100)]
adaptivedemux: Use gst_clear_tag_list_where applicable

Clearer and ensures fields are reset

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

17 months agooggdemux: Don't leak pending seek event
Edward Hervey [Mon, 21 Nov 2022 14:12:26 +0000 (15:12 +0100)]
oggdemux: Don't leak pending seek event

Make sure any pending seek event is released when going back down to READY.

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

17 months agortspsrc: Don't leak sticky events
Edward Hervey [Mon, 21 Nov 2022 14:11:21 +0000 (15:11 +0100)]
rtspsrc: Don't leak sticky events

We have incremented the reference 2 lines above, and
gst_pad_store_sticky_event() does not take a reference, therefore release it

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

17 months agoparsebin: Don't leak parsepad list on shutdown
Edward Hervey [Mon, 21 Nov 2022 14:10:35 +0000 (15:10 +0100)]
parsebin: Don't leak parsepad list on shutdown

Free it as it is down in other cases

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

17 months agotextrender: Don't pass plaintext as pango markup to Pango
Sebastian Dröge [Mon, 21 Nov 2022 16:47:50 +0000 (18:47 +0200)]
textrender: Don't pass plaintext as pango markup to Pango

Otherwise e.g. & in the text will cause Pango to complain about invalid
markup and render the text incorrectly.

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

17 months agotextrender: Don't blindly forward all events
Sebastian Dröge [Mon, 21 Nov 2022 16:43:54 +0000 (18:43 +0200)]
textrender: Don't blindly forward all events

Use gst_pad_event_default(), which does the right thing by default.
Especially it does not forward text/x-plain caps downstream.

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

17 months agoevent: Add transfer none annotation to gst_event_new_stream_collection()
Jan Schmidt [Fri, 18 Nov 2022 15:04:13 +0000 (02:04 +1100)]
event: Add transfer none annotation to gst_event_new_stream_collection()

Update the documentation

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

17 months agoadaptivedemux2: Fix sticky event storage.
Jan Schmidt [Tue, 15 Nov 2022 10:42:34 +0000 (21:42 +1100)]
adaptivedemux2: Fix sticky event storage.

Use the new gst_event_type_to_sticky_ordering() method to retrieve
the order that sticky events should be sent / stored in, instead
of assuming it's the event type value.

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

17 months agopad: Fix sticky event ordering for instant-rate-change
Jan Schmidt [Fri, 11 Nov 2022 11:57:38 +0000 (22:57 +1100)]
pad: Fix sticky event ordering for instant-rate-change

The event type for instant-rate-change events was poorly chosen,
leading to them being re-sent too late and even after EOS.

Add a mechanism in GstPad for the sticky event order to be
different to the value of the event type to fix that up.

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

18 months agoav1decoder: Clear highest_spatial_layer per sequence header
Seungha Yang [Thu, 17 Nov 2022 17:06:51 +0000 (02:06 +0900)]
av1decoder: Clear highest_spatial_layer per sequence header

Clear the value to default zero, indicating that no spatial scalability
layer is used.

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

18 months agoav1decoder: Don't error out by dropped OBU
Seungha Yang [Thu, 17 Nov 2022 16:59:55 +0000 (01:59 +0900)]
av1decoder: Don't error out by dropped OBU

OBU can be dropped if the current layer is not in selected operation
point

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

18 months agoav1decoder: Fix wrong spatial layer validation
Seungha Yang [Thu, 17 Nov 2022 16:49:43 +0000 (01:49 +0900)]
av1decoder: Fix wrong spatial layer validation

Highest spatial id and temporal id is independent, and should not drop
temporal enhance layer by the previous condition. Note that
the decision for dropping OBU based on operation point is being
handled in gst_av1_parser_identify_one_obu() already.

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

18 months agoav1parser: Don't print warning for expected OBU drop
Seungha Yang [Thu, 17 Nov 2022 16:43:26 +0000 (01:43 +0900)]
av1parser: Don't print warning for expected OBU drop

Dropping an OBU which is not in selected operation point is an
expected condition.

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

18 months agoav1parser: Remove impossible condition
Seungha Yang [Thu, 17 Nov 2022 16:41:33 +0000 (01:41 +0900)]
av1parser: Remove impossible condition

unsigned integer cannot be negative

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

18 months agofakesrc: avoid time overflow with datarate
Célestin Marot [Fri, 18 Nov 2022 15:57:16 +0000 (16:57 +0100)]
fakesrc: avoid time overflow with datarate

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

18 months agowebrtcbin: Remove queue after rtpfunnel
Jan Schmidt [Sat, 19 Nov 2022 08:22:17 +0000 (19:22 +1100)]
webrtcbin: Remove queue after rtpfunnel

The original BUNDLE support commit placed a queue after the
rtpfunnel that combines streams, but I don't see a good reason for
it. It has default settings, so if network output is slow might
accidentally store up to 1 second of pending data, increasing
latency.

Remove it in favour of doing any necessary buffering before
webrtcbin. If it turns out that there is a reason for it to
exist, the limits should probably be configurable and small.

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

18 months agoexamples/sendrecv: Remove extra unref of webrtcbin
Jan Schmidt [Sat, 19 Nov 2022 08:50:38 +0000 (19:50 +1100)]
examples/sendrecv: Remove extra unref of webrtcbin

The code now constructs webrtcbin with a floating ref and then
gives it to the pipeline. The extra unref is one too many.

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

18 months agortpbasedepayload: Drop redundant reference timestamp buffer meta in RTP depayloaders
Matt Crane [Wed, 16 Nov 2022 16:47:54 +0000 (11:47 -0500)]
rtpbasedepayload: Drop redundant reference timestamp buffer meta in RTP depayloaders

Currently, when rtspsrc property add-reference-timestamp-metadata=true,
a downstream rtph264depay element will attach multiple copies of the
same GstReferenceTimestampMeta to the depayloaded media buffers. This
can have signficant performance impacts further downstream in a pipeline
like the following:

    rtspsrc add-reference-timestamp-metadata=true ! rtph264depay ! h264parse ! ... ! rtph264pay ! ...

For example, if there are 10 packet buffers for a frame of RTP H.264
video, each of those packet buffers will contain the same reference
timestamp meta. The rtph264depay element will then attach all 10
metadata to the depayloaded frame. And then later when we payload the
frame buffer again for proxying, we now have 10 more buffers each with
10 instance of the same metadata. Allocating/deallocating 100+ instances
of metadata @ 30fps for multiple streams has a pretty large performance
impact.

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

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

18 months agowebrtc: Improve GstWebRTCStatsType docstring
Jan Schmidt [Fri, 18 Nov 2022 17:42:56 +0000 (04:42 +1100)]
webrtc: Improve GstWebRTCStatsType docstring

Fix a typo of peer-connectiion -> peer-connection

Add a link to the w3c RTCStats type for a description
of what each statistics type is.

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

18 months agowebrtcbin: Fix a typo in debug log
Jan Schmidt [Fri, 18 Nov 2022 17:42:20 +0000 (04:42 +1100)]
webrtcbin: Fix a typo in debug log

transceiever -> transceiver

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

18 months agoexamples/webrtc: Configure payload types
Jan Schmidt [Fri, 18 Nov 2022 17:37:00 +0000 (04:37 +1100)]
examples/webrtc: Configure payload types

MR 2398 broke the webrtc sendrecv example
by not configuring the payload types, so both audio and video streams
get sent on payload 96.

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

18 months agoqsv: Promote encoder rank to PRIMARY on Windows
Seungha Yang [Sat, 12 Nov 2022 18:07:54 +0000 (03:07 +0900)]
qsv: Promote encoder rank to PRIMARY on Windows

QSV is very well integrated with GstD3D11 infrastructure on Windows,
and this is the recommended H/W encoder element over the MediaFoundation
plugins on Intel GPU system.

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

18 months agovideo-frame: Avoid using tile width
Nicolas Dufresne [Wed, 16 Nov 2022 20:17:24 +0000 (15:17 -0500)]
video-frame: Avoid using tile width

The tile width in pixel is not always available. Notably for
8L128 10bit format, the tile is 8x128 bytes, and the pixel
format is fully packed. That means that the tile contains at
least 6 pixels per line, but it also hold some bits of the
pixel from the same line on the previous or next tile.

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

18 months agovideo: Add arbitrary tile dimensions support
Nicolas Dufresne [Tue, 15 Nov 2022 18:50:13 +0000 (13:50 -0500)]
video: Add arbitrary tile dimensions support

In current tile representation, only tiles with power of two
width and height in bytes are supported. This limitation
prevents adding more complex tiles formats.

In this patch, we deprecate tile_ws and tile_hs from GstVideoFormatInfo and
replace if with an array of GstVideoTileInfo. Each plane tiles are then
described with their pixels width/height, line stride and total size.
The helper gst_video_format_info_get_tile_sizes() that depends on the
deprecated API is also being removed. This can simply be removed as it wasn't
in any stable release yet.

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

18 months agogst: serialization of GLibDateTime
Colin Kinloch [Thu, 1 Sep 2022 17:57:58 +0000 (18:57 +0100)]
gst: serialization of GLibDateTime

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

18 months agoaggregator: Implement force_live API
Mathieu Duponchelle [Fri, 18 Nov 2022 13:24:30 +0000 (14:24 +0100)]
aggregator: Implement force_live API

Setting force_live lets aggregator behave as if it had at least one of
its sinks connected to a live source, which should let us get rid of the
fake live test source hack that is probably present in dozens of
applications by now.

+ Expose API for subclasses to set and get force_live
+ Expose force-live properties in GstVideoAggregator and GstAudioAggregator
+ Adds a simple test

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

18 months agosplitmuxsink: Avoid assertion when WAITING_GOP_COLLECT on reference context
Vivia Nikolaidou [Fri, 9 Sep 2022 10:13:32 +0000 (13:13 +0300)]
splitmuxsink: Avoid assertion when WAITING_GOP_COLLECT on reference context

I have seen a backtrace out in the wild where this happened. Maybe after
receiving EOS and stream-start on the reference context.

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

18 months agowebrtcbin: Add settings for HTTP proxy
Johan Sternerup [Mon, 31 Aug 2020 12:04:54 +0000 (14:04 +0200)]
webrtcbin: Add settings for HTTP proxy

Pass this to libnice which has a simple HTTP 1.0 proxy with basic
authentication only.

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

18 months agotsdemux: Add pad-name to warning for continuity mismatch
Vivia Nikolaidou [Wed, 20 Oct 2021 10:02:31 +0000 (13:02 +0300)]
tsdemux: Add pad-name to warning for continuity mismatch

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

18 months agodecodebin2: Minor debug fix for decodepad
Edward Hervey [Thu, 17 Nov 2022 14:41:35 +0000 (15:41 +0100)]
decodebin2: Minor debug fix for decodepad

decodedad might have their name changed when exposing, causing a race when
trying to get their name without taking a lock. Just use GST_PTR_POINTER in
debug statements instead

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

18 months agoimagesequencesrc: Don't leak caps
Edward Hervey [Mon, 14 Nov 2022 12:53:02 +0000 (13:53 +0100)]
imagesequencesrc: Don't leak caps

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

18 months agoges-launcher: Don't leak string
Edward Hervey [Wed, 16 Nov 2022 15:20:15 +0000 (16:20 +0100)]
ges-launcher: Don't leak string

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

18 months agoges-demux: Don't leak string
Edward Hervey [Wed, 16 Nov 2022 15:19:52 +0000 (16:19 +0100)]
ges-demux: Don't leak string

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

18 months agoges-xml-formatter: Plug some leaks
Edward Hervey [Wed, 16 Nov 2022 15:19:05 +0000 (16:19 +0100)]
ges-xml-formatter: Plug some leaks

* Don't leak the mainloop
* Don't leak temporary strings
* Don't leak id when searching in hash table

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

18 months agoges-project: Don't leak string
Edward Hervey [Wed, 16 Nov 2022 15:18:19 +0000 (16:18 +0100)]
ges-project: Don't leak string

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

18 months agoges-structure-parser: Don't leak failed strings
Edward Hervey [Wed, 16 Nov 2022 11:45:27 +0000 (12:45 +0100)]
ges-structure-parser: Don't leak failed strings

We pass the ownership of current_string to the list of wrong strings, it will be
cleared then.

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

18 months agoges-launch: Don't leak help string
Edward Hervey [Wed, 16 Nov 2022 11:44:56 +0000 (12:44 +0100)]
ges-launch: Don't leak help string

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

18 months agovalidate: cleanup the use of GST_VALIDATE_API on Windows
Stéphane Cerveau [Thu, 17 Nov 2022 16:09:51 +0000 (16:09 +0000)]
validate:  cleanup the use of GST_VALIDATE_API on Windows

Export or import properly the method from GST_VALIDATE_API
with a proper config.h

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

18 months agoci: bump image tags so subprojects get updated
Tim-Philipp Müller [Fri, 18 Nov 2022 00:59:55 +0000 (00:59 +0000)]
ci: bump image tags so subprojects get updated

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

18 months agosubprojects: switch libsoup to a file wrap
Tim-Philipp Müller [Fri, 18 Nov 2022 00:56:25 +0000 (00:56 +0000)]
subprojects: switch libsoup to a file wrap

With fallback_url.

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

18 months agosubprojects: update glib-networking to 2.74.0 and switch to file wrap
Tim-Philipp Müller [Fri, 18 Nov 2022 00:51:48 +0000 (00:51 +0000)]
subprojects: update glib-networking to 2.74.0 and switch to file wrap

Also has a fallback_url for the tarball.

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

18 months agosubprojects: update glib to 2.74.1
Tim-Philipp Müller [Fri, 18 Nov 2022 00:50:56 +0000 (00:50 +0000)]
subprojects: update glib to 2.74.1

With fallback_url for tarball now too.

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

18 months agohlsdemux2: Expose EXT-X-PROGRAM-DATE-TIME as tags.
Enrique Ocaña González [Tue, 3 May 2022 16:36:54 +0000 (18:36 +0200)]
hlsdemux2: Expose EXT-X-PROGRAM-DATE-TIME as tags.

This allows an application to use timestamps associated
with fragments.

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

18 months agohlsdemux: Expose EXT-X-PROGRAM-DATE-TIME as tags.
Enrique Ocaña González [Mon, 2 May 2022 17:13:41 +0000 (19:13 +0200)]
hlsdemux: Expose EXT-X-PROGRAM-DATE-TIME as tags.

This allows an application to use timestamps associated
with fragments.

Patch by: Thomas Bluemel <tbluemel@control4.com>

See: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/195
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1417>

18 months agoqtmux: use trun with multiple entries in more cases
Matthew Waters [Thu, 17 Nov 2022 09:59:35 +0000 (20:59 +1100)]
qtmux: use trun with multiple entries in more cases

The only case where we definitely need to write a new trun is when the
data_offset value does not match the end of the list of entries.
Needing multiple trun atoms is required when interleaving multiple
streams together.

All other cases can be covered by adding more entries to the existing
trun atom.

Fixes playback of fragemented mp4 in ffplay and chrome.

Using e.g. mp4mux fragment-duration=1000 fragment-mode=dash-or-mss
and
mp4mux fragment-duration=1000 fragment-mode=first-moov-then-finalise

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

18 months agolibs: context: use queried value for attrib
Boyuan Zhang [Wed, 2 Nov 2022 21:23:04 +0000 (17:23 -0400)]
libs: context: use queried value for attrib

Attribute's value should use returned value from get_attribute for
VAConfigAttribRTFormat, since VAProfileHEVCMain10, in AMD Mesa Gallium,
can process either VA_RT_FORMAT_420 and VA_RT_FORMAT_420_10, which isn't
considered in gstreamer-vaapi design, where encoder's src pads will
expose only 4:2:0 color formats but no 4:2:0 10bit. So, this is a workaround
for this issue while new vah265enc is released.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3397>

18 months agovabaseenc: Reduce logging noise if finish_frame fails.
Víctor Manuel Jáquez Leal [Wed, 16 Nov 2022 18:39:47 +0000 (19:39 +0100)]
vabaseenc: Reduce logging noise if finish_frame fails.

Fixes: #1579
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3423>

18 months agogst-docs: Fix broken tables in Cerbero docs
Piotr Brzeziński [Wed, 16 Nov 2022 21:38:43 +0000 (22:38 +0100)]
gst-docs: Fix broken tables in Cerbero docs

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

18 months agoamfcodec: Promote encoder rank to PRIMARY
Seungha Yang [Sat, 12 Nov 2022 18:28:23 +0000 (03:28 +0900)]
amfcodec: Promote encoder rank to PRIMARY

This H/W encoder implementation is the recommended element
on AMD system over the MediaFoundation one.

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

18 months agourisourcebin: Remove un-needed define
Edward Hervey [Mon, 14 Nov 2022 13:18:30 +0000 (14:18 +0100)]
urisourcebin: Remove un-needed define

This code hasn't use GValueArray in ages

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

18 months agourisourcebin: Use a non-buffering multiqueue for non-streamable URI
Edward Hervey [Mon, 14 Nov 2022 13:17:25 +0000 (14:17 +0100)]
urisourcebin: Use a non-buffering multiqueue for non-streamable URI

Even though buffering is not required, we need to ensure we are dealing with the
interleave (if any) before pushing the elementary streams further downstream.

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

18 months agourisourcebin: Minor doc fix
Edward Hervey [Thu, 10 Nov 2022 09:27:48 +0000 (10:27 +0100)]
urisourcebin: Minor doc fix

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

18 months agouridecodebin3: Don't leak EOS event
Jan Schmidt [Fri, 30 Sep 2022 18:38:53 +0000 (04:38 +1000)]
uridecodebin3: Don't leak EOS event

Make sure to unref the EOS event in all code paths
when returning GST_PAD_PROBE_HANDLED

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

18 months agoplaybin3: Move gapless to uridecodebin3
Edward Hervey [Thu, 21 Jul 2022 14:43:47 +0000 (16:43 +0200)]
playbin3: Move gapless to uridecodebin3

This was the intention from the start, just took me a few years *cough* to
actually implement it properly.

Gapless is handled by re-using as much as possible the same decoders and sinks
if present, and only pre-rolling switching at the sources level (with buffering
if/when needed).

In order to enable "gapless" playback, the "next" uri should be set at any time
between the moment the `about-to-finish` signal is emitted and the moment the
current play item is done. Previously this could only be done with the signal
emission.

This new implementation also allows "Instantaneous URI switching". This allows a
much faster way of switching playback entries while re-using as many elements as
possible. To enable this set `instant-uri` property to TRUE, the default being
FALSE.

API: instant-uri properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2784>

18 months agoplaybin3: Remove unused code
Edward Hervey [Thu, 10 Nov 2022 06:16:11 +0000 (07:16 +0100)]
playbin3: Remove unused code

This was never used, and if ever it's needed at some point for reference it's
available in gstplaybin.c

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

18 months agodecodebin3: Clear input collection when linked again
Edward Hervey [Mon, 14 Nov 2022 08:54:24 +0000 (09:54 +0100)]
decodebin3: Clear input collection when linked again

The previous collection no longer applies to this input

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

18 months agodecodebin3: Improve collection merging
Edward Hervey [Mon, 14 Nov 2022 08:37:28 +0000 (09:37 +0100)]
decodebin3: Improve collection merging

If the collections are the same, don't merge them

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

18 months agodecodebin3: doc cleanup
Edward Hervey [Thu, 10 Nov 2022 05:58:50 +0000 (06:58 +0100)]
decodebin3: doc cleanup

Remove old/invalid FIXME and cleanup some logs

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