m3u8: Make a debug function usable elsewhere

The rest of the code might want to use this

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1757>
This commit is contained in:
Edward Hervey 2020-11-04 10:36:21 +01:00 committed by GStreamer Merge Bot
parent 3a554f6d62
commit f1fdbfc5bd
2 changed files with 5 additions and 3 deletions

View file

@ -1300,9 +1300,9 @@ gst_m3u8_get_hls_media_type_from_string (const gchar * type_name)
return GST_HLS_MEDIA_TYPE_INVALID;
}
#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)
#define GST_HLS_MEDIA_TYPE_NAME(mtype) gst_hls_media_type_get_name(mtype)
const gchar *
gst_hls_media_type_get_name (GstHLSMediaType mtype)
{
static const gchar *nicks[GST_HLS_N_MEDIA_TYPES] = { "audio", "video",
"subtitle", "closed-captions"

View file

@ -176,6 +176,8 @@ GstHLSMedia * gst_hls_media_ref (GstHLSMedia * media);
void gst_hls_media_unref (GstHLSMedia * media);
const gchar * gst_hls_media_type_get_name (GstHLSMediaType mtype);
struct _GstHLSVariantStream {
gchar *name; /* This will be the "name" of the playlist, the original