Commit graph

82 commits

Author SHA1 Message Date
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
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
Charlie Blevins 05cffc19dd rtpjitterbuffer: Allow earlier reference-timestamp-meta
Allow reference-timestamp-meta to be added earlier if an RTCP sender
report is sent before the first RTP packet.

Fixes #2843

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5084>
2023-08-03 17:26:42 +00:00
Nirbheek Chauhan 8e1b6accbd meson: Always use forward slashes in defines with paths
Fixes the following build failure on MSYS2:

```
../subprojects/gstreamer/tests/check/elements/filesrc.c: In function 'test_seeking':
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: error: incomplete universal character name \U
  107 |   g_object_set (G_OBJECT (src), "location", TESTFILE, NULL);
      |                                                     ^
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\A'
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\g'
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\s'
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\g'
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\c'
```

Due to: `-DTESTFILE=\"C:\\Users\\Administrator\[...]`

https://gitlab.freedesktop.org/nirbheek/gstreamer/-/jobs/45317733

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5018>
2023-07-12 21:17:25 +00:00
Peter Stensson 33fb3bfd60 rtpvp9pay: Only mark first outgoing packet as non delta-unit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4937>
2023-06-29 09:48:41 +00:00
Peter Stensson af43648bdf rtpvp8pay: Only mark first outgoing packet as non delta-unit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4937>
2023-06-29 09:48:41 +00:00
Peter Stensson fa4200a605 rtph264pay: Add unit tests verifying delta-unit flag
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4937>
2023-06-29 09:48:41 +00:00
Peter Stensson b40b4ffb81 rtph265pay: Only mark first NAL as non delta-unit
When the input buffer contained multiple NAL's the second one would keep
the non delta-unit flag for a key frame.

The delta-unit flag will now be set per NAL when preparing the buffer
list to payload.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4937>
2023-06-29 09:48:41 +00:00
Tim-Philipp Müller 2abdfb9657 tests: rtpbin_buffer_list: fix possible unaligned read on 32-bit ARM
Fixes #2666

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4842>
2023-06-14 04:59:05 +00:00
Tim-Philipp Müller f3c126d07c matroska-demux: fix accumulated base offset in segment seeks
When doing a segment seek, the base offset in the new segment
would be increased by segment.position which is basically the
timestamp of the last packet. This does not include the duration
of the last packet though, so might be slightly shorter than the
actual duration of the clip or the requested segment.

Increase the base offset by the segment duration instead when
accumulating segments, which is more correct as it doesn't cut
off the last frame and makes the effective loop segment duration
consistent with the actual duration returned from a duration
query.

In case a segment stop was specified it's also possible that
some data was sent beyond the stop that's necessary for decoding
so the base offset increment should be based on that then and
not on the timestamp of the last buffer pushed out.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4604>
2023-06-13 18:19:48 +00:00
Guillaume Desmottes 0fd3c28620 flvmux: push metadata on caps change
The metdata contains tags but also caps dependent info such as the
resolution and the framerate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4730>
2023-05-30 09:35:43 +02:00
Tim-Philipp Müller 0c4a702e82 qtdemux: add unit test for edit list regression
File is the mp4 file from #2549 with the mdat atom
zeroed out and compressed. We compress twice because
apparently compressing 5MB of zeroes effectively in
one run is too difficult for gzip.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2549

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4560>
2023-05-11 16:45:37 +00:00
Camilo Celis Guzman e4d8cda9a1 rtpvp8pay, rtpvp9pay: increment PictureID on FLUSH_START
In recent versions of Chrome (M106) a change on their jitter buffer means that
they are very susceptible to PictureID discontinuities.

Then avoid at all cost resetting the PictureID. Moreover, according to
the RFCs for VP8 and VP9 payloads; the PictureID can start off at any
random value. So there is no logical problem of incrementing it here
rather than resetting it, as long as it is a different PictureID.

WebRTC's recent corruption issue:
https://bugs.chromium.org/p/webrtc/issues/detail?id=15101

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4530>
2023-05-05 07:45:19 +00:00
Camilo Celis Guzman 38d5899eba rtpvp9pay: tests: remove unused struct and argument on test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4530>
2023-05-05 07:45:19 +00:00
Carlos Rafael Giani 3fbcf5fcf3 qtdemux: Only set appsink sync property and check for async state changes
By keeping async to TRUE, a deadlock is avoided where the appsink is
filled with data after a flushing seek but before its PAUSED->PLAYING
state change finishes. If that happens, the appsink is stuck, because
its internal condition variable waits for the appsink to have more room
for data. The basesink's preroll lock is held during this, and it also
tries to acquire that lock during the state change -> deadlock.
By keeping async to TRUE, this flood of data does not happen.

Also, setting the max-buffers property to 1 is unnecessary - the test
runner will anyway detect excess memory usage if it happens.

