690 Commits

Author SHA1 Message Date
Alexander Slobodeniuk
a03c4de48f elements: use set_static_metadata when it's allowed
Those strings are nice but CPU doesn't want to copy them

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8905>
2025-04-26 19:30:15 +02:00
Eli Mallon
068385e83f qtdemux: unref simple caps after use
Otherwise we leak a GSTCaps object every time we
use qtdemux on a file with Opus audio

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8879>
2025-04-23 12:06:48 -07:00
Stefan Andersson
1c8b01ccbc matroska-demux: Prevent corrupt cluster duplication
Make sure to always update next_cluster_offset, if next cluster offset
isn't known set it to zero. If next_cluster_offfset isn't updated it will
be the same as current and if the cluster parsing fails the same cluster
will be parsed again leading to duplication of the data in the cluster.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8855>
2025-04-16 20:37:08 +02:00
Gustav Fahlen
e649072584 gstrtspsrc: Do not emit signal 'no-more-pads' too early
Due to race condition it was previously possible that
gst_element_add_pad was not completed for each RTSP stream before
signal 'no-more-pads' was emitted.

Race condition explained:
Lets say two RTSP streams are created: Video and Audio.
1. Callback new_manager_pad is called for the Video stream =>
   stream->added=TRUE.
   all_added=FALSE because both streams are not yet added.
   Call gst_element_add_pad and emit signal 'pad-added' for Video stream.
2. Callback new_manager_pad is called for Audio stream =>
   stream->added=TRUE.
   all_added=TRUE because both streams are added.
   Call gst_element_add_pad and emit signal 'pad-added' for Audio stream.
3. Lets say gst_element_add_pad for the audio stream completes before
   the video stream. Since the audio stream already has all_added==TRUE
   this will result in the signal 'no-more-pads' to be emitted before
   gst_element_add_pad for the video stream is completed.

Solution is to move the logic that sets added=True and checks if all
streams are added to after gst_element_add_pad. This will make sure
signal 'no-more-pads' is not emitted until all code in
gst_element_add_pad is completed for all streams.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8832>
2025-04-14 12:35:06 +00:00
Jan Schmidt
7212848e41 rtspsrc: Don't error out on not-linked too early
Wait until all pads have been exposed before accepting a not-linked,
as pads are added one-by-one and downstream might not be interested
in the first ones to appear.

Follow up to
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7946

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8798>
2025-04-10 11:50:33 +00:00
Víctor Manuel Jáquez Leal
4fc8773371 y4menc: fix Y41B format
This a regression of commit fb0bea8f where output info variable was swapped with
input info variable by mistake.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8786>
2025-04-08 13:10:19 +00:00
Ognyan Tonchev
6db576f033 gstrtpsession: Do not push events while holding SESSION_LOCK
Doing so can trigger deadlocks

Fixes: #4328
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8695>
2025-04-05 08:43:06 +00:00
Ognyan Tonchev
ebb1d1a4ae gstrtpsession: protect recv_rtcp_segment_seqnum with a lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8695>
2025-04-05 08:43:05 +00:00
Ognyan Tonchev
961fc87168 gstrtpsession: use correct seqnum for the STREAM_START ans SEGMENT events
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8695>
2025-04-05 08:43:05 +00:00
dukesook
daa1ee84b9 qtdemux: Extend Uncompressed Lookup Table
- LUT now supports various subsampling, interleaves, and bit depths.

 - Replaces stride with GstVideoInfo pre_info to represent original data.

 - Simplifies gst_row_align_buffer() with gst_video_frame_copy().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8598>
