Commit graph

724 commits

Author SHA1 Message Date
Jan Schmidt 1e6550f623 hlsdemux2: Resync stream time on partial segment boundaries
When resyncing stream times in a playlist, support at any partial segment
position, not just at full segment boundaries.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt bdec75f9dc hlsdemux2: Calculate / transfer timing info for preloads
When fulfilling data requests, transfer timing information so the stream can
calculate data bitrates.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt 5192181ef5 adaptivedemux2: Add most recent data time and offset helper
Add a field to the DownloadRequest that reports the most recent time at which
data arrived. Update it in the DownloadHelper.

Add a method to retrieve the GST_BUFFER_OFFSET() for the DownloadRequest's data
buffer (if any).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt 40938c8853 adaptivedemux2: Handle another case in download_request_take_buffer_range
Handle the case where we want to get a range from the available data that
doesn't start at the first available byte (and discard the bytes before that
start offset).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt cbb9cfe987 hlsdemux2: Cancel preload before fetching something else
When submitting a request for fragment or header that doesn't match any preload,
make sure there's not an ongoing preload for that data type, to avoid parallel
downloads using up bandwidth.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt 70bfeff35d hlsdemux2: Fix assertion on shutdown
After cancelling a DownloadRequest, the download helper may not do so
immediately, so we can't assert on the in_use flag. Also, since there's no
refcount on the preload hint struct in the download request callback data, make
sure no callbacks will be dispatched when we're going to free the preload hint
struct.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt 44107d0c4b hlsdemux2: Implement the stream submit_request() vfunc
Implement the submit_request() vfunc for streams and fulfil requests from the
preload hint data if possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt a7e5236a39 hlsdemux2/preloader: Implement basic request handling
Implement fulfilment of HTTP requests from the active preload downloads by
finding any preload request that can provide the requested data and feeding
bytes from the internal DownloadRequest to the caller provided target
DownloadRequest.

Doesn't yet calculate timestamps to make the target request have a sensible
apparent bitrate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt 940811d593 adaptivedemux2/downloadrequest: Add new methods
Add download_request_take_buffer_range() and
download_request_get_bytes_available() methods.

download_request_take_buffer_range() takes bytes from the front of the request
that satisfy the requested start/end byterange, and puts any remaining bytes
back into the DownloadRequest

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt 76565e8979 adaptivdemux2: Improve a comment about unlocking download requests.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt a14f4f7054 adaptivedemux2: Make download mechanism overrideable
Make the mechanism by which DownloadRequests are fulfilled overrideable by the
subclass, in case it has an internal mechanism it can use (such as blocking
preloads in HLS)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt cb27c05ca7 hlsdemux2: Add preloader helper.
Add a helper that submits and handles blocking preload requests for future
PART/MAP data from live playlists. Add handling in the hlsdemux stream to submit
preload requests when hitting the end of the available segments in a live
playlist.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt 5ca336226e hlsdemux2: Add preload equality helper
Add a helper function that compares two preload hints for equality based on URI
and requested byte range.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt 30bc72d6c7 adaptivedemux2: Define RFC8673_LAST_BYTE_POS
Define the recommended value from RFC8673 for the last byte of an open-ended
range request intended to invoke chunked blocking downloads of an incrementally
created resource.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt 61516eadf6 hlsdemux2: Ignore partial segments when not live
Add some checks that LL-HLS support is enabled and that the current playlist is
live before proceeding to play any partial segments.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt 401ca3ef44 hlsdemux2: Print playlist age in debug output
Store the timestamp when playlists are updated, and add some debug output to the
update_fragment_info that estimates how far from the live edge the fragment
currently is

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 9848c1a1a1 m3u8demux2: Fix off-by-one and leak.
Fix an off-by-one in gst_hls_media_playlist_sync_to_playlist() that would ignore
the first fragment in the reference playlist.  The error was harmless, since we
expect the reference playlist to be older than the playlist we're
synchronising (so the first/oldest segment in the reference playlist will likely
not exist in the new playlist), so this is just for correctness.

Also fix a segment leak in gst_hls_media_playlist_advance_fragment() when
ignoring the partial_only segment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt 676fffd23c hlsdemux2: Fix segment advance on partial segments.
Fix the duration passed to gst_adaptive_demux2_stream_advance_fragment() when
advancing from a partial segment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt e318bc3df5 hlsdemux2: Improve some debug output
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt 3537614c2b hlsdemux2: Add and use gst_hls_media_playlist_find_position()
Add a function for synchronising current position with the contents of a
playlist that is specifically for that and can handle synchronising to a partial
segment.

