Commit graph

434 commits

Author SHA1 Message Date
Ignazio Pillai 34741e1db2 cutter: add audio-level-meta
Set GstAudioLevelMeta on buffers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5771>
2024-02-08 13:52:40 +00:00
Sebastian Dröge b730e7a1b2 rtpvp8pay: Use GstBitReader instead of dboolhuff implementation from libvpx
All compressed frame header values that are read as part of the
payloader are encoded as bits with 50:50 probability, and as such are
just the plain bits as they are.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5810>
2024-01-31 16:52:28 +00:00
Daniel Morin 0a55c86e6a rtspsrc: update rtsp url on redirect
- If a redirect took place on a GET when rtsp is tunneled we update the
  rtsp url too.
- log source and final destination on redirect

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5222>
2024-01-31 11:43:45 +00:00
Thibault Saunier e1a8ce16b4 matroskademux: Lower verbosity of some often happenning warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6011>
2024-01-30 09:09:22 +00:00
Thibault Saunier 77e7efe407 qtdemux: Lower verbosity of some often happenning warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6011>
2024-01-30 09:09:22 +00:00
Jonas K Danielsson b0becfa46b splitmuxsrc: Use natural ordering to find files
Today when using the `splitmuxsrc` on a collection of files named as:

```
item0.mkv
item1.mkv
item2.mkv
[...]
item10.mkv
item11.mkv
[...]
```

You will get a continuous stream made in the order of:

```
item0.mkv -> item1.mkv -> item10.mkv -> item11.mkv -> [...]
```

You can fix this by having smarter names of the items:

```
item000.mkv
item001.mkv
item002.mkv
[...]
item010.mkv
item011.mkv
[...]
```

Will get you:
```
item000.mkv -> item001.mkv -> item003.mkv -> item004.mkv -> [...]
```

But, we could also "fix" the former case by using natural ordering when
comparing the files in gstsplitutils.c.

Fixes #2523

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4491>
2024-01-24 20:15:19 +00:00
Dan Searles 1d02d7eda0 rtspsrc: fix ttl setting for udpsink[1]
Fix ttl setting being incorrectly applied to udpsink[0] rather
than to udpsink[1].

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5955>
2024-01-23 13:54:51 +00:00
Dan Searles da55b953a1 rtspsrc: set multicast-iface on udpsinks
Copy rtspsrc property multicast-iface to its udpsinks to
allow messages over those sinks back to the server to work (and
prevent 'Network unreachable' warnings).

Closes: #3239
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5955>
2024-01-23 13:54:51 +00:00
Guillaume Desmottes fae6fbaa6b flvdemux: don't re-use segment from one stream if the other has buffer earlier
Fix first audio buffers being out of segment because the audio stream
is starting earlier than the video one which was the first demuxed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5940>
2024-01-19 11:05:05 +01:00
Guillaume Desmottes 632ee523fb flvdemux: factor out ensure_new_segment()
- Use the pad instead of the element for logs, so it's clearer on which
  pad this segment will be pushed.
- One copy was checking for invalid seq num, the other was not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5940>
2024-01-19 11:05:01 +01:00
Hou Qi 2539bb0b1d rtpjitterbuffer: Fix build warning in rtp_jitter_buffer_append_query()
This is to fix build warnings when using [-Wmaybe-uninitialized]
../gst/rtpmanager/rtpjitterbuffer.c:1237:10: warning: 'head' may be used uninitialized [-Wmaybe-uninitialized]
 1237 |   return head;

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5907>
2024-01-13 15:00:19 +00:00
Sebastian Dröge 6fa41f78bb rtpsession: Remove some unused fields
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5899>
2024-01-08 12:57:04 +02:00
Sanchayan Maity 00bbac6541 rtphdrext-clientaudiolevel: Fix level value being written by the extension
When level value is greater than 127, it was being clamped but this clamped
value was not the one being actually used. For level values greater than 127
this resulted in an incorrect value being used. As an example, a level value
of 187, after and'ed with 0x7F, it would result in 0x3B being reported as the
level value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5893>
2024-01-07 16:00:18 +05:30
Sebastian Dröge c292da7044 rtpsession: Only warn once if configured latency needs to be known but isn't yet
Otherwise we would warn about this once for every single packet until
the LATENCY event is received.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5854>
2023-12-27 11:00:44 +00:00
Tim-Philipp Müller d415816cb1 rtpvrawdepay: only announce supported formats in sink template
For most video formats we currently just assume that they
have a depth of 8 bits, whilst advertising that we can
handle 8/10/12/16 bit depth.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5866>
2023-12-25 19:00:18 +01:00
Sebastian Dröge c9c26eab26 rtpvp8pay: Also set partition IDs in the packets if meta exists but without temporal_scalability
Encoders will add the meta to every single buffer, but we only cannot set
partition IDs properly when the meta has temporal_scalability set

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5814>
2023-12-21 11:26:49 +00:00
Arun Raghavan ee903a5afd rtp: Fix incorrect RTP channel order lookup by name
The g_ascii_strcasecmp() logic is inverted, since it returns 0 on equality.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5815>
2023-12-15 15:21:20 -05:00
Sebastian Dröge 14b94ea00b rtpvp9pay: Don't include unused dboolhuff.h header
It's only used by the VP8 payloader.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5784>
2023-12-09 11:17:15 +00:00
Guillaume Desmottes a56923d5e6 qtdemux: fix bug report URL
Using PACKAGE_BUGREPORT as in other modules.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5762>
2023-12-05 09:25:22 +01:00
Thibault Saunier 14c7d3f4e9 qtdemux: Do not update demux->offset when droping data on EOS
The offset is updated right after and we were breaking it by updating it
twice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5724>
2023-12-02 08:08:26 +00:00
Thibault Saunier b1b29de0fb qtdemux: Do not mark stream as EOS only if all streams are EOS
The `GstFlowCombiner` is responsible for tracking the flow of each
stream and handle the overal flow return value. Without that, we
can end up with the following scenario:

