Commit graph

278 commits

Author SHA1 Message Date
Seungha Yang 3679713519 rtponviftimestamp: Fix drop-out-of-segment=false mode
Fixing unexpected buffer dropping and flow error in case that:
* use-reference-timestamps=false
* drop-out-of-segment=false
* Calculated utc offset is not valid because buffer is out-of-segment

The above case should be considered as a valid data flow without returning
errors.

Fixing regression introduced by
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1683

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5116>
2023-07-28 23:36:34 +09:00
He Junyan 4e47a73ddf fakevideosink: Add DMA_DRM format into sink template caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5094>
2023-07-25 19:34:58 +00:00
Fabian Orccon dd47fa53d8 h265parse: Parse SEI unregistered user data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5070>
2023-07-25 18:28:26 +00:00
Jakub Adam f7b719ae91 av1parse: calculate framerate from AV1 timing info
When framerate info isn't provided by upstream elements, try to extract
it from AV1 timing info, if present.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5041>
2023-07-19 20:45:05 +00:00
Mathieu Duponchelle 7445b73e76 rtpsession: expose timeout-inactive-sources property
In some situations it is not desirable to time out when no data is
received any longer, users can opt in to this behavior via a new
property.

The property is also exposed on rtpbin and sdpdemux

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4880>
2023-06-28 18:45:25 +00:00
Stéphane Cerveau 2974c18a5c codecparsers: keep naming consistency in GST_H264_LEVEL
GST_H264_LEVEL_2 should be used instead of GST_H264_LEVEL_2_0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4737>
2023-06-26 10:47:36 +00:00
Sebastian Dröge 0dabf0eb00 dvdspu: Avoid integer overflow when checking if enough data is available
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4896>
2023-06-20 15:36:03 +00:00
Sebastian Dröge 7ed446dca9 dvdspu: Make sure enough data is allocated for the available data
If the size read from the stream is smaller than the currently available
data then the size is bogus and the data should simply be discarded.

Fixes ZDI-CAN-20994
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2660

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4896>
2023-06-20 15:36:03 +00:00
Michael Olbrich 3f24a38c8e sdpdemux: ensure that only one srcpad is created per stream
If two senders use the same multicast IP and port then new_session_pad()
may try to add a srcpad to the same stream twice.

stream->srcpad is updated but gst_element_add_pad() fails the second
time. As a result stream->srcpad points to a deleted object and
access in gst_sdp_demux_stream_free() fails with a segfault.

Just ignore the second pad. Nothing useful can be done with it anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4603>
2023-06-15 23:35:30 +00:00
Aaron Boxer a72ca72a27 mpegtsmux: add stream-number property on GstBaseTsMuxPad
This new property allows setting of PES stream number for AAC audio
and AVC video streams.

The stream number is subject to the following constraints:

1. it must be between 0 and 15 for video
2. it must be between 0 and 31 for audio

Currently the PES stream number is hard-coded to zero for these
stream types.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4822>
2023-06-15 10:34:25 +00:00
Marek Vasut 4c92d4096e bayer2rgb: Support video/x-bayer 10/12/14/16 bit depths
Add support for 10/12/14/16 bit depths . This consists of multiple parts.
First is the parsing of caps, which pulls out the bitness and endianness
from the video/x-bayer format.

Second, gst_bayer2rgb_split_and_upsample_horiz() is split into two similar
functions, one for 8bit bayer handling and another for 16bit bayer handling.
The content is basically identical, except one uses 8bpp and the other 16bpp
inputs and outputs, and they each use different ORC code to match. The 16bpp
variant also handles endian swapping. There is now a wrapper called
gst_bayer2rgb_split_and_upsample_horiz() which selects the correct function
based on bpp from the parser.

Third, gst_bayer2rgb_process() is extended to handle both 8bit and 16bit
bayer data. Yet again there are matching ORC functions to handle the 16bit
data. This time however the 16bit handling of data is slightly special. The
ORC is not able to emit opcodes for 'x2 mergelq', so the trick here is to
store the BG and GR longs into separate 'dtmp' temporary buffer, and then
do one more ORC post-processing step, compensate for the less-than-16bpp
bitness using left shift, and reorder them into the destination frame
using 'mergelq' .

Example usage:
```
$ gst-launch-1.0 videotestsrc ! \
    video/x-bayer,width=512,height=512,format=bggr16le ! \
    bayer2rgb ! \
    video/x-raw,format=RGBA64_LE ! \
    videoconvert ! \
    autovideosink
```