2025-04-05 07:59:32 +00:00
Doug Nazar
6e9667b65c matroskademux: Add support for relative position cues
Cueing data can contain the block number within a cluster and/or
a relative offset into the cluster.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5535>
2025-03-28 17:47:27 -04:00
Doug Nazar
3578b23ba2 matroskamux: Add support for chroma siting
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5534>
2025-03-28 11:44:13 -04:00
Doug Nazar
123a7a515f matroskamux: Add support for interlaced field order
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5534>
2025-03-28 11:44:13 -04:00
Doug Nazar
671dd6a61e matroskamux: Always use v4 for DocType version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5534>
2025-03-28 11:43:50 -04:00
Doug Nazar
8e6ec1fc34 matroskademux: Handle chroma site color information
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5534>
2025-03-28 11:22:39 -04:00
Víctor Manuel Jáquez Leal
d59ce45789 y4menc: use start() vmethod rather than change_state()
Also it wil call negotiate() vmethod at set_format()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8654>
2025-03-27 14:29:40 +01:00
Víctor Manuel Jáquez Leal
0f0a4d6ab3 y4menc: enable y4menc debugging category
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8654>
2025-03-27 14:29:40 +01:00
Víctor Manuel Jáquez Leal
2fb3dddd51 y4menc: handle padded frames
Since y4menc inherits from GstVideoEncoder, it negotiates upstream buffer pools
with GstVideoMeta support. Thus, certain decoders might use that meta for
frames with padded memory. Nonetheless y4menc assumes only linear memory video
frames, without padding.

This patch will copy frames using gst_video_frame_copy() if buffer has
GstVideoMeta or its video info is padded with its custom video info. Otherwise,
it ill call the agnostic gst_buffer_copy() for a shallow copy.

Supersedes: !5042

Fixes: #2765
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8654>
2025-03-27 14:28:03 +01:00
Víctor Manuel Jáquez Leal
fb0bea8fef y4menc: create an output video info without padding
The unpadded strides and offsets calculations for the video info are inspired
from y4mdec.

A boolean flags is toggled if the video info is padded for the given resolution.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8654>
2025-03-27 14:05:43 +01:00
Doug Nazar
a33e1c7563 rtspsrc: Free various props during cleanup
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8648>
2025-03-27 09:03:18 +00:00
Doug Nazar
e3818d0e1b qtmoovrecover: Free various props during cleanup
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8648>
2025-03-27 09:03:18 +00:00
Sebastian Dröge
f795796f89 qtdemux: Fix stsc size check in qtdemux_merge_sample_table()
There are 3 32bit integers per entry and not one more for all but the last.

Fixes a regression introduced in 5a9e80c01b4b49c6c7630a6d08b600114f38c0db
when playing back files that have one sample table entry per audio sample.

Merging the sample tables would've always failed because of the too strict size
check and one audio sample per GStreamer buffer would've been output, which
doesn't perform very well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8657>
2025-03-25 18:38:45 +00:00
Tim-Philipp Müller
7861a2e4fb imagefreeze: add support for JPEG-XS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8601>
2025-03-13 00:11:52 +00:00
Thibault Saunier
ed693c7435 video: Give better names to buffer pools
Making debugging simpler

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8617>
2025-03-12 14:49:22 +00:00
Devon Sookhoo
2f2a6e76bc qtdemux: InterleaveType enum
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8578>
2025-03-06 14:40:45 +00:00
dukesook
ee9c8724c3 qtdemux: component to format lookup table
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8578>
2025-03-06 14:40:45 +00:00
Jochen Henneberg
71d8618daf qtdemux: Ignore non-zero values for UV/XY in transformation matrix
But write an info message about that. The values have been ignored
before !8127 as well.

Fixes #4252

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8559>
2025-02-26 14:51:57 +00:00
Sebastian Dröge
1d91616b3c splitmuxsink: Also increment fragment IDs when no filename is configured on the sink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8544>
2025-02-24 23:11:52 +00:00
Elliot Chen
2548503898 scaletempo: scaletempo: clip the timestamp or duration of gap event if needed
For some cases, maybe the timestamp of gap event is smaller than
segment start value or larger than segment stop value in playback.
And the timestamp plus duration may exceed segment boundary. Need
check and clip the timestamp or duration before recalculating.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8517>
2025-02-24 12:09:04 +00:00
Julian Bouzas
25543de560 rtph264depay: Improve properties doc to be the same as rtph265depay
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8343>
2025-02-22 13:31:10 +00:00
Julian Bouzas
cc1556efab rtph264depay: Improve request keyframe logic
We cannot rely only on the DISCONT flag when deciding whether we need to
request a new key frame or not because it might be that the packet that just
came in with the DISCONT flag is actually the start of a keyframe.