- Audio+video stream
- Only the video stream is linked downstream
- The audio stream goes EOS, video doesn't yet
  -> We update the Flow in the combiner with OK as all streams are not EOS
- Video goes EOS because downstream returned EOS
-> `qtdemux` returns `FLOW_OK` forever because the unlinked audio pad
  has `last_flowret==FLOW_OK`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5724>
2023-12-02 08:08:26 +00:00
Thibault Saunier 8295b2ae5c qtdemux: Determine EOS based on the stream segment
Depending on the stream segment might vary (because of edts for example)
leading to EOS being sent at the wrong time (too early for example).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5724>
2023-12-02 08:08:26 +00:00
Hosang Lee 7bf646e5ba qtdemux: Don't overflow sample index
Don't reduce sample index if it is already at 0.
Assigning -1 to a guint32 variable causes unexpected behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5743>
2023-12-01 13:34:12 +00:00
Hosang Lee 041e0c6cab qtdemux: Fix reverse playback for pcm audio stream
Some raw lpcm or adpcm may have larger sample sizes than the max
buffer size value set.
Trimming the buffer causes bogus size error on reverse playback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5742>
2023-12-01 15:11:04 +09:00
Robin Gustavsson 38a8411bdf rtpklvdepay: Recover after invalid fragmented KLV unit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4816>
2023-11-17 09:01:10 +00:00
Sebastian Dröge db77deef00 rtpjitterbuffer: Add new "rfc7273-reference-timestamp-meta-only" property
If this property is enabled then the jitterbuffer will do the normal PTS
calculations according to the configured mode instead of making use of
the RFC7273 media clock.

The timestamp calculated from the RFC7273 media clock will only be
stored in the reference timestamp meta, if addition of that meta is enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5512>
2023-11-16 15:23:29 +00:00
Sebastian Dröge eae3ef7461 rtpjitterbuffer: Add new rfc7273-use-system-clock property
When this property is used, it is assumed that the system clock is
synced close enough to the media clock used by an RFC7273 stream.

As long as both clocks are at most a few seconds from each other this
will give the correct results and avoids having to create an actual
network clock that has to sync first.

If the system clock is actually synchronized to the media clock then
everything will behave exactly the same, otherwise the reference
timestamp meta will be correct but the buffer timestamps will be off by
the difference between the two clocks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5512>
2023-11-16 15:23:29 +00:00
Sebastian Dröge 2956ba48fc rtpjitterbuffer: Improve handling of media clocks
Do more checks for clock equality than just checking pointers. The same
NTP/PTP clock might be used as pipeline clock but a new instance, so
instead also check what clock they are synced to.

Also handling setting / resetting of the media clock and pipeline clock
correctly by resetting the media clock's state accordingly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5512>
2023-11-16 15:23:29 +00:00
Piotr Brzeziński 4037334143 qtdemux: Ignore raw audio streams when adjusting seek
Because we treat raw audio chunks/samples as keyframes, they were interfering
with seek time adjustment.
Became apparent when the accompanying video stream was I-frame only,
for example ProRes.
Since raw audio streams can be seeked freely, it's fine to just ignore them here,
giving priority to the real keyframes in the video stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4946>
2023-11-15 07:55:27 +00:00
Dongyun Seo 8db184085a dcaparse: keep upstream buffer meta
Some audio decoders cannot decode DTS stream if there is no
valid timestamp. So, keep upstream buffer meta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5655>
2023-11-14 16:51:44 +09:00
Olivier Crête c2a357c867 rtpopusdepay: set resync flag
- Set re-sync flag on output buffer when rtp had the marker flag set.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5529>
2023-11-10 21:45:13 +00:00
Johan Adam Nilsson 808c27b4cc wavparse: fix buffer leak with adtl tag
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3020
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5595>
2023-11-03 19:38:38 +00:00
Tim-Philipp Müller bce1d121ba rtpac3depay: should output audio/x-ac3 not audio/ac3
audio/x-ac3 is the canonical media format in GStreamer.
audio/ac3 is sometimes accepted as input (e.g. in rtpac3pay
or ac3parse), but shouldn't be output.