Example usage:
```
$ gst-launch-1.0 videotestsrc ! \
    video/x-raw,width=512,height=512,format=ARGB ! \
    rgb2bayer ! \
    video/x-bayer,format=bggr12le ! \
    bayer2rgb ! \
    video/x-raw,format=RGBA64_LE ! \
    videoconvert ! \
    autovideosink
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut 9d1a750117 bayer2rgb: Add comments explaining gst_bayer2rgb_process()
Add comments regarding which LINE()s point to which data in the
temporary buffer and a large comment explaining how the buffer
is processed. This will hopefully be useful to someone, as the
code is not obvious. No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut 920851945f bayer2rgb: Add comment on bayer_orc_horiz_upsample
Explain how the bayer_orc_horiz_upsample function works and
what it does with the pixels, as this may not be obvious.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut 4efe11a705 bayer2rgb: Pass filter pointer into gst_bayer2rgb_split_and_upsample_horiz()
Instead of passing a single element of GstBayer2RGB structure into the
gst_bayer2rgb_split_and_upsample_horiz(), pass the entire pointer and
let the funciton pick out whatever it needs out of the structure. This
is a preparatory patch. No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut fbd02b3e2a bayer2rgb: Pass all parameters to LINE() macro
Pass all three parameters used by the LINE() macro to the LINE() macro
and unroll the code for readability. Add more comments regarding which
of these LINE()s point to which data in the temporary buffer to make
the code less confusing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut 8bec6828f4 bayer2rgb: Fold src_stride into gst_bayer2rgb_process()
The source stride parameter can be easily obtained from GstBayer2RGB
structure, do it within gst_bayer2rgb_process() and drop the parameter.
No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut ddcb45ffc0 bayer2rgb: Inline the j=0 value
The j variable is used as an iterator further down in this code, but
here it can be just inlined in the macro parameters to make the code
easier to read. This is done in preparation for further changes. No
functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut 484e31c1d9 bayer2rgb: Disable in-place transform
The bayer2rgb process implemented doesn't support in-place tranform.
This element doesn't implement a "transform_ip" vmethod of
GstBaseTransform it will revert to using the "tranform" vmethod.
It's misleading to set it to TRUE, here. Change this to FALSE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut 0763fb107d rgb2bayer: Support video/x-bayer 10/12/14/16 bit depths
Add support for conversion to 10/12/14/16 bit bayer pattern.
The implementation is rather simplistic, just take the ARGB
input, generate 16-bit data out of it instead of 8-bit, shift
them as required by the output bitness, and apply endian swap.

Example usage:
```
$ gst-launch-1.0 videotestsrc num-buffers=1 ! \
    video/x-raw,width=512,height=512,format=ARGB ! \
    rgb2bayer ! \
    video/x-bayer,format=bggr12le ! \
    filesink location=/tmp/bayer12.raw
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Tim-Philipp Müller a9c5e5e239 asfmux: fix potentially unaligned write on 32-bit ARM
Fixes #2665

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4842>
2023-06-14 04:59:05 +00:00
Nicolas Dufresne 4402a8044f fakesinks: Fix recursive notify loop
The proxy callback for the notify::last-message was emiting the signal
again on the child, which caused an infinit loop. We could swap the child
and the user data to signal to the bin instead, but it was found that proxying
this signal was not very useful. Typical use case it to set silent=0 and use
deep-notify feature. Proxying that signal just duplicate that output which
isn't very useful.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4766>
2023-06-13 23:33:08 +00:00
Jan Alexander Steffens (heftig) 6e9d67bbc1 mpegtsmux: Use terminological ISO 639-2 language codes
These are preferred in most circumstances.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2649
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4795>
2023-06-12 08:51:10 +00:00
Vivia Nikolaidou 0e62bb2ba6 basetsmux: Fix language crash when ts_pad->stream is NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4785>
2023-06-07 16:58:38 +00:00
Vivia Nikolaidou 0a331402d6 tsdemux: Detect language from ac3 descriptor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4709>
2023-06-07 13:04:03 +00:00
Vivia Nikolaidou 395e0c3925 tsmux: Resend PMT whenever the language changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4711>
2023-06-01 17:05:11 +00:00
Vivia Nikolaidou 1781b26ad2 tsmux.h: Remove TSMUX_MAX_ES_INFO_LENGTH dead code
Also TsMux.es_info_buf which was also not used anywhere

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4681>
2023-05-23 14:00:11 +00:00
Vivia Nikolaidou 9e84b737cb tsmux: Separate DVB and ATSC AC3 descriptors
The previous code was ATSC-specific. Separated it into gstatscmux.c and
added the DVB-specific one from ETSI EN 300 468 V1.11.1 (2010-04)

https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.11.01_60/en_300468v011101p.pdf

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4681>
2023-05-23 14:00:11 +00:00
Vivia Nikolaidou 866d5d87c4 tsmux: Refactor AC3 descriptor to use GstByteWriter
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4681>
2023-05-23 14:00:11 +00:00
Vivia Nikolaidou 637e263504 tsmux: Parse bitrate from tags into the stream
Instead of parsing a hardcoded zero and always writing the highest
limit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4681>
2023-05-23 14:00:11 +00:00
Vivia Nikolaidou 7a98a4214b tsmux: Fix 0x81 descriptor for AC3 streams
According to ATSCA/52:2018

