1 /* GStreamer 2 * Copyright (C) 2011 Andoni Morales Alastruey <ylatuya@gmail.com> 3 * 4 * gstm3u8playlist.h: 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Library General Public 8 * License as published by the Free Software Foundation; either 9 * version 2 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Library General Public License for more details. 15 * 16 * You should have received a copy of the GNU Library General Public 17 * License along with this library; if not, write to the 18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 19 * Boston, MA 02110-1301, USA. 20 */ 21 22 #ifndef __GST_M3U8_PLAYLIST_H__ 23 #define __GST_M3U8_PLAYLIST_H__ 24 25 #include <glib.h> 26 27 G_BEGIN_DECLS 28 29 typedef struct _GstM3U8Playlist GstM3U8Playlist; 30 31 struct _GstM3U8Playlist 32 { 33 guint version; 34 gint window_size; 35 gint type; 36 gboolean end_list; 37 guint sequence_number; 38 39 /*< Private >*/ 40 GQueue *entries; 41 }; 42 43 typedef enum 44 { 45 GST_M3U8_PLAYLIST_RENDER_INIT = (1 << 0), 46 GST_M3U8_PLAYLIST_RENDER_STARTED = (1 << 1), 47 GST_M3U8_PLAYLIST_RENDER_ENDED = (1 << 2), 48 } GstM3U8PlaylistRenderState; 49 50 51 GstM3U8Playlist * gst_m3u8_playlist_new (guint version, 52 guint window_size); 53 54 void gst_m3u8_playlist_free (GstM3U8Playlist * playlist); 55 56 gboolean gst_m3u8_playlist_add_entry (GstM3U8Playlist * playlist, 57 const gchar * url, 58 const gchar * title, 59 gfloat duration, 60 guint index, 61 gboolean discontinuous); 62 63 gchar * gst_m3u8_playlist_render (GstM3U8Playlist * playlist); 64 65 G_END_DECLS 66 67 #endif /* __M3U8_H__ */ 68