Edward Hervey
3d500636a9
adaptivedemux2: Don't use g_str_equal on potentially NULL strings
...
It is only meant to be used as a callback. The fallback macro uses strcmp which
doesn't handle NULL strings gracefully. Instead use g_strcmp0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6392 >
2024-03-19 13:25:41 +00:00
Rafał Dzięgiel
38028c9873
hlsdemux2: Make start-bitrate property work without connection-speed
...
Makes "start-bitrate" work without setting "connection-speed" property. Having
another property set as a requirement for this one to work is unexpected.
This commit allows to request some initial bitrate for first segment, then
go into adaptive streaming for the rest of media playback.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3895 >
2023-02-17 17:48:40 +01: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
Edward Hervey
854683c871
hlsdemux2: Don't leak PDT datetime
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:24 +00:00
Jan Schmidt
91c8f3f990
hlsdemux2: Wait for playlist load after a switch
...
Check in update_fragment_info() if the playlist we want has actually been loaded
yet, and return BUSY if not.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:23 +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
454779f094
hlsdemux2: Wait for playlist switch during seek.
...
When switching to/from an iframe variant to do seeking, wait for the target
playlist to load before handling the seek.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:23 +00:00
Jan Schmidt
083538df9e
hlsdemux2: Continue reworking code for async playlist updates
...
Everything is working again now except for corner cases:
- Failing over to another playlist after a load failure
- Remembering playlist redirects and using that URI
directly next time.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:23 +00:00
Jan Schmidt
7b3a1bac0a
hlsdemux2: Add llhls-enabled property to streams
...
Tidying: Make the llhls-enabled setting configurable through a stream property
instead of set manually after construction.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:23 +00:00
Jan Schmidt
d5edd48f13
hlsdemux2: Add gst_hls_demux_stream_set_playlist_uri
...
Add a method that configures the new playlist URI for a stream.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:23 +00:00
Edward Hervey
2c822735ba
hlsdemux2: Add HLS playlist loader
...
Add a helper that asynchronously loads and refreshes the playlist for HLS
streams.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:23 +00:00
Jan Schmidt
0962908e62
adaptivedemux2: Add start/stop vfuncs
...
Remove the can_start() vfunc, in favour of vfuncs when the stream starts/stops,
allowing the sub-class to do custom logic before (or preventing) the stream from
starting and stopping.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:23 +00:00
Jan Schmidt
fa0e9e2ec5
hlsdemux2: Remove unused function argument
...
Remove the demux argument from the
gst_hls_demux_stream_update_rendition_playlist() method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:23 +00:00
Edward Hervey
b03e68ea8c
hlsdemux2: support old compilers
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:23 +00:00
Jan Schmidt
1cede1d0cf
hlsdemux2: Place HLS delivery directives in UTF-8 order.
...
Use new GstURI gst_uri_to_string_with_keys() API to produce the playlist URI
with query arguments in UTF-8 order.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:22 +00:00
Jan Schmidt
21cb739830
hlsdemux2: Avoid assert in _has_next_fragment()
...
gst_hls_demux_stream_has_next_fragment() can be called with a NULL
current_segment if we're past the end of the current playlist. In that case,
just return FALSE instead of hitting a critical in the playlist code.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:22 +00:00
Jan Schmidt
268a25b979
hlsdemux2: Use partial segment for playlist update interval
...
When playing LL-HLS playlists in LL-HLS mode, update the playlist more often (on
the partial segment interval) or else we end up downloading them in bursts and
playing further from the live edge than intended.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:22 +00:00
Jan Schmidt
55f6cd9243
hlsdemux2: Do a full playlist reload if delta fails
...
If we do a delta playlist request but then can't merge the result with the
existing playlist, retry with a full playlist request.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:22 +00:00
Jan Schmidt
874b665710
hlsdemux2: Fill in skipped segments if possible
...
After reloading a playlist using a delta request, use the previous playlist to
fill in skipped segments if possible.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:22 +00:00
Jan Schmidt
8a0190b521
hlsdemux2: Use skip and blocking playlist delivery directives
...
Detect when we can use a blocking request and delta playlist update requests and
add the required delivery directives to the request URI.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:22 +00:00
Jan Schmidt
d41def562c
hlsdemux2: Use stream llhls_enabled flag
...
Use the stream's copy of the llhls_enabled flag when deciding whether to do
preload requests - the value that was cached when the stream started
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:22 +00:00
Jan Schmidt
42b0dd8c41
hlsdemux2: Split the stream object out
...
Move the stream object to a separate file to split the demux level behaviour
from the stream behaviour better.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883 >
2023-02-03 16:52:22 +00:00