gst_hls_media_playlist_seek() will be used only when performing external seek
requests, to find the best segment or partial segment at which to resume
playback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt c25814bac0 hlsdemux2: Add debug in find_segment_in_playlist()
In m3u8 segment matching, print the PDT that was matched between playlists.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt 857541ae07 hlsdemux2: Fix some m3u8 segment leaks
Make sure unref m3u8 segments in some missed paths.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt 7b9547a119 hlsdemux2: Allow starting at the partial_only segment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt 1b8af98208 hlsdemux2: Recalculate partial segments in anchor segment
When recalculating the partial segment stream times in
gst_hls_media_playlist_recalculate_stream_time(), don't miss the anchor segment
itself.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt e1a6ec22ee hlsdemux2: Dump init uri details for segments.
When dumping an m3u8 playlist to debug, include information about any
initialisation data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt 2c82fdf276 hlsdemux2: Use gst_hls_media_playlist_recalculate_stream_time()
Instead of recalculating stream times manually in a playlist, let the playlist
do it, so that it fixes up partial segment stream times too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt d76aacfb82 hlsdemux2: LL-HLS improvements
Fixes for stream_time recalculation and handling in partial segments.

Disallow bitrate switching when in the middle of partial segments - only at a
full segment (or right before the first partial segment of a segment).

It's possible but more difficult to switch bitrates in the middle of a partial
segment group, since they are less likely to have aligned keyframes. In any
case, the seek code can't do that right now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt b6abe94890 hlsdemux2: Continue implementing LL-HLS support
Somewhat working support for proceeding into the partial segments appearing at
the live edge of the playlist.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +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 cfc62a69f7 hlsdemux2: Start adding partial_segment handling
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt 9aa2497062 hlsdemux2: Note STABLE-RENDITION-ID is not handled
Add a comment that STABLE-RENDITION-ID is not yet parsed or used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt e2750d4ae3 hlsdemux2: Calculate stream times for partial segments
When calculating stream times for segments, fill in the stream time fields on
any attached partial segments

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
Jan Schmidt 3c50f54310 hlsdemux2: Implement preload hint parsing
Load EXT-X-PRELOAD-HINT into a preload_hints array in the media playlist

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt 3ed6a23a4d hlsdemux2: Implement EXT-X-SERVER-CONTROL parsing
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt 07f51396af hlsdemux2: Add parsing of partial segments
Add partial segments to each media segment, and potentially create a trailing
dummy segment if there are partial segments at the end of the playlist

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt fac7177354 hlsdemux2: make helper function for parsing times
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Edward Hervey 4e946890b2 adaptivedemux2: Global output position is always positive
Change to non-signed GstClockTime for tracking

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Thibault Saunier 6b30a5d987 adaptivedemux2: Generate proper stream-id taking into account upstream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3160>
2023-02-01 22:26:34 +00:00
Matthew Waters 659c45ee7e qml6: implement qml6gloverlay
Based on the Qt5 version of qmlgloverlay.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3845>
2023-02-01 13:23:52 +00:00
Guillaume Desmottes 3d1390d31a rtpptdemux: set different stream-id on each src pad
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3855>
2023-02-01 09:17:33 +00:00
Guillaume Desmottes cc2b8f6ae8 rtpssrcdemux: set different stream-id on each src pad
All the RTP src pads were sharing the same stream-id while each actually
carry a different stream.

This was causing problem for example when funneling the streams together
and then trying to split them using 'streamiddemux'.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3855>
2023-02-01 09:17:33 +00:00
Sebastian Dröge 3ca85189fd rtspsrc: Also consider "Method Not Valid In This State" error in broken control URL handling workaround
Some servers send a 455 error instead of any reasonable error when using
a correctly constructed control URL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3854>
2023-02-01 07:55:24 +00:00
Matthew Waters 293ad62035 qt6: add qml6glsrc element
Same functionality as qmlglsrc (Qt5) but for Qt6.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3737>
2023-01-28 02:24:09 +00:00
Alicia Boya García 8a6023a38a qtdemux: Use safer clearing functions in dispose()
In theory, `dispose()` functions should be idempotent and should be
prepared not to crash or cause a double-free if an unref done from
inside caused a recursive call to `dispose()` of the same object.

