622 Commits

Author SHA1 Message Date
Elias Rosendahl
8acdb1f8d3 remove refereces of old decoders 2025-09-01 18:02:52 +02:00
Elias Rosendahl
52dfe8c17a update meson.build 2025-09-01 17:49:19 +02:00
Elias Rosendahl
5acf382495 remove new decoders 2025-09-01 17:39:34 +02:00
Elias Rosendahl
daf86b5a3d add komata 2025-09-01 17:24:15 +02:00
Santosh Mahto
5186341c28 gstanalytics : Add tensor decoder element for yolo detection models
Existing tensor decoder has been bifurcated into two seperate gst
element as:

`yoloodv5tensordecoder`: decodes tensors output(masks) from detection-only
models e.g yolov8s.onnx

`yolsegv8tensordecoder`: decoder tensors output(masks and logits) from
segementation models e.g FastSAM or yolov8s-seg
2025-09-01 16:37:15 +02:00
Daniel Morin
96ac4c9a43 tensordecoders: rename element
- yolotensordecoder replaced with yolov8segtensordecoder
2025-09-01 16:36:41 +02:00
Daniel Morin
8f08bafa5d tensordecoders: address MR comments 2025-09-01 16:36:41 +02:00
Daniel Morin
3f3cfc0c91 tensordecoders: Remove object locking in properties accessors 2025-09-01 16:36:41 +02:00
Daniel Morin
a194dcc293 tensordecoders: add property label-file to exemple 2025-09-01 16:36:41 +02:00
Daniel Morin
64e0805126 tensordecoder: Improve class retrieval
- Optimize the way to retrieve class with maximum confidence. Avoir multiple
  pass.
- Add support for label files
2025-09-01 16:36:41 +02:00
Santosh Mahto
07920e7122 gst-analytics : Adapt and Rename fastsamtensordecoder to yolo based.
YOLOv8 model have same tensor output format as FastSAM, so for better
generalization rename fastsamtensordecoder to yolotensordecoder. This
also requires code adaptation to support Yolo based model.
2025-09-01 16:36:41 +02:00
Olivier Crête
f967d58093 fastsamtensordecoder: Set mask resolution based on model output 2025-09-01 16:34:56 +02:00
Daniel Morin
7aa0319af6 fastsamtensordecoder: Add FastSAM tensor decoder
Co-authored-by: Vineet Suryan <vineet.suryan@collabora.com>

# Conflicts:
#	subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json
#	subprojects/gst-plugins-bad/gst/tensordecoders/gsttensordecoders.c
#	subprojects/gst-plugins-bad/gst/tensordecoders/meson.build
2025-09-01 16:34:56 +02:00
Daniel Morin
c2d83fabbd tensordecoders: fix wrong assumption in ultralightfacedetectortensordec
- UltraLightFaceDetection was assmuming only one TensorMeta could be attach to
  buffer. We need to look at all TensorMeta attach to the buffer and check for
  the one it support.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9564>
2025-08-22 23:10:31 +00:00
Jan Schmidt
80949e1ca6 mpegtsmux: Use 'internal' stream_type to detect codec changes
The TsMuxStream internal_stream_type field stores the original
'full' stream type (such as Opus), while the stream_type field
stores the value that will actually be written into the MPEG-TS
packets according to the codec mappings. When checking if
input caps are changing stream type, check the original type.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9430>
2025-08-09 11:42:29 +00:00
Nicolas Dufresne
a4969e8c02 av1parse: Set MDI into the final caps
The MDI was being set in the original caps which is not even writable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9474>
2025-07-31 20:54:02 +00:00
Olivier Crête
edd46c51f1 ssdtensordecoder: Use tensor ids from the registry
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9439>
2025-07-29 14:20:14 -04:00
Derek Foreman
f1f482f3d6 av1parse: Set CLL and MDI caps
We already parse the content-light-level and mastering-display-info data
from the stream, so propagate that into caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9445>
2025-07-29 11:06:24 +00:00
Julian Bouzas
7411337812 h266parse: Fix typo when finding compatible profiles
This solves some critical errors about not fixed caps with some H266 streams.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9427>
2025-07-28 23:13:05 +00:00
Julian Bouzas
064d2dedd6 h266parse: Wait for SEI before exposing src caps
Similar to h264parse, this makes sure 'lcevc=false' src caps are not set before
parsing SEI. It is needed for decodebin2 to work properly with the LCEVC decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9427>
2025-07-28 23:13:05 +00:00
Julian Bouzas
b904ac195f h265parse: Wait for SEI before exposing src caps
Similar to h264parse, this makes sure 'lcevc=false' src caps are not set before
parsing SEI. It is needed for decodebin2 to work properly with the LCEVC decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9427>
2025-07-28 23:13:05 +00:00
Julian Bouzas
98d3228fc2 codecparsersbad: Accept lcevc=false sink caps
This is needed if the LCEVC enhancement data is part of the video stream as SEI
and the demuxer outputs 'lcevc=false' src caps because LCEVC enhancement data is
not stored as a separate stream in the container.

