From fdf99f678690a432421b973c879fc7f7d8603e9d Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 4 Nov 2020 10:36:21 +0100 Subject: [PATCH] m3u8: Make a debug function usable elsewhere The rest of the code might want to use this Change-Id: Ica617d702a452e785fb1de16e910a3afcb56232d Part-of: --- ext/hls/m3u8.c | 6 ++++++ ext/hls/m3u8.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c index 55ca85e..af91a08 100644 --- a/ext/hls/m3u8.c +++ b/ext/hls/m3u8.c @@ -1321,9 +1321,15 @@ gst_m3u8_get_hls_media_type_from_string (const gchar * type_name) return GST_HLS_MEDIA_TYPE_INVALID; } +#ifdef TIZEN_FEATURE_UPSTREAM +#define GST_HLS_MEDIA_TYPE_NAME(mtype) gst_hls_media_type_get_name(mtype) +const gchar * +gst_hls_media_type_get_name (GstHLSMediaType mtype) +#else #define GST_HLS_MEDIA_TYPE_NAME(mtype) gst_m3u8_hls_media_type_get_nick(mtype) static inline const gchar * gst_m3u8_hls_media_type_get_nick (GstHLSMediaType mtype) +#endif { static const gchar *nicks[GST_HLS_N_MEDIA_TYPES] = { "audio", "video", "subtitle", "closed-captions" diff --git a/ext/hls/m3u8.h b/ext/hls/m3u8.h index 5e3d58f..749aa45 100644 --- a/ext/hls/m3u8.h +++ b/ext/hls/m3u8.h @@ -198,6 +198,9 @@ GstHLSMedia * gst_hls_media_ref (GstHLSMedia * media); void gst_hls_media_unref (GstHLSMedia * media); +#ifdef TIZEN_FEATURE_UPSTREAM +const gchar * gst_hls_media_type_get_name (GstHLSMediaType mtype); +#endif struct _GstHLSVariantStream { gchar *name; /* This will be the "name" of the playlist, the original -- 2.7.4