Commit graph

338 commits

Author SHA1 Message Date
Edward Hervey 583fadc051 dvdspu: Support all video caps for "ANY" feature
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5827>
2024-01-02 14:13:04 +00:00
Arnaud Vrac 705ab7e35a dvdspu: handle frame size event from upstream
An IDX file or codec_data normally contains the original frame size of
the video. Allow upstream to provide this information by sending a
custom event, which will allow scaling the overlay correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5827>
2024-01-02 14:13:04 +00:00
Arnaud Vrac 559c4b8429 dvdspu: cache overlay composition
This avoids rendering the overlay buffer for each video frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5827>
2024-01-02 14:13:04 +00:00
Arnaud Vrac 5919bfec5e dvdspu: negotiate overlay composition meta with downstream
This allows attaching the overlay composition as a meta on the video
buffer instead of blending with the video.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5827>
2024-01-02 14:13:04 +00:00
Arnaud Vrac 85081cbef7 dvdspu: render to ARGB overlay instead of AYUV
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5827>
2024-01-02 14:13:03 +00:00
Arnaud Vrac b0ce390d50 dvdspu: render to AYUV overlay
Instead of only supporting writing SPU data directly to YUV frames,
render the SPU data to an intermediate AYUV overlay buffer. The overlay
data is then blended to the video frame.

For the PGS format, the overlay buffer size is set to the size of the
Composition Window, and its position in the overlay composition is set
to the window position. The objects to render are now cropped when the
cropping flag is set.

For the Vobsub format, the overlay buffer size is set to the size of the
Display Area.

Once rendered, the overlay composition rectangle is now moved and scaled
to fit the video output size, to avoid clipping.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5827>
2024-01-02 14:13:03 +00:00
Víctor Manuel Jáquez Leal ec4054e637 jpegparse: always forward pixel-aspect-ratio
And by default it's 1/1

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal ae55ebfdf2 jpegparse: fix endianness
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 470b90a14a jpegparse: on app0 use fourcc rather than strings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 367deef132 jpegparse: dump whole failed app marker
Instead of just log the parsed string. It's better for debugging.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 658b5b4399 jpegparse: don't trigger message for failed com marker
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 497890f678 jpegparse: refactor renegotation
Instead of comparing caps, just signal when renegotation is needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 03d51244c0 jpegparse: pass colorimetry in caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 20b636ee9a jpegparse: add support interlaced mjpeg
Interlaced MJPEG is a big hack. Most of the streams we've found are from old
AVID tools. There are two methods to detect interlaced stream: the container
offers a height bigger (or double) than the image's height in SOF. The other
is from a APP0 marker.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Mengkejiergeli Ba 141cd38715 h264parse: Remove dead code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5833>
2023-12-20 13:03:25 +00:00
Robert Mader c481fe7059 camerabin: Correctly relink viewfinderbin_queue
This reverts a part of de92a6c7f2. Unlike `image_filter` and
`video_filter`, `viewfinder_filter` does not get linked to `src` but
`viewfinderbin_queue`. Thus the fix in the mentioned commit does not
apply for it and should be reverted.

This was not spotted earlier as only the other filters are used in
the project that uncovered the issue.

Fixes: de92a6c7f2 ("camerabin: Fix source updates with user filters")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5689>
2023-12-18 17:07:31 +00:00
Seungha Yang 890d59e97e av1parser: Fix array sizes in scalability structure
Since the AV1 specification is not explicitly mentioning about
the array size bounds, array sizes in scalability structure
should be defined as possible maximum sizes that can have.

Also, this commit removes GST_AV1_MAX_SPATIAL_LAYERS define from
public header which is API break but the define is misleading
and this patch is introducing ABI break already

ZDI-CAN-22300

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5823>
2023-12-18 10:58:24 +00:00
Daniel Morin 49f200cb54 h264parse: Improved AU boundary detection
- AU boundary detection reviewed to follow more closely H.264 spec. and more
  specifically clauses 7.4.1.2.3 and 7.4.1.2.4.
- The gist of the changes is a look-a-head in then next AU required identify the
  last vcl-nal of current AU and firt vcl-nal of next AU (according to
  7.4.1.2.4) followed by the identification of the first nal of next AU
  (according to 7.4.1.2.3).
- A backlog of all nals of current AU and next AU up to the point where current
  AU can identified completed is kept.
- In NAL alignement mode vcl-nal are sent immediatly but the history is kept to
  allow AU boundary detection. Non-vcl-nal can be delayed up to the reception of
  the next vcl-nal to allow a correct AUD insertion.