To clarify, 'lcevc=true' just means that the video buffers have LCEVC metadata
attached. Therefore, it is valid to have a stream with LCEVC enhancement data as
SEI with 'lcevc=false' as long as it is not attached as metadata.

This will be needed once we add support for the demuxer to attach LCEVC metadata
to video buffers if it is stored in a separate track.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9427>
2025-07-28 23:13:05 +00:00
Olivier Crête
d1b00839c3 classifiertensordecoder: Use utility functions to get tensors
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9419>
2025-07-21 14:49:42 +00:00
Olivier Crête
d1483d6c55 classifiertensordecoder: Handle error cases better with labels file
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9419>
2025-07-21 14:49:42 +00:00
Olivier Crête
fe0d7f249d ssdobjectdetector: Validate tensor type and dimensions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9419>
2025-07-21 14:49:42 +00:00
Tim-Philipp Müller
15c9bc4d2a unixfd: fix and improve the example pipelines in the documentation
- Add a videoconvert element before the videosink so that the output
  works no matter what format gets negotiated (A444_16LE for me)

- Specify a reasonable video format and size with a capsfilter, so
  we don't default to something silly like A444_16LE @ 240p.

- Add a timeoverlay element, so it's obvious when stoppping/restarting
  the pipeline that the input stream is just picked up again from the
  moment the consumer pipeline is restarted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9422>
2025-07-18 17:52:42 +01:00
Olivier Crête
2c3f2747d6 tensormeta: Check dimensions when retrieving tensor
Modify the API to retrieve the tensor meta to check for the dimensions
as well.

Also fix an API mistake, the buffer whose dimensions should be checheck
is the one inside the GstTensor, not another buffer some outside.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9411>
2025-07-17 17:43:32 +00:00
raghu447
d868357270 tensordecoder: rename facedetector element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9344>
2025-07-16 20:35:04 +00:00
Julian Bouzas
36bb470d1d h266parse: Parse and attach LCEVC metadata to buffers if present
Similar to h264parse and h265parse, this patch enhances the element to parse
LCEVC enhancement data from SEI, and attach it to output buffers as GstLcevcMeta.
The 'lcevc' field in the output caps is also set to TRUE or FALSE depending on
whether LCEVC data is present or not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9365>
2025-07-15 19:23:41 -04:00
Julian Bouzas
e44bab9fe9 h266parse: Parse and process SEI registered user data
Similar to h264parse and h265parse, this patch improves the element to parse
the SEI registered user data from NAL units. The core structure of H266 SEI for
ITU-T T.35 is the same as the other parsers, so we can re-use the same logic.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9365>
2025-07-15 19:23:39 -04:00
Mathieu Duponchelle
cde27346fb rtmp2src: don't send window acknowledgement size commands twice
This causes servers such as AWS MediaLive to drop the connection, and
the message flow chart as documented in the "spec" always has the
server sending it first, and the client replying to it on reception of
the Set Peer Bandwidth, which we do since 286a3829b637.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9360>
2025-07-10 09:04:16 +00:00
Mathieu Duponchelle
668ef84171 rtmp2src: fix playback of URIs without a playpath
ffmpeg manages to play RTMP URLs in the form:

```
protocol://servername:port/appname
```

