mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
hlssink: allow creation of 'infinite' playlist
Allow the playlist-length to accept '0' as a value, indicating that no segment should be removed from the playlist. This allows generating playlists to be used as VOD when complete.
This commit is contained in:
parent
6ec5904d46
commit
00bdac51a3
2 changed files with 4 additions and 3 deletions
|
@ -161,8 +161,9 @@ gst_hls_sink_class_init (GstHlsSinkClass * klass)
|
||||||
g_object_class_install_property (gobject_class, PROP_PLAYLIST_LENGTH,
|
g_object_class_install_property (gobject_class, PROP_PLAYLIST_LENGTH,
|
||||||
g_param_spec_uint ("playlist-length", "Playlist length",
|
g_param_spec_uint ("playlist-length", "Playlist length",
|
||||||
"Length of HLS playlist. To allow players to conform to section 6.3.3 "
|
"Length of HLS playlist. To allow players to conform to section 6.3.3 "
|
||||||
"of the HLS specification, this should be at least 3.",
|
"of the HLS specification, this should be at least 3. If set to 0, "
|
||||||
1, G_MAXUINT, DEFAULT_PLAYLIST_LENGTH,
|
"the playlist will be infinite.",
|
||||||
|
0, G_MAXUINT, DEFAULT_PLAYLIST_LENGTH,
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ gst_m3u8_playlist_add_entry (GstM3U8Playlist * playlist,
|
||||||
|
|
||||||
entry = gst_m3u8_entry_new (url, title, duration, discontinuous);
|
entry = gst_m3u8_entry_new (url, title, duration, discontinuous);
|
||||||
|
|
||||||
if (playlist->window_size != -1) {
|
if (playlist->window_size > 0) {
|
||||||
/* Delete old entries from the playlist */
|
/* Delete old entries from the playlist */
|
||||||
while (playlist->entries->length >= playlist->window_size) {
|
while (playlist->entries->length >= playlist->window_size) {
|
||||||
GstM3U8Entry *old_entry;
|
GstM3U8Entry *old_entry;
|
||||||
|
|
Loading…
Reference in a new issue