From: Edward Hervey Date: Wed, 4 Nov 2020 09:36:21 +0000 (+0100) Subject: m3u8: Make a debug function usable elsewhere X-Git-Tag: submit/tizen/20210823.074442~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fdf99f678690a432421b973c879fc7f7d8603e9d;p=platform%2Fupstream%2Fgst-plugins-bad.git m3u8: Make a debug function usable elsewhere The rest of the code might want to use this Change-Id: Ica617d702a452e785fb1de16e910a3afcb56232d Part-of: --- diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c index 55ca85e5e..af91a084f 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 5e3d58ffc..749aa451b 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