m3u8: Make a debug function usable elsewhere 21/262821/1
authorEdward Hervey <edward@centricular.com>
Wed, 4 Nov 2020 09:36:21 +0000 (10:36 +0100)
committerGilbok Lee <gilbok.lee@samsung.com>
Fri, 20 Aug 2021 06:42:36 +0000 (15:42 +0900)
The rest of the code might want to use this

Change-Id: Ica617d702a452e785fb1de16e910a3afcb56232d
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1757>

ext/hls/m3u8.c
ext/hls/m3u8.h

index 55ca85e..af91a08 100644 (file)
@@ -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"
index 5e3d58f..749aa45 100644 (file)
@@ -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