Other property adjustments turned out to just be redundant.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4200>
2023-05-03 08:47:56 +00:00
Carlos Rafael Giani 0071c97128 qtdemux: Add audio clipping meta when playing gapless m4a content
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4200>
2023-05-03 08:47:55 +00:00
Tim-Philipp Müller 83026f6289 amrnb, amrwbdec: move AMR-NB and AMR-WB plugins to -good
Fedora ships these libraries as part of the main distribution now,
and they are decades old anyway so don't implement any of the newer
features.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4512>
2023-05-02 23:33:12 +00:00
Guillaume Desmottes 7c4e36acfd videoflip: reset orientation if not present in a tag update
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4377>
2023-04-22 14:02:13 +02:00
Guillaume Desmottes c0fa04fcaf videoflip: handle tag list scopes
STREAM taglist can now overrides the orientation from the GLOBAL
taglist, but not the other way around.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4377>
2023-04-22 14:02:13 +02:00
Guillaume Desmottes 96afec6253 videoflip: reset orientation on new stream
Fix the following use:
- upstream sends a video with a rotation tag, say 90°
- upstream switches to another video without rotation
- the second video was still rotated by videoflip

Fix this by resetting the orientation when receiving STREAM_START.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4377>
2023-04-22 14:02:13 +02:00
Guillaume Desmottes 61a5da1014 videoflip: add test rotating from tags
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4377>
2023-04-22 14:02:13 +02:00
Seungha Yang 3374f2f44d udpsrc: Add support for IGMPv3 SSM
Adding "multicast-source" property to support Source Specific Muliticast
RFC 4604. The source can be multiple address with '+' (for positive
filter) or '-' (negative filter) prefix, or URI query can be used.
Note that negative filter is not implemented yet and it will be
ignored

Example:
gst-launch-1.0 uridecodebin \
  uri=udp://{ADDRESS}:PORT?multicast-source=+SOURCE0+SOURCE1

Inspired by:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2620

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3485>
2023-04-12 16:32:07 +00:00
Edward Hervey 7e619f7e83 twcc: Better handle duplicate packets
The previous code would only check if two packets in a row were duplicates. If
not (i.e. a packet is a duplicate of a packet received slightly before) the code
would generate completely bogus FCI because it assumes there were no duplicates
present in the array.

In order to be efficient, just store all received packets and remove the
duplicates just before the FCI is generated once the array of observations have
been sorted by seqnum.

Fixes TWCC usage with moderate to high packet duplication.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4328>
2023-04-10 09:37:51 +00:00
Tim-Philipp Müller 0fc568c6b1 gst-plugins-good: re-indent with GNU indent 2.2.12
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4182>
2023-03-17 03:18:54 +00:00
Rafał Dzięgiel 9d720554a0 dashdemux2: Improve initial representation selection
Do not always start with lowest quality possible. Use properties set
by user to select best allowed initial representation at startup too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3894>
2023-02-18 21:05:25 +00:00
Hosang Lee 0efb792fb4 tests: qtdemux: add test for MSS fragment wrong data offset compensation
A data offset with an offset smaller than the moof length is wrong
in smooth streaming streams. The samples will not be located and
eventually playback will error out. So compensate assuming data
is in mdat following moof.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3840>
2023-02-16 00:43:57 +00:00
Tim-Philipp Müller 491feead6e tests: qtdemux: use binary files for samples
Instead of hexdumping it in a 360k header file.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3840>
2023-02-16 00:43:57 +00:00
Patricia Muscalu c3e52d5c4f rtph264pay: Don't insert SPS/PPS before the second image slice
Only the first slice, for which fist_mb_in_slice is set to 0,
should trigger insertion of SPS and PPS buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3402>
2023-02-08 12:10:11 +00:00
Edward Hervey 0639f117cb hlsdemux2: Remove enable-llhls property
This was only used for testing purposes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:24 +00:00
Jan Schmidt 2b93dae59a hlsdemux2: Handle async playlist loading failures
Add failed variant playlists to a list and failover to other variants until
there is none left

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt 9ae3978c72 hlsdemuxdemux2: Consider the hold-back when calculating seek range
When calculating the seek range for a live stream, use the same hold-back logic
as when choosing a starting segment, including low-latency segments if
enabled. Permits seeking closer to the live edge when re-synching or catching
up.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt 7496d2750e hlsdemux2: Parse EXT-X-SKIP tag
Parse the attributes from the EXT-X-SKIP tag

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt 5baf5f4b1e hlsdemux2: Add a timestamp to the playlist
Store the timestamp for this playlist. If valid it represents the monotonic time
at which the data was retrieved, minus any proxy cache Age field.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt 43e042c4b7 hlsdemux2: Implement LL-HLS flag and part-hold-back/hold-back in live.
Add a flag to hlsdemux to enable or disable LL-HLS handling.