- Based on this improved AU boudary detection we can avoid erronous AUD
  insertion, like the one highlighted by test
  test_parse_sliced_with_prefix_and_sei_nal_au.
- Add support for MVC AU boundary detection. (H.7.4.1.2.4)
- Explicitly report SVC not supported. We don't have the SVC NAL parsing
  required to identify boundary. (missing dependency_id and quality_id fields
  from SVC, see G.7.4.1.2.4)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5741>
2023-12-17 21:42:47 +00:00
Xavier Claessens f076a9bf2f unixfd: Serialize buffer metas
Serialize every GstMeta that supports serialization into the NEW_BUFFER
payload. This is especially important for GstVideoMeta in the case of
multiplanar buffers, or if stride!=width.

Sponsored-by: Netflix Inc.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5355>
2023-12-17 16:13:26 +00:00
Ruben Gonzalez 97817ef44c gstgaussblur: delete unused code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5737>
2023-12-04 18:54:31 +00:00
Aaron Boxer b405ff34d3 mpegtsmux: allow attaching PCR to non-PES streams
There is an existing PMT mapping between PCR_%s and an mpegtsmux sink
pad name, where %s equals the program number that the PCR corresponds
to. We re-purpose this functionality to also support a mapping between
PCR_%s and an arbitrary PID. If this mapping is set, then the header PCR
PID is set to this value, and PCR is attached to the stream with this
PID.

Note: the current implementation also attaches PCR to the video stream,
so this may be inefficient.

Co-authored-by: Jordan Yelloz <jordan.yelloz@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5726>
2023-12-01 18:01:34 +00:00
Jordan Yelloz 66f51f642f bad: Added W3C Media Source Extensions library
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2992>
2023-11-19 13:48:43 +00:00
Alexander Slobodeniuk 2922c6182d insertbin/doc: add "Since" markers to pass CI
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5514>
2023-11-17 01:09:49 +01:00
Alexander Slobodeniuk 709913b1d2 insertbin: make it available in the registry
so it could also be used from the gst-parse-launch

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5514>
2023-11-16 21:36:32 +01:00
Robert Mader de92a6c7f2 camerabin: Fix source updates with user filters
Take the case into account when user filters have been set before the
source gets updated.

Note that the further linking of the filters, if present, happens below
in the `gst_camera_bin_check_and_replace_filter()` calls.

The audio filter is still affected by the same issue but left out for
now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5527>
2023-11-16 17:26:03 +00:00
Stéphane Cerveau fdc3db68cd codecparsers: introduce h265 level enum
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5644>
2023-11-13 16:37:46 +00:00
Sebastian Dröge 274551d450 mxfdemux: Store GstMXFDemuxEssenceTrack in their own fixed allocation
Previously they were stored inline inside a GArray, but as references to
the tracks were stored in various other places although the array could
still be updated (and reallocated!), this could lead to dangling
references in various places.

Instead now store them in a GPtrArray in their own allocation so each
track's memory position stays fixed.

Fixes ZDI-CAN-22299

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5635>
2023-11-10 14:38:40 +00:00
Mathieu Duponchelle 39efd788a8 timecodestamper: set drop-frame property default to TRUE
After talking with Vivia on IRC, she does not remember why the default
was FALSE and it is in my opinion preferable to stick to whatever
representation best represents time for a given framerate as a default
behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5628>
2023-11-09 21:05:02 +00:00
Xavier Claessens 47c56e3865 unixfd: Add support for abstract socket
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5328>
2023-11-03 18:22:01 +00:00
Xavier Claessens d44aa71f24 unixfd: Use DMABuf allocator when needed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5328>
2023-11-03 18:22:01 +00:00
Xavier Claessens f1a1901b8b unixfd: New plugin with unixfdsink and unixfdsrc elements
This pair of elements, inspired from shmsink/shmsrc, send unix file
descriptors (e.g. memfd, dmabuf) from one sink to multiple source
elements in other processes.

The unixfdsink proposes a memfd/shm allocator, which causes for example
videotestsrc to write directly into memories that can be transfered to
other processes without copying.

Sponsored-by: Netflix Inc.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5328>
2023-11-03 18:22:00 +00:00
Tim-Philipp Müller 67d7df247b fpsdisplaysink: fix copy'n'paste-o in license header
It's LGPL licensed, remove confusing GPL reference.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5557>
2023-10-27 10:54:44 +00:00
Tim-Philipp Müller 3438b7a880 kate: remove plugin
Bitrotten and not really used in the wild.

The actual render library (libtiger) is not just unmaintained
but the upstream location has disappeared, and it's also not
even packaged by e.g. debian/ubuntu.