and does not require a second component to the path, adapt our code to
allow using such URLs as `tcUrl`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9360>
2025-07-10 09:04:16 +00:00
Julian Bouzas
7ad82930e2 h265parse: Parse and attach LCEVC metadata to buffers if present
Similar to h264parse, this patch enhances the element to parse LCEVC enhancement
data from SEI, and attach it to output buffers as GstLcevcMeta. The 'lcevc'
field in the output caps is also set to TRUE or FALSE depending on whether LCEVC
data is present or not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9335>
2025-07-08 22:36:08 +00:00
Doug Nazar
f11d258545 cpu-throttling-clock: fix race between async callback and unscheduling
It's possible that the callback is already scheduled to run on another
thread when we unschedule it during dispose and we would then access
a freed object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9151>
2025-07-08 09:05:29 +00:00
Doug Nazar
f6cc177dab camerabin: Fix a memory leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9151>
2025-07-08 09:05:29 +00:00
Doug Nazar
45eef1a000 alphacombine: fix memory leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9115>
2025-07-07 13:01:34 +00:00
Doug Nazar
8873237131 cpu-throttling-clock: free clock when finished
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9115>
2025-07-07 13:01:34 +00:00
Nicolas Dufresne
5c6273d663 Revert "vp9parse: Always default to super-frame"
This reverts commit fd1428d3ebf937d7656c3788df3ef3ff85fecc31.

As reported in #4524, this changes cause regressions. The problem is due to a
bug in how vp9parse interact with parsebin, presenting downstream negotiation of
alignment to work. This revert to being stuck using frame alignment always,
which fortunately works with libvpx, though less efficient.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9329>
2025-07-04 12:53:46 -04:00
Nicolas Dufresne
cf1aa3ecc6 vp9parse: Only show the last frame of a super frame
Only the last frame of a super frame should be displayed by default. When
converting from super frame to frame, mark all frames as decode only except the
last one. This fixes vp90-2-22-svc_1280x720_3.ivf conformance test with
stateless decoders such as VA.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8944>
2025-07-03 20:48:12 -04:00
Nicolas Dufresne
d5d47d211e vp9parse: Always default to super-frame
Sort the list of structure before truncating so that we don't prefer
"frame"" alignment over "super-frame" in some cases.

Fixes vp90-2-22-svc_1280x720_3.ivf conformance test when using libvpx based
decoder.

Fixes #4371

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8944>
2025-07-03 20:48:12 -04:00
Nicolas Dufresne
a8f5618d1a vp9parse: Fix typo Aligment vs Alignment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8944>
2025-07-03 20:48:12 -04:00
Julian Bouzas
3e4c17633e h264parse: Forward LCEVC caps
This makes sure the parser exposes lcevc=true output caps if the demuxer
attached LCEVC data to video frames.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9321>
2025-07-03 13:54:39 +00:00
Sebastian Dröge
7c1381cfd6 ssdobjectdetector: Use correct tensor data index for the scores
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9322>
2025-07-02 21:56:58 +00:00
Edward Hervey
efb22b550c mpegtsdemux: Add property to disable skew corrections
This is for cases where:
* We *do* want to refer to the PCR stream to figure out global positioning, gap
  detection, wrapover correction.
* But we do not want to apply any skew correction to the output

This is useful for cases where:
* the input stream has already been clock-corrected (for example with
mpegtslivesrc)
* or where the output doesn't require synchronization against a clock (ex: for
  storage)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9301>
2025-07-02 14:10:55 +00:00
Doug Nazar
27a55d9346 proxysrc: Fix order freeing pads
Free pads from bottom of parent tree first else with GST_DEBUG
enabled it would access freed memory printing object info.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9273>
2025-06-30 12:19:19 +00:00
David Monge
d22be5d383 mpegtsmux: fix double free caused by shared PMT descriptor
The PMT descriptor was owned by the stream object but also added to
the descriptors array without copying, leading to a double free and
core dump during cleanup

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9285>
2025-06-27 09:55:33 +00:00
Edward Hervey
bc0324f862 tsdemux: Allow access unit parsing failures
* Refactor the various Access Unit extraction calls into a single function
* Allow the access unit parsing to fail, but emit a warning

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9246>
2025-06-19 13:03:16 +00:00
Ben Butterworth
224da2b947 mpegts: handle MPEG2-TS with KLV metadata safely by preventing out of bounds
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3896

@slomo, as requested on https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3896#note_2780065

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8529>
2025-06-19 00:41:09 +00:00
Jan Schmidt
ffba5837ac tsdemux: Send new-segment before GAP
If adding a sparse stream and sending a gap event to bring it
up to speed, make sure to send the new segment event first

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8143>
2025-06-17 03:01:39 +00:00
Stefan Andersson
38f5ab75fd h26xparse: Drop NAL units that can't be parsed using AU alignment
Change so that the handling of NAL unit that can't be parsed when using
AU alignment is the same as when using NAL alignment, ie drop the data
if it can't be parsed.

If the AU contains more than one NAL unit any correctly parsed NAL unit
in the AU is kept.

Fixes #4436

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8976>
2025-06-10 13:00:20 +00:00