hlssink: m3u8 add EXT-X-ALLOW-CACHE
authorVictor Gottardi <vgottardi@hotmail.com>
Tue, 6 Nov 2012 15:17:19 +0000 (10:17 -0500)
committerTim-Philipp Müller <tim@centricular.net>
Sun, 6 Jan 2013 22:53:11 +0000 (22:53 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=689822

gst/hls/gstm3u8playlist.c

index 88a7d0fcf337a46543d7fd86db36474a2b7b1ee6..be55636a210fe4f314bbcd4cff53e23bb4b2e99a 100644 (file)
@@ -28,6 +28,7 @@
 
 #define M3U8_HEADER_TAG "#EXTM3U\n"
 #define M3U8_VERSION_TAG "#EXT-X-VERSION:%d\n"
+#define M3U8_ALLOW_CACHE_TAG "#EXT-X-ALLOW-CACHE:%s\n"
 #define M3U8_TARGETDURATION_TAG "#EXT-X-TARGETDURATION:%d\n"
 #define M3U8_MEDIA_SEQUENCE_TAG "#EXT-X-MEDIA-SEQUENCE:%d\n"
 #define M3U8_DISCONTINUITY_TAG "#EXT-X-DISCONTINUITY\n"
@@ -189,6 +190,9 @@ gst_m3u8_playlist_render (GstM3U8Playlist * playlist)
   /* #EXT-X-VERSION */
 //  g_string_append_printf (playlist->playlist_str, M3U8_VERSION_TAG,
 //      playlist->version);
+  /* #EXT-X-ALLOW_CACHE */
+  g_string_append_printf (playlist->playlist_str, M3U8_ALLOW_CACHE_TAG,
+      playlist->allow_cache ? "YES" : "NO");
   /* #EXT-X-MEDIA-SEQUENCE */
   g_string_append_printf (playlist->playlist_str, M3U8_MEDIA_SEQUENCE_TAG,
       playlist->sequence_number - playlist->entries->length);