From da682fc1304e481c490e771df77e082e3042f0c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 30 Aug 2015 17:22:19 +0100 Subject: [PATCH] hlsdemux: m3u8: clean-up: reindent header for better readability And remove duplicate define. --- ext/hls/m3u8.h | 83 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 55 insertions(+), 28 deletions(-) diff --git a/ext/hls/m3u8.h b/ext/hls/m3u8.h index 7b09de165c..b9f0d5658a 100644 --- a/ext/hls/m3u8.h +++ b/ext/hls/m3u8.h @@ -25,7 +25,9 @@ #include -G_BEGIN_DECLS typedef struct _GstM3U8 GstM3U8; +G_BEGIN_DECLS + +typedef struct _GstM3U8 GstM3U8; typedef struct _GstM3U8MediaFile GstM3U8MediaFile; typedef struct _GstM3U8Client GstM3U8Client; @@ -36,11 +38,6 @@ typedef struct _GstM3U8Client GstM3U8Client; #define GST_M3U8_CLIENT_UNLOCK(c) g_mutex_unlock (&c->lock); #define GST_M3U8_CLIENT_IS_LIVE(c) ((!(c)->current || (c)->current->endlist) ? FALSE : TRUE) -/* hlsdemux must not get closer to the end of a live stream than - GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE fragments. Section 6.3.3 - "Playing the Playlist file" of the HLS draft states that this - value is three fragments */ -#define GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE 3 /* hlsdemux must not get closer to the end of a live stream than GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE fragments. Section 6.3.3 @@ -107,30 +104,60 @@ struct _GstM3U8Client }; -GstM3U8Client *gst_m3u8_client_new (const gchar * uri, const gchar * base_uri); -void gst_m3u8_client_free (GstM3U8Client * client); -gboolean gst_m3u8_client_update (GstM3U8Client * client, gchar * data); -gboolean gst_m3u8_client_update_variant_playlist (GstM3U8Client * client, gchar * data, const gchar * uri, const gchar * base_uri); -void gst_m3u8_client_set_current (GstM3U8Client * client, GstM3U8 * m3u8); -gboolean gst_m3u8_client_get_next_fragment (GstM3U8Client * client, - gboolean * discontinuity, gchar ** uri, GstClockTime * duration, - GstClockTime * timestamp, gint64 * range_start, gint64 * range_end, - gchar ** key, guint8 ** iv, gboolean forward); -gboolean gst_m3u8_client_has_next_fragment (GstM3U8Client * client, gboolean forward); -void gst_m3u8_client_advance_fragment (GstM3U8Client * client, gboolean forward); -GstClockTime gst_m3u8_client_get_duration (GstM3U8Client * client); -GstClockTime gst_m3u8_client_get_target_duration (GstM3U8Client * client); -gchar *gst_m3u8_client_get_uri(GstM3U8Client * client); -gchar *gst_m3u8_client_get_current_uri(GstM3U8Client * client); -gboolean gst_m3u8_client_has_main(GstM3U8Client * client); -gboolean gst_m3u8_client_has_variant_playlist(GstM3U8Client * client); -gboolean gst_m3u8_client_is_live(GstM3U8Client * client); -GList * gst_m3u8_client_get_playlist_for_bitrate (GstM3U8Client * client, - guint bitrate); +GstM3U8Client * gst_m3u8_client_new (const gchar * uri, const gchar * base_uri); -guint64 gst_m3u8_client_get_current_fragment_duration (GstM3U8Client * client); +void gst_m3u8_client_free (GstM3U8Client * client); -gboolean gst_m3u8_client_get_seek_range(GstM3U8Client * client, gint64 * start, gint64 * stop); +gboolean gst_m3u8_client_update (GstM3U8Client * client, gchar * data); + +gboolean gst_m3u8_client_update_variant_playlist (GstM3U8Client * client, + gchar * data, + const gchar * uri, + const gchar * base_uri); + +void gst_m3u8_client_set_current (GstM3U8Client * client, + GstM3U8 * m3u8); + +gboolean gst_m3u8_client_get_next_fragment (GstM3U8Client * client, + gboolean * discontinuity, + gchar ** uri, + GstClockTime * duration, + GstClockTime * timestamp, + gint64 * range_start, + gint64 * range_end, + gchar ** key, + guint8 ** iv, + gboolean forward); + +gboolean gst_m3u8_client_has_next_fragment (GstM3U8Client * client, + gboolean forward); + +void gst_m3u8_client_advance_fragment (GstM3U8Client * client, + gboolean forward); + +GstClockTime gst_m3u8_client_get_duration (GstM3U8Client * client); + +GstClockTime gst_m3u8_client_get_target_duration (GstM3U8Client * client); + +gchar * gst_m3u8_client_get_uri (GstM3U8Client * client); + +gchar * gst_m3u8_client_get_current_uri (GstM3U8Client * client); + +gboolean gst_m3u8_client_has_main (GstM3U8Client * client); + +gboolean gst_m3u8_client_has_variant_playlist (GstM3U8Client * client); + +gboolean gst_m3u8_client_is_live (GstM3U8Client * client); + +GList * gst_m3u8_client_get_playlist_for_bitrate (GstM3U8Client * client, + guint bitrate); + +guint64 gst_m3u8_client_get_current_fragment_duration (GstM3U8Client * client); + +gboolean gst_m3u8_client_get_seek_range (GstM3U8Client * client, + gint64 * start, + gint64 * stop); G_END_DECLS + #endif /* __M3U8_H__ */