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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2221>
This commit is contained in:
Sebastian Dröge 2021-05-06 10:46:15 +03:00
parent 81ac09cfda
commit da0e6b0afc
4 changed files with 5 additions and 13 deletions

View 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;
}

View 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);

View 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);

View file

@ -31,7 +31,6 @@ typedef struct _GstM3U8Playlist GstM3U8Playlist;
struct _GstM3U8Playlist
{
guint version;
gboolean allow_cache;
gint window_size;
gint type;
gboolean end_list;
@ -50,8 +49,7 @@ typedef enum
GstM3U8Playlist * gst_m3u8_playlist_new (guint version,
guint window_size,
gboolean allow_cache);
guint window_size);
void gst_m3u8_playlist_free (GstM3U8Playlist * playlist);