When LL-HLS is enabled and an LL-HLS playlist is loaded, use the part-hold-back
threshold to choose a starting segment.

For live streams that aren't LL-HLS, use the provided hold-back attribute, or
fall back to landing 3 segments from the end.

Make the gst_hls_media_playlist_seek() method able to choose a partial segment
within 2 target durations of the end of the playlist when requested.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt 92e849070f hlsdemux2: Mark locations where partial segments need handling
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt 43a8d45ac6 hlsdemux2: Add unit test for parsing LL-HLS playlist
Test parsing of partial segments (EXT-X-PART, EXT-X-PART-INF) and preload
hints (EXT-X-PRELOAD)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Tim-Philipp Müller 756a8986d0 good: tests: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Olivier Crête 46a6f72f03 rtopuspay: Ignore the stereo parameter in multiopus caps
Also add unit tests for the various variants

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3674>
2023-01-12 18:48:35 -05:00
A. Wilcox 412eaf3526 tests: Cast drop-messages-interval type properly
The rtpjitterbuffer test drop_messages_interval uses a GstClockTime for
the message drop interval.  This property is defined as a guint.  On
systems with 64-bit time_t but 32-bit uint, this can cause the
g_object_set function to fail to read the arguments properly.

Fixes: #1656
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3580>
2022-12-16 01:36:07 -06:00
Johan Sternerup 9794c9bfd0 Use the correct SSRC(s) when routing a RTCB FB FIR
Previously we tried to route an incoming RTCP FB FIR to the correct ssrc
using the "media source" component of the RTCP FB message. However,
according to RFC5104 (section 4.3.1.2) the "media source" SHALL be set
to 0. Instead the ssrc(s) in use are propagated via the FCI data. Now
a specific GstForceKeyUnit event is sent for every ssrc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3292>
2022-11-23 11:31:23 +00:00
Sebastian Dröge d815035e82 rtpjitterbuffer: Add test for rescheduling timers to negative times
This tests the changes introduced by 4d3b8d1129
for issue #571.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3416>
2022-11-16 08:26:41 +00:00
Rafał Dzięgiel e93f391139 tests: Add DASH MPD baseURL with query test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1147>
2022-11-14 23:45:53 +00:00
Tim-Philipp Müller d132592423 xingmux: move from gst-plugins-ugly to gst-plugins-good
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/415

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3251>
2022-10-25 12:40:20 +00:00
Devin Anderson 4e03c5f885 wavparse: Fix crash that occurs in push mode when header chunks are corrupted
in certain ways.

In the case that a test is provided for, the size of the `fmt ` chunk is
changed from 16 bytes to 18 bytes (bytes 17 - 20 below):
```
$ hexdump -C corruptheadertestsrc.wav
00000000  52 49 46 46 e4 fd 00 00  57 41 56 45 66 6d 74 20  |RIFF....WAVEfmt |
00000010  12 00 00 00 01 00 01 00  80 3e 00 00 00 7d 00 00  |.........>...}..|
00000020  02 00 10 00 64 61 74 61                           |....data|
00000028
```

(Note that the original file is much larger.  This was the smallest sub-file
I could find that would generate the crash.)

Note that, while the same issue doesn't cause a crash in pull mode, there's a
different issue in that the file is processed successfully as if it was a .wav
file with zero samples.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3173>
2022-10-13 08:56:49 +00:00
George Kiagiadakis 8dd512fd9f tests/check/rtpsession: extend test_internal_sources_timeout
to verify that rtx SSRCs do not BYE after timeout

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/360

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3112>
2022-10-10 14:56:18 +00:00
Jan Schmidt 3c2c4bbe2c dashdemux2: fix mpd unit test expectations
Update unit test for some mpd cases that were reporting
timestamps including the period start time, while
dashdemux2 expects that it needs to add the period
start time itself.

Fix the tests to not expect the period start time
to be included.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3025>
2022-09-27 00:00:49 +00:00
Tim-Philipp Müller 2ac5d687e1 tests: add a few more orc tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3029>
2022-09-15 12:14:56 +01:00
Edward Hervey 855dabb578 dashdemux2: Remove bogus limitation checks for duration fields
Just like for the seconds field, there are no limitations on the hours and
minutes fields. The specification for xml schema duration fields doesn't forbid
specifying durations with only (huge) minutes or hours values.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2951>
2022-09-07 12:48:28 +00:00
Sebastian Dröge cc454f0fc3 rtpjitterbuffer: Add test for crash caused by removing timers twice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2973>
2022-09-03 09:26:24 +00:00
Patricia Muscalu 3c9e4f4886 rtph265: keep delta unit flag
Without this patch all buffers that pass the payloader
are marked as non-delta-unit buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2969>
2022-09-02 08:56:13 +00:00