}
if (strcmp (caps_name, "video/x-wmv") == 0) {
- guint32 fourcc;
+ gint wmvversion;
+ const gchar *fstr;
videopad->vidinfo.bit_cnt = 24;
- /* in case we have a fourcc, we use it */
- if (gst_structure_get_uint (structure, "format", &fourcc)) {
- videopad->vidinfo.compression = fourcc;
- } else {
- gint version;
- if (!gst_structure_get_int (structure, "wmvversion", &version))
- goto refuse_caps;
- if (version == 2) {
+ /* in case we have a format, we use it */
+ fstr = gst_structure_get_string (structure, "format");
+ if (fstr && strlen (fstr) == 4) {
+ videopad->vidinfo.compression = GST_STR_FOURCC (fstr);
+ } else if (gst_structure_get_int (structure, "wmvversion", &wmvversion)) {
+ if (wmvversion == 2) {
videopad->vidinfo.compression = GST_MAKE_FOURCC ('W', 'M', 'V', '2');
- } else if (version == 1) {
+ } else if (wmvversion == 1) {
videopad->vidinfo.compression = GST_MAKE_FOURCC ('W', 'M', 'V', '1');
- } else if (version == 3) {
+ } else if (wmvversion == 3) {
videopad->vidinfo.compression = GST_MAKE_FOURCC ('W', 'M', 'V', '3');
- } else {
- goto refuse_caps;
}
- }
+ } else
+ goto refuse_caps;
} else {
goto refuse_caps;
}
{"dshowvdec_wmv3", "Windows Media Video 9",
GST_MAKE_FOURCC ('W', 'M', 'V', '3'),
GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_WMVV3,
- "video/x-wmv, wmvversion = (int) 3, " "format = (fourcc) WMV3",
+ "video/x-wmv, wmvversion = (int) 3, " "format = (string) WMV3",
GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
"video/x-raw-yuv, format=(fourcc)YUY2",
preferred_wmv_filters},
{"dshowvdec_wmvp", "Windows Media Video 9 Image",
GST_MAKE_FOURCC ('W', 'M', 'V', 'P'),
GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_WMVP,
- "video/x-wmv, wmvversion = (int) 3, " "format = (fourcc) { WMVP, MSS1 }",
+ "video/x-wmv, wmvversion = (int) 3, " "format = (string) { WMVP, MSS1 }",
GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
"video/x-raw-yuv, format=(fourcc)YUY2",
preferred_wmv_filters},
{"dshowvdec_wmva", "Windows Media Video 9 Advanced",
GST_MAKE_FOURCC ('W', 'M', 'V', 'A'),
GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_WMVA,
- "video/x-wmv, wmvversion = (int) 3, " "format = (fourcc) WMVA",
+ "video/x-wmv, wmvversion = (int) 3, " "format = (string) WMVA",
GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
"video/x-raw-yuv, format=(fourcc)YUY2",
preferred_wmv_filters},
{"dshowvdec_wvc1", "Windows Media VC1 video",
GST_MAKE_FOURCC ('W', 'V', 'C', '1'),
GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_WVC1,
- "video/x-wmv, wmvversion = (int) 3, " "format = (fourcc) WVC1",
+ "video/x-wmv, wmvversion = (int) 3, " "format = (string) WVC1",
GUID_MEDIATYPE_VIDEO, GUID_MEDIASUBTYPE_YUY2,
"video/x-raw-yuv, format=(fourcc)YUY2",
preferred_wmv_filters},