This patch improves the logic to be the same as rtph265depay, by only requesting
a key frame if the packet with the DISCONT flag is not the first one of a FU; or
if its the first one, only request it when we could drop packets due to a
missing key frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8343>
2025-02-22 13:31:10 +00:00
Julian Bouzas
4400caeaef rtph265depay: Add request-keyframe property
Similar to the H264 depayloader, this property will request a new keyframe
when packet loss is detected.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8343>
2025-02-22 13:31:10 +00:00
Julian Bouzas
ca08f4220a rtph265depay: Add wait-for-keyframe property
Similar to the H264 depayloader, this property will wait for the next keyframe
by dropping RTP packets if there is a missing packet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8343>
2025-02-22 13:31:10 +00:00
Brad Hards
ec679507f6 qtdemux: look up uncompressed component type
This fix handles the case where the order of components in the cmpd box
does not correspond to the order used for a specific track. That
is the case where the uncC component_index values are something
other than 0, 1, 2, 3.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8483>
2025-02-17 16:23:37 +00:00
Sebastian Dröge
f6cc65a6bc splitmuxsink: Be less strict about queueing negative durations
In case of temporary backwards timestamps durations can become negative. Instead
of erroring out, simply clip the durations and warn.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8390>
2025-02-17 09:36:00 +00:00
Tim-Philipp Müller
7c3a468056 qtdemux: add mappings for Hap video codec
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3596

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7717>
2025-02-15 21:25:05 +00:00
François Laignel
874a59bff2 rtpjitterbuffer: add RFC7273 active status to stats
Checking whether rtpjitterbuffer actually timestamps the buffers according to
the RFC7273 clock definition and rtpjitterbuffer configuration required looking
at the DEBUG logs.

This commit adds an entry in the rtpjitterbuffer stats to indicate if
conditions are met for RFC7273 to be active.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7829>
2025-02-14 01:12:23 +00:00
Brad Hards
49d8921232 qtdemux: fix version 1 profile handling, add diagnostics
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8456>
2025-02-14 00:03:30 +00:00
Brad Hards
c7367addb5 qtdemux: support uncompressed mono with component interleave
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8464>
2025-02-13 08:17:17 +00:00
Ognyan Tonchev
9faf555219 rtpmanager: skip RTPSources if last_rtime is not set yet
Fixes previous commit (which worked in GStreamer 1.22 but not in
1.24 and newer). Sorry for the noise, should have tested on
master before pusshing it :(

Fixes: #3918
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8455>
2025-02-12 19:56:35 +00:00
Carlos Bentzen
e2bd8809bf qtmux: add support for VVC/H.266 video
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8436>
2025-02-11 03:25:38 +00:00
Carlos Bentzen
8cfbdd7cf6 matroskamux: add support for VVC/H.266 video
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8441>
2025-02-10 22:49:35 +00:00
Carlos Bentzen
1be3d7f37b matroskademux: add support for VVC/H.266 video
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8441>
2025-02-10 22:49:35 +00:00
Carlos Bentzen
deaa9260f3 matroska: add V_MPEGI/ISO/VVC id
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8441>
2025-02-10 22:49:35 +00:00
Alexander Slobodeniuk
7ae94a4bd0 autodetect: cleanup no-op check for "constructed" implementation
It's always implemented by GObject.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8416>
2025-02-10 17:49:29 +00:00
Alexander Slobodeniuk
610a6f3aaf videoflip: fix chaining up GObject's constructed virtual method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8416>
2025-02-10 17:49:29 +00:00
Carlos Bentzen
a5c6eea957 qtdemux: add support for VVC/H.266
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5088>
2025-02-10 09:20:22 +00:00
dukesook
54830e7c0a qtdemux: Demux Uncompressed MP4
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7985>
2025-02-08 10:15:06 +00:00
Philippe Normand
a39f465692 rtpsession: Fix heap-use-after-free of twcc_packets structure
This is a regression introduced by 90d99c7b52d9dc82a220cca1355f1dca3d57a838.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8427>
2025-02-07 12:52:06 +00:00
Robert Mader
12d2a4e2a1 matroskademux: Implement rotation tag support
Similar to qtdemux.

Tested against other Gst elements and MPV. Note that the later
apparently does not show correct results for flipped values.
In particular the Yaw value seems to get ignored by many clients.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8319>
2025-02-05 13:26:08 +01:00