Fixes #3038.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5472>
2023-10-19 13:27:58 +00:00
Stéphane Cerveau 7c7a90b99d imagesequencesrc: fix regular image deadlock
With one regular image file path provided (without %05d),
the element was stuck in a dead loop counting the frames:

gst_image_sequence_src_count_frames

This allows to display any image file out of the element
for a given number of buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5471>
2023-10-12 22:06:02 +00:00
Guillaume Desmottes a56aabc773 flvmux: set the src segment position as running time
We were already converting the pad last timestamp to running time but
not the segment position.
This segment position is used by gst_aggregator_simple_get_next_time()
to compute the waiting time when aggregating.

Those waiting times were wrong in my live pipeline using the system
clock, resulting in the aggregator to never wait at all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5460>
2023-10-11 15:20:18 +00: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
Xavier Claessens 0ab48250a9 GstCustomMeta: Use simplified API where possible
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5385>
2023-09-27 18:46:34 +00:00
Daniel Moberg 0e6cd64232 rtspsrc: Property for adding custom http request headers
This commit adds a property which enables adding custom http request headers to
the rtspsrc element. Added headers will be appended to http requests
made during http tunneling.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5268>
2023-09-26 06:35:43 +00:00
Stijn Last 4bda59f88d deinterlace: greedy, improve quality
scanlines->m1 = same line of the previous field
scanlines->t0 = line above of the current field
scanlines->b0 = line below of the current field
scanlines->mp = same line of the next field

Deinterlacing a field weaved frame:
When deinterlacing the top field, the next bottom field is available
(part of the same frame). but when deinterlacing the bottom field,
the next top field (part of the next frame) is not available and
scanlines->mp equals NULL.

In this case it's better to use greedy algorithm using the prevous field
(twice) rather then linear interpolation of the current field.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5331>
2023-09-25 06:40:47 +00:00
Sebastian Dröge 2a2ef23829 rtpsource: Don't store invalid running times and calculate with it
If we end up with GST_CLOCK_TIME_NONE as running time for an RTP packet
then this can't be used for bitrate estimation, and also not for
constructing the next RTCP SR. Both would end up with completely wrong
values, and an RTCP SR with wrong values can easily break
synchronization in receivers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5329>
2023-09-23 07:39:00 +00:00
Sebastian Dröge fcd591c1af rtpjitterbuffer: Avoid integer overflow in max saveable packets calculation with negative offset
The timestamp offset can be negative, and it can be a bigger negative
number than the latency introduced by the rtpjitterbuffer so the overall
timeout offset can be negative.

Using the negative offset for calculating how many packets can still
arrive in time when encountering a lost packet in an equidistant stream
would then overflow and instead of considering fewer packets lost a lot
more packets are considered lost.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5296>
2023-09-12 08:38:53 +00:00
Jonas K Danielsson 749652e60c rtp: Add rtppassthroughpay element
This elements pass RTP packets along unchanged and appear as a RTP
payloader element.

This is useful, for example when using the gstreamer-rtsp-server
library, in the case where you are receiving RTP packets from a
different source and want to serve them over RTSP. Since the
gst-rtsp-server library expect the element marked as payX to be a RTP
payloader element and assumes certain properties are available.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5204>
2023-08-22 14:01:09 +00:00
Guillaume Desmottes bc06c2109c flvmux: add 'enforce-increasing-timestamps' property
The hack enforcing strictly increasing timestamps was, according to the
code comments, because librtmp was confused with backwards timestamps.

rtmp2sink is not using librtmp as rtmpsink did, so this is no longer
required.
Also changing the timestamps is causing audio glitches when streaming to
Youtube.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5212>
2023-08-21 14:26:06 +02:00
Sebastian Dröge 09045da073 rtpgstpay: Enable hdrext aggregation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4979>
2023-08-15 07:12:03 +02:00
Jochen Henneberg a97d3acb90 rtp/vp8depay+vp9depay: Enable hdrext aggregation for VP8 and VP9
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4979>
2023-08-15 07:12:03 +02:00
Jochen Henneberg 2673a66e60 rtp/h264depay+h265depay: Enable hdrext aggregation for H264 and H265
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4979>
2023-08-15 07:12:03 +02:00
Vivia Nikolaidou 3257ee4374 deinterlace: Fix vfir 16-bit orc calculations
memcpy works in bytes, but orc works in items, so given that the size
arguments is in bytes, we need to divide by the pixel stride.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5172>
2023-08-11 17:47:27 +00:00
Vivia Nikolaidou 6145a5c7cb deinterlace: Fix greedyh crash for alternate-field interlacing
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2645

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5172>
2023-08-11 17:47:27 +00:00
Stéphane Cerveau 1e4cc59a3f isomp4: update isml documentation
Closing #2893

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5165>
2023-08-09 09:15:30 +00:00
Tim-Philipp Müller be2a3780c1 flvmux: use version template in metadata creator properties
Avoids documentation churn when the version changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5090>
2023-08-07 10:41:16 +00:00