https://developer.gnome.org/gobject/stable/howto-gobject-destruction.html

This patch modifies the `dispose()` method to honor these constraints.

Since the double `dispose()` call won't actually occur in qtdemux (there
is no cycle detection mechanism that could invoke it to work that way),
this is more of a code cleanup than a user-facing problem fix.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3822>
2023-01-28 00:32:57 +00:00
Daniel Knobe 5e9a32ed8c imagefreeze: add bayer support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3807>
2023-01-26 21:30:51 +00:00
Pawel Stawicki 492d2b6498 v4l2h264dec: Fix Raspberry Pi4 will not play video in application
Ensure object v4l2object->pool will be released by
correctly releasing the temporary thread-safety lock

Fixes issue #1729

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3786>
2023-01-25 16:07:50 +00:00
Nirbheek Chauhan 8e8d8206f1 meson: Add build_rpath for qt5 plugin on macOS
Without this, the plugin cannot be loaded in a devenv because the
RPATH is not added to the plugin dylib. This RPATH will be stripped on
install, which is what we want.

When deploying apps, people are supposed to use `macdeployqt` to
create an AppBundle that bundles Qt for you and sets the RPATHs
correctly to point to that bundled Qt.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3708>
2023-01-25 11:38:52 +00:00
Mathieu Duponchelle 2048a0a4d9 redenc: fix setting of extension ID for twcc
1 was previously hardcoded in, and the bug went under the radar because
webrtcsink hardcodes the number too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3785>
2023-01-24 22:52:48 +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
Tim-Philipp Müller f6950b4537 v4l2: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller 74e103e53f xingmux: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller fc82621e09 multiudpsink: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller 8222b97331 rtpmanager: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller e66f8cff26 rtp: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller 56d3beed0b multifile: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller e256472ca6 matroska: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller 172c6ca1dc flv: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller 9f4c514c52 dtmf: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller 2a3513ef6c vpx: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller 9ab2541266 gdkpixbuf: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller 1df462ec5b pulseaudio: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller 9a235838c8 adaptivedemux2: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
David Svensson Fors d0edc1ad6a udpsrc: GstSocketTimestampMessage only for SCM_TIMESTAMPNS
Deserialize socket control messages as GstSocketTimestampMessage only
if (level, type) is (SOL_SOCKET, SCM_TIMESTAMPNS).

Without this patch, messages with types SCM_RIGHTS or SCM_CREDENTIALS
could be deserialized as GstSocketTimestampMessage instead of
GUnixFDMessage or GUnixCredentialsMessage from gio.

Fixes #1736

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3777>
2023-01-24 10:49:01 +01:00
Hiero32 145d362129 taginject: Add scope property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3697>
2023-01-24 00:20:53 +00:00
Tim-Philipp Müller 41c69372b5 Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3775>
2023-01-23 23:04:53 +00:00
Tim-Philipp Müller f13c65d977 Release 1.22.0 2023-01-23 19:41:07 +00:00
Tim-Philipp Müller 060712f68f gst-plugins-good: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3773>
2023-01-23 16:31:20 +00:00
Sebastian Dröge 067b5d92b4 matroska: Add stream-format = (string) obu-stream to AV1 caps
Anything else is not allowed in Matroska/WebM.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3740>
2023-01-19 12:10:40 +02:00
Sebastian Dröge 4c8141a0c3 isomp4: Add stream-format = (string) obu-stream to AV1 caps
Anything else is not allowed in MP4.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3740>
2023-01-19 12:10:40 +02:00
Jan Alexander Steffens (heftig) 211191564e qtdemux: Add basic support for AVC-Intra video
AVC-Intra is a range of H.264-compliant intra-only codecs from
Panasonic. The codes and descriptions have been taken from VLC.

