mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
mpdhelper: remove useless code
The audio/video codec name from mime type should be retrieved from gst_codec_utils_caps_get_mime_codec instead Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5404>
This commit is contained in:
parent
82a06a36cc
commit
80cc1fcc03
3 changed files with 1 additions and 58 deletions
|
@ -33,10 +33,8 @@
|
|||
#define gst_mpd_descriptor_type_node_get_type gst_mpd_descriptor_type_node2_get_type
|
||||
#define gst_mpd_descriptor_type_node_new gst_mpd_descriptor_type_node2_new
|
||||
#define gst_mpd_helper_combine_urls gst_mpd_helper2_combine_urls
|
||||
#define gst_mpd_helper_get_audio_codec_from_mime gst_mpd_helper2_get_audio_codec_from_mime
|
||||
#define gst_mpd_helper_get_mpd_type gst_mpd_helper2_get_mpd_type
|
||||
#define gst_mpd_helper_get_SAP_type gst_mpd_helper2_get_SAP_type
|
||||
#define gst_mpd_helper_get_video_codec_from_mime gst_mpd_helper2_get_video_codec_from_mime
|
||||
#define gst_mpd_helper_mimetype_to_caps gst_mpd_helper2_mimetype_to_caps
|
||||
#define gst_mpd_helper_strncmp_ext gst_mpd_helper2_strncmp_ext
|
||||
#define gst_mpd_location_node_free gst_mpd_location_node2_free
|
||||
|
|
|
@ -82,60 +82,6 @@ gst_mpd_helper_get_SAP_type (xmlNode * a_node,
|
|||
return exists;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
gst_mpd_helper_get_audio_codec_from_mime (GstCaps * caps)
|
||||
{
|
||||
GstStructure *s;
|
||||
const gchar *name = "";
|
||||
const gchar *codec_name = NULL;
|
||||
|
||||
if (!caps)
|
||||
return NULL;
|
||||
s = gst_caps_get_structure (caps, 0);
|
||||
if (!s)
|
||||
goto done;
|
||||
name = gst_structure_get_name (s);
|
||||
if (!g_strcmp0 (name, "audio/mpeg")) {
|
||||
gint mpeg_version;
|
||||
if (gst_structure_get_int (s, "mpegversion", &mpeg_version)) {
|
||||
if (mpeg_version == 4)
|
||||
return "mp4a";
|
||||
}
|
||||
|
||||
} else {
|
||||
GST_DEBUG ("No codecs for this caps name %s", name);
|
||||
}
|
||||
|
||||
done:
|
||||
return codec_name;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
gst_mpd_helper_get_video_codec_from_mime (GstCaps * caps)
|
||||
{
|
||||
GstStructure *s;
|
||||
const gchar *name = "";
|
||||
const gchar *codec_name = NULL;
|
||||
|
||||
if (!caps)
|
||||
return NULL;
|
||||
|
||||
s = gst_caps_get_structure (caps, 0);
|
||||
if (!s)
|
||||
goto done;
|
||||
name = gst_structure_get_name (s);
|
||||
if (!g_strcmp0 (name, "video/x-h264")) {
|
||||
return "avc1";
|
||||
} else if (!g_strcmp0 (name, "video/x-h265")) {
|
||||
return "hvc1";
|
||||
} else {
|
||||
GST_DEBUG ("No codecs for this caps name %s", name);
|
||||
}
|
||||
|
||||
done:
|
||||
return codec_name;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
gst_mpd_helper_mimetype_to_caps (const gchar * mimeType)
|
||||
{
|
||||
|
|
|
@ -63,8 +63,7 @@ gboolean gst_mpd_helper_get_SAP_type (xmlNode * a_node, const gchar * property_n
|
|||
|
||||
const gchar * gst_mpd_helper_mimetype_to_caps (const gchar * mimeType);
|
||||
GstCaps *gst_mpd_helper_mimetype_to_codec_caps (const gchar * mimeType);
|
||||
const gchar * gst_mpd_helper_get_video_codec_from_mime (GstCaps * caps);
|
||||
const gchar * gst_mpd_helper_get_audio_codec_from_mime (GstCaps * caps);
|
||||
|
||||
GstUri *gst_mpd_helper_combine_urls (GstUri * base, GList * list, gchar ** query, guint idx);
|
||||
int gst_mpd_helper_strncmp_ext (const char *s1, const char *s2);
|
||||
|
||||
|
|
Loading…
Reference in a new issue