From da0e6b0afcfab7ff951168ec32cc2a62d2fece7b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 6 May 2021 10:46:15 +0300 Subject: [PATCH] hlssink(2): Don't write deprecated EXT-X-ALLOW-CACHE metadata It's deprecated since quite a few versions and various validators complain about it. Instead of the in-manifest metadata this should be handled by the normal HTTP caching headers. Part-of: --- ext/hls/gsthlssink.c | 3 +-- ext/hls/gsthlssink2.c | 3 +-- ext/hls/gstm3u8playlist.c | 6 +----- ext/hls/gstm3u8playlist.h | 6 ++---- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/ext/hls/gsthlssink.c b/ext/hls/gsthlssink.c index a5f2f5e..72afe03 100644 --- a/ext/hls/gsthlssink.c +++ b/ext/hls/gsthlssink.c @@ -213,8 +213,7 @@ gst_hls_sink_reset (GstHlsSink * sink) if (sink->playlist) gst_m3u8_playlist_free (sink->playlist); sink->playlist = - gst_m3u8_playlist_new (GST_M3U8_PLAYLIST_VERSION, sink->playlist_length, - FALSE); + gst_m3u8_playlist_new (GST_M3U8_PLAYLIST_VERSION, sink->playlist_length); sink->state = GST_M3U8_PLAYLIST_RENDER_INIT; } diff --git a/ext/hls/gsthlssink2.c b/ext/hls/gsthlssink2.c index 7b5cdfa..a2c2865 100644 --- a/ext/hls/gsthlssink2.c +++ b/ext/hls/gsthlssink2.c @@ -374,8 +374,7 @@ gst_hls_sink2_reset (GstHlsSink2 * sink) if (sink->playlist) gst_m3u8_playlist_free (sink->playlist); sink->playlist = - gst_m3u8_playlist_new (GST_M3U8_PLAYLIST_VERSION, sink->playlist_length, - FALSE); + gst_m3u8_playlist_new (GST_M3U8_PLAYLIST_VERSION, sink->playlist_length); g_queue_foreach (&sink->old_locations, (GFunc) g_free, NULL); g_queue_clear (&sink->old_locations); diff --git a/ext/hls/gstm3u8playlist.c b/ext/hls/gstm3u8playlist.c index f2f1a5e..8da9004 100644 --- a/ext/hls/gstm3u8playlist.c +++ b/ext/hls/gstm3u8playlist.c @@ -69,14 +69,13 @@ gst_m3u8_entry_free (GstM3U8Entry * entry) } GstM3U8Playlist * -gst_m3u8_playlist_new (guint version, guint window_size, gboolean allow_cache) +gst_m3u8_playlist_new (guint version, guint window_size) { GstM3U8Playlist *playlist; playlist = g_new0 (GstM3U8Playlist, 1); playlist->version = version; playlist->window_size = window_size; - playlist->allow_cache = allow_cache; playlist->type = GST_M3U8_PLAYLIST_TYPE_EVENT; playlist->end_list = FALSE; playlist->entries = g_queue_new (); @@ -155,9 +154,6 @@ gst_m3u8_playlist_render (GstM3U8Playlist * playlist) g_string_append_printf (playlist_str, "#EXT-X-VERSION:%d\n", playlist->version); - g_string_append_printf (playlist_str, "#EXT-X-ALLOW-CACHE:%s\n", - playlist->allow_cache ? "YES" : "NO"); - g_string_append_printf (playlist_str, "#EXT-X-MEDIA-SEQUENCE:%d\n", playlist->sequence_number - playlist->entries->length); diff --git a/ext/hls/gstm3u8playlist.h b/ext/hls/gstm3u8playlist.h index aae4499..016368e 100644 --- a/ext/hls/gstm3u8playlist.h +++ b/ext/hls/gstm3u8playlist.h @@ -31,7 +31,6 @@ typedef struct _GstM3U8Playlist GstM3U8Playlist; struct _GstM3U8Playlist { guint version; - gboolean allow_cache; gint window_size; gint type; gboolean end_list; @@ -49,9 +48,8 @@ typedef enum } GstM3U8PlaylistRenderState; -GstM3U8Playlist * gst_m3u8_playlist_new (guint version, - guint window_size, - gboolean allow_cache); +GstM3U8Playlist * gst_m3u8_playlist_new (guint version, + guint window_size); void gst_m3u8_playlist_free (GstM3U8Playlist * playlist); -- 2.7.4