https://prdatsc.wpenginepowered.com/wp-content/uploads/2021/04/A52-2018.pdf

Used wireshark as ground truth for detection/parsing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4681>
2023-05-23 14:00:11 +00:00
Ruben Gonzalez 059965fe53 doc: Fix newline char between authors
Found running `gst-inspect-1.0 -a |& grep -v ":" | grep @`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4682>
2023-05-20 05:48:23 +00:00
Shengqi Yu b092c3f580 h264parse: adjust some logs printing level in h264parse
adjust log level from GST_ERROR to GST_WARNING when h264 caps have
codec_data but no avc format or have no codec data or stream-format.
Because theses are not real errors, it is easy to mislead if print error
logs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4675>
2023-05-20 02:07:36 +00:00
Thibault Saunier 6dff93acf6 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/4668>
2023-05-19 22:00:39 +00:00
Seungha Yang e9d8bf7532 h264parser: Define level enum values
... and stop duplicating it

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4595>
2023-05-17 21:29:25 +00:00
Víctor Manuel Jáquez Leal ad40a9323e jpegparse: fix warning text and debug data
They were backwards or missing.

Fix: #2567
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4641>
2023-05-15 17:31:58 +02:00
Mihail Ivanchev 8e64dea5c6 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/4518>
2023-05-01 16:41:32 +00:00
Thibault Saunier 187d91627c rtpsrc: Give better names to internal elements
Same name was used for all instances of rtpsrc making debugging more complex

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4484>
2023-04-28 16:00:47 +00:00
Edward Hervey ab458eae56 pcapparse: Add support for Linux "cooked" capture encapsulation v2
See https://www.tcpdump.org/linktypes/LINKTYPE_LINUX_SLL2.html

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4451>
2023-04-19 09:56:47 +02:00
Sebastian Dröge 6a0965cb8a tsdemux: Set number of channels to 2 for dual mono Opus
Instead of leaving it at 0, which will then cause caps creation to fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4445>
2023-04-18 14:56:44 +03:00
Seungha Yang 9489fb3f54 sdpdemux: Add support for RFC4570 SDP source filters
Parse source-filter attributes and configure udpsrc accordingly

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3485>
2023-04-12 16:32:07 +00:00
Thibault Saunier 5797fa09af codectimestamper: Implement QUERY_CAPS support
This is required to ensure that downstream restrcitions are also
propagated upstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4341>
2023-04-12 15:07:28 +00:00
Thibault Saunier dbc6afd874 codectimestamper: Use accept-intersect and accept-template caps
We should behave similarly to video parsers so we can use:
- accept-template as we can also accept caps with missing fields.
- accept-intersect to do quick check with the pad template caps as it is
enough. Users should have figured the appropriate full caps on a
previous caps query

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4341>
2023-04-12 15:07:28 +00:00
Jan Schmidt 1b762ba012 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/4333>
2023-04-06 01:34:03 +00:00
Nicolas Dufresne c883fea19e h265parse: Don't override upstream framerate
The framerate should only be replaced (and corrected for alternating field)
when it is parsed from the bitstream. Otherwise, the upstream framerate
from caps should be trusted and assumed correct.

Related to gst-plugins-bad!2020

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4259>
2023-04-05 13:33:39 -04:00
Nicolas Dufresne 93904f1921 h265parse: Rename parsed_framerate to framerate_from_caps
That meaning of parsed_framerate is ambigious, it is set whenever the
framerate has been parsed from caps, which can be confused with being
parsed from the bitstream. Rename this as framerate_from_caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4259>
2023-04-05 13:33:39 -04:00
Edward Hervey 38dd5deb66 tsdemux: Minor refactoring
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4336>
2023-04-04 20:54:50 +00:00
Edward Hervey 8e51399334 mpegts: Fix include headers
<gst/mpegts/mpegts.h> is the unique header to use

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4336>
2023-04-04 20:54:50 +00:00
Brad Hards 4087bb9a55 mpegts: remove stream-type from KLV meta
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4310>
2023-03-31 07:03:54 +00:00
Brad Hards 6f2eb752c5 mpegts: add support for KLV metadata in PES packets
Co-authored-by: Andoni Morales Alastruey <ylatuya@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1312>
2023-03-30 12:16:52 +00:00
Brad Hards 4e14bac1ff mpegts: implement metadata in PES packets
Co-authored-by: Andoni Morales Alastruey <ylatuya@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1312>
2023-03-30 12:16:52 +00:00