hlssink(2): Don't write deprecated EXT-X-ALLOW-CACHE metadata
authorSebastian Dröge <sebastian@centricular.com>
Thu, 6 May 2021 07:46:15 +0000 (10:46 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 6 May 2021 07:46:15 +0000 (10:46 +0300)
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2221>

ext/hls/gsthlssink.c
ext/hls/gsthlssink2.c
ext/hls/gstm3u8playlist.c
ext/hls/gstm3u8playlist.h

index a5f2f5e..72afe03 100644 (file)
@@ -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;
 }
index 7b5cdfa..a2c2865 100644 (file)
@@ -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);
index f2f1a5e..8da9004 100644 (file)
@@ -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);
 
index aae4499..016368e 100644 (file)
@@ -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);