Closes #3071

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5408>
2023-10-27 07:34:39 +00:00
Jan Alexander Steffens (heftig) 6053dd0d1b tsmux: Fix default get_es_descrs_func
`tsmux_stream_default_get_es_descrs` is missing the `user_data`
parameter and shouldn't be cast to `TsMuxStreamGetESDescriptorsFunc`.

Prefer not casting at all to make sure we don't miss such an issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) 2d72008361 tsmux: Fix default new_stream_func
`tsmux_stream_new` is missing the `user_data` parameter and shouldn't be
cast to `TsMuxNewStreamFunc`.

Prefer not casting at all to make sure we don't miss such an issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) 5bac956b58 tsmux: Add missing include
We need `GstMpegtsPMTStream` here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) db88612853 tsmux: Simplify tsmux_section_write_packet
- Don't try to make the parameters match `GHFunc`. Use a dedicated
  callback for `g_hash_table_foreach`.
- Don't try to be clever with buffer memories. We're allocating a full
  packet anyway, might as well memcpy and save on a lot of complexity.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) 950789f61b tsmux: tsmux_packet_out should always consume its buffer
Consuming the buffer only when successful is an antipattern and easily
leads to leaks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) 55658ad166 tsmux: Don't memset in pad_stream when writing a PCR packet
tsmux_write_ts_header will write a stuffing adaptation field, so we
don't need to prefill the buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) 2dbd89b036 tsmux: Move out parameters of tsmux_write_ts_header
Move them to the end of the parameter list and also allow passing NULLs
to ignore the payload information, but assert that the payload length is
zero in this case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:27 +00:00
Jan Alexander Steffens (heftig) 5128975a36 tsmux: Fix two more uses of gst_buffer_map
The buffers should be used for writing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:27 +00:00
Diego Nieto e290555367 mpegtsdemux: Fix comment about the jitter description
According to the information provided below, the Jitter (J) is
defined by a network delay (D) + a noise(i)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5494>
2023-10-17 08:22:41 +00:00
Jan Alexander Steffens (heftig) 8a7d0efd96 tsmux: Fix error handling in pad_stream
Don't leak the map or the buffer if we encounter an error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5490>
2023-10-16 15:46:00 +02:00
Jan Alexander Steffens (heftig) b1810d83bc tsmux: Fill padding packets with stuffing bytes
Instead of leaving it uncleared, emitting probably old packet data but
potentially also random or sensitive application data.

Also fix the mapping mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5490>
2023-10-16 15:46:00 +02:00
Guillaume Desmottes dd0896f05a audiobuffersplit: disable max-silence-time if set to 0
According to the property documentation max-silence-time is supposed to be
disabled when set to 0 but it was not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5442>
2023-10-06 14:48:46 +02:00
Nicolas Dufresne aaed9272c1 video-filters: Fix passthrough with ANY caps feature
With the support for DRM modifiers, passthrough caps must now include DMA_DRM
format, otherwise pipeline using thhese filters unconditionally may fail
to negotiate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5386>
2023-10-03 21:13:00 +00:00
Jonas K Danielsson f4fb4a5606 ristsrc: Add support for dynamic payload
This commit ports functionality from the `rtpsrc` to make the `ristsrc`
work with dynamic payload types.

It adds two properties:
  - `caps`
  - `encoding-name`

These can be used to make the `ristsrc` receive other payload types than
the MPEG TS one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5422>
2023-10-03 20:17:07 +00:00
Philippe Normand 886bd7e4e0 interaudiosink: Ensure adapters don't store buffers with audio meta
The interaudiosrc might take buffers of different sizes from the audio adapter,
so keeping metas consistency would be an issue. So the sink now strips the audio
metas away and the src adds them back (for non-interleaved layouts only) when
taking buffers from the adapter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5324>
2023-09-28 10:26:33 +00:00
Philippe Normand 46dbe2a372 interaudiosrc: Add audio meta to buffers containing non-interleaved samples
Without this a downstream audioconverter wouldn't be able to map the
GstAudioBuffer prior to conversion.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5324>
2023-09-28 10:26:33 +00:00
Sebastian Dröge 72742dee30 mxfdemux: Check number of channels for AES3 audio
Only up to 8 channels are allowed and using a higher number would cause
integer overflows when copying the data, and lead to out of bound
writes.

Also check that each buffer is at least 4 bytes long to avoid another
overflow.

Fixes ZDI-CAN-21661, CVE-2023-40475

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5362>
2023-09-20 15:40:07 +00:00