The (encumbered) sample I have here produces byte-stream H.264,
including SPS and PPS and no `avcC` box.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3739>
2023-01-18 10:01:30 +00:00
Tim-Philipp Müller a9ec35b1ca Release 1.21.90 2023-01-13 19:08:48 +00:00
Olivier Crête c593930055 rtopuspay: Use GstStaticCaps to cache parsed caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3674>
2023-01-12 18:48:35 -05: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
Olivier Crête f1cf457811 rtpopuspay: Leave original caps as-is
This should make it work if someone specifies stereo with MULTIOPUS
somehow.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3674>
2023-01-12 18:48:35 -05:00
Olivier Crête c52c66b575 rtpopuspay: Return upstream channel filter based on OPUS vs MULTICAPS
Only allow 1 or 2 channels if the caps are OPUS, or 3+ if they are
MULTIOPUS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3674>
2023-01-12 18:48:35 -05:00
Olivier Crête c51ae6112d rtpopus: Put MULTIOPUS in all caps
The RTP payload encoding-name are always in caps in GStreamer.
In SDP, they are not case-sensitive, but since caps are, we need to pick
a caps, and we picked upper-case along time ago.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3674>
2023-01-12 18:48:35 -05:00
Tim-Philipp Müller 146575fa61 gst-plugins-good: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3711>
2023-01-11 19:20:17 +00:00
Tim-Philipp Müller a1672ec004 Fix translation pot files when creating dist tarballs
Add version as per Translation Project requirements and
also add a .pot file without the ABI suffix.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3711>
2023-01-11 19:20:17 +00:00
Marek Vasut d43ee08f13 jpegdec: Disable libjpeg-turbo SIMD acceleration support for now
The libjpeg-turbo SIMD acceleration support suffers from multiple
unresolved cornercases. Disable the libjpeg-turbo for now until
those cornercases are resolved.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3694>
2023-01-10 00:32:38 +00:00
Jan Schmidt 023c67e166 hlsdemux: Consider starting stream time in presentation offset
When calculating the presentation offset for CMAF input in live
playback, subtract the stream_time of the fragment from the
calculated presentation offset, so that the first fragment
is played at running time zero.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3680>
2023-01-05 07:08:16 +00:00
Nirbheek Chauhan 92b9c604c4 meson: Add an option to select the method for finding Qt
This is needed by Cerbero, since we want to force the use of qmake to
find Qt on non-Linux platforms.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3628>
2022-12-29 09:53:17 +00:00
Seungha Yang ce2c294117 gtkbasesink: Fix widget leak
gst_gtk_base_sink_get_widget() will increase refcount and it should
be released after use

Fixing regression introduced by the commit
941c0e81dd

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3644>
2022-12-28 09:14:59 +00:00
Seungha Yang 6540c4e89c rtspsrc: Fix string leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3645>
2022-12-28 04:39:18 +09:00
Seungha Yang 9b305df1cc rtptimerqueue: Fix memory leak
Should chain up to parent's finalize

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3645>
2022-12-27 19:31:16 +00:00
Patricia Muscalu d752bf1b46 qtmux: Fix buffer leak in fragment_buffers
When pushing buffers from one of the sink pads fail,
make sure that all buffers added to fragment_buffers on other pads
are freed as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3624>
2022-12-22 14:11:10 +00:00
Mathieu Duponchelle 194dcd91e0 qtmux: For video with N/1001 framerates use N as timescale instead of centiframes
This is recommended by various specifications for such framerates, while
for integer framerates we continue using centiframes to allow for some
more accuracy.

Using N means that no rounding error accumulates, eventually leading to
outputting a packet with a different duration.

Some tools such as MediaInfo determine that a stream is variable
framerate if any packet has a different duration than the others, and
there is no reason I can see for not using the full 4 bytes of
resolution that the mp4 timescale offers.

Example problematic pipeline:

```
videotestsrc num-buffers=5001 ! video/x-raw,framerate=60000/1001,width=320,height=240 ! \
videoconvert ! x264enc bitrate=80000 speed-preset=1 tune=zerolatency ! h264parse ! \
video/x-h264,profile=high-10 ! mp4mux ! filesink location="result2.mp4"
```

This results in a media file that MediaInfo detects as variable
framerate because the 5000th packet has duration 99 instead of 100.

With this patch, the timescale is 60000 and all packets have duration
1001.

Related issue for context: https://bugzilla.gnome.org/show_bug.cgi?id=769041

Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3049>
2022-12-22 12:31:06 +02:00
Jan Schmidt e2cd5b1660 qmlglsrc: Handle HiDPI scaling
When calculating the capture framebuffer size, include
any device scaling applied to the rendered framebuffer

Fixes only capturing part of the window when there is
a global scale factor.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3612>
2022-12-21 12:21:32 +00:00
Jan Schmidt d3c85b4d19 qmlglsrc: Unmap buffer before adding sync meta
Adding a sync meta to a GstBuffer requires that it
be writable. Mapping the buffer with the video frame API
holds an extra ref on the buffer, so unmap before
trying to modify it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3612>
2022-12-21 12:21:32 +00:00
Jan Schmidt 2b09f7a006 qmlglsrc: Stop when basesrc calls unlock()
Instead of stopping capture when the state changes,
handle other cases of basesrc stopping capture by - such
as handling an EOS event - by implementing an unlock()
method

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3612>
2022-12-21 12:21:32 +00:00
Sebastian Dröge 066558cba1 qtdemux: Always use tfdt if available in BYTE segments
This reverts the decision from
  https://bugzilla.gnome.org/show_bug.cgi?id=754230
where it was decided that we rather play safe and only use the `tfdt` if
it is "significantly different" to the sum of sample durations.

As the specification says

    If the time expressed in the track fragment decode time (‘tfdt’) box
    exceeds the sum of the durations of the samples in the preceding
    movie and movie fragments, then the duration of the last sample
    preceding this track fragment is extended such that the sum now
    equals the time given in this box.

we have to use the `tfdt` in general to allow for it to signal gaps in
the stream.

A muxer producing fragments might not yet know the full duration of the
last sample of a previous fragment if the next fragment starts with a
gap, and knowing the actual start of the next fragment would potentially
require to violate latency requirements.

Additionally, the existence of `tfdt` allows to avoid accumulating
rounding errors from summing up the durations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3586>
2022-12-17 19:26:19 +02: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
Thibault Saunier f7b342f1dd base:navigation: Cleanup navigation key modifiers enum
We were exposing the 'ALT' modifier as if we were guaranteeing its
accuracy but truth is we were only exposing configuration dependent
values.

Make the API simpler for now, the same way as Gtk3 was exposing it, and
when we have time to guarantee more values by making them take backends
configuration into account, we will expose those values in a accurate
way.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3565>
2022-12-15 16:47:13 +00:00
Xabier Rodriguez Calvar 87ae60176b qtdemux: Clear protection events when we get new ones
If we keep the old events they can be end up being passed to the app, that could
discard the protection information because it has been seen before.

Drive by improvement: use g_queue_clear_full instead of foreach+clear for
protection events.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3547>
2022-12-14 11:01:23 +01:00
Víctor Manuel Jáquez Leal 06c7b33505 jpegdec: Enable packetized if sink caps contains parsed as true.
jpegdec is capable to parse input frames, but if jpegparse is before,
there's no need to reparse frames. This patch configure jpegdec as
packetized, skipping parsing, if negotiated sink caps has the boolean
field 'parsed' as true.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2464>
2022-12-12 12:02:35 +00:00
Henry Hoegelow 6a2a5fd44c pulsesink: Fix occasional period of silence on resume
According to comment in gst_pulsering_stream_latency_cb, latency updates
happen every 100 ms. The code in gst_pulsering_stream_latency_cb does
not care about the actual state of the ringbuffer, pbuf->acquired or
not.
Thus, every 100 ms the ringbuf->segdone may be set, even though the
object itself might be in 'destroyed' state. On next
gst_pulseringbuffer_acquire the segdone is not touched, so playback may
resume with invalid/wrong segdone value. This finally leads to a period
of silence playing after resuming the pipeline.

The problem was found on 'not-yet-released'-hardware and so far was not
reproducible on desktop computer.

Removing the callback as long as the ringbuffer is not in 'acquired'
state solves the problem reliably on the hardware device that the issue
was detected on.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3082>
2022-12-12 08:29:28 +00:00
Mathieu Duponchelle fa71217502 rtpvp9depay: expose keyframe-related properties
This simply brings in the wait-for-keyframe and request-keyframe
properties from rtpvp8depay.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/909>
2022-12-10 13:28:07 +00:00
Jacek Skiba 61c17c5665 qtdemux: exit when protection caps are not defined during PIFF parsing
Reproduction testcase (uses PlayReady):
https://developers.canal-plus.com/rx-player/upc/?appTileLocation=[object%20Object]

In test streams we are using PIFF box, but caps did not had
present GST_PROTECTION_SYSTEM_ID_CAPS_FIELD. In consequence, invalid
system_id was returned which caused SIGSEGV crash.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3535>
2022-12-07 18:35:37 +00:00
Edward Hervey 63b598b409 adaptivedemux2: Don't allow stream selection while switching periods
The stream selection is done on the currently outputting tracks, but in order to
(de)activate the backing streams we can only do it if the input and output
period are identical.

Fixes crash when doing stream selection during period migration

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3525>
2022-12-05 11:03:26 +00:00