mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
mssmanifest: add support for VC-1 and WmaPro formats parsing
VC-1 should map to WMV3 and WmaPro to WMA2
This commit is contained in:
parent
3f2409f7e2
commit
4293cfa763
1 changed files with 16 additions and 0 deletions
|
@ -239,6 +239,9 @@ _gst_mss_stream_video_caps_from_fourcc (gchar * fourcc)
|
|||
if (strcmp (fourcc, "H264") == 0) {
|
||||
return gst_caps_new_simple ("video/x-h264", "stream-format", G_TYPE_STRING,
|
||||
"avc", NULL);
|
||||
} else if (strcmp (fourcc, "WVC1") == 0) {
|
||||
return gst_caps_new_simple ("video/x-wmv", "wmvversion", G_TYPE_INT, 3,
|
||||
NULL);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -252,6 +255,9 @@ _gst_mss_stream_audio_caps_from_fourcc (gchar * fourcc)
|
|||
if (strcmp (fourcc, "AACL") == 0) {
|
||||
return gst_caps_new_simple ("audio/mpeg", "mpegversion", G_TYPE_INT, 4,
|
||||
NULL);
|
||||
} else if (strcmp (fourcc, "WmaPro") == 0) {
|
||||
return gst_caps_new_simple ("audio/x-wma", "wmaversion", G_TYPE_INT, 2,
|
||||
NULL);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -372,6 +378,11 @@ _gst_mss_stream_video_caps_from_qualitylevel_xml (xmlNodePtr node)
|
|||
gchar *codec_data =
|
||||
(gchar *) xmlGetProp (node, (xmlChar *) "CodecPrivateData");
|
||||
|
||||
if (!max_width)
|
||||
max_width = (gchar *) xmlGetProp (node, (xmlChar *) "Width");
|
||||
if (!max_height)
|
||||
max_height = (gchar *) xmlGetProp (node, (xmlChar *) "Height");
|
||||
|
||||
caps = _gst_mss_stream_video_caps_from_fourcc (fourcc);
|
||||
if (!caps)
|
||||
goto end;
|
||||
|
@ -415,6 +426,11 @@ _gst_mss_stream_audio_caps_from_qualitylevel_xml (xmlNodePtr node)
|
|||
gchar *codec_data =
|
||||
(gchar *) xmlGetProp (node, (xmlChar *) "CodecPrivateData");
|
||||
|
||||
if (!fourcc) /* sometimes the fourcc is omitted, we fallback to the Subtype in the StreamIndex node */
|
||||
fourcc = (gchar *) xmlGetProp (node->parent, (xmlChar *) "Subtype");
|
||||
if (!codec_data)
|
||||
codec_data = (gchar *) xmlGetProp (node, (xmlChar *) "WaveFormatEx");
|
||||
|
||||
caps = _gst_mss_stream_audio_caps_from_fourcc (fourcc);
|
||||
if (!caps)
|
||||
goto end;
|
||||
|
|
Loading…
Reference in a new issue