diff options
author | Thiago Santos <thiagoss@embedded.ufcg.edu.br> | 2009-07-29 18:44:11 -0300 |
---|---|---|
committer | Thiago Santos <thiagoss@embedded.ufcg.edu.br> | 2009-07-30 10:33:03 -0300 |
commit | 7dd441f8f506145d5f66efd670731f9d9d70844e (patch) | |
tree | 94c34f6da7e9d2c19627028693dc46a9c74b5a42 /gst/asfmux | |
parent | 0672f2d9b2e8511dfdd9a975e139a306d891ed9e (diff) | |
download | gst-plugins-bad-7dd441f8f506145d5f66efd670731f9d9d70844e.tar.gz gst-plugins-bad-7dd441f8f506145d5f66efd670731f9d9d70844e.tar.bz2 gst-plugins-bad-7dd441f8f506145d5f66efd670731f9d9d70844e.zip |
asfmux: adds support to vc-1 streams
Diffstat (limited to 'gst/asfmux')
-rw-r--r-- | gst/asfmux/gstasfmux.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/gst/asfmux/gstasfmux.c b/gst/asfmux/gstasfmux.c index 0d640f04..5d42d4a7 100644 --- a/gst/asfmux/gstasfmux.c +++ b/gst/asfmux/gstasfmux.c @@ -2052,20 +2052,26 @@ gst_asf_mux_video_set_caps (GstPad * pad, GstCaps * caps) } if (strcmp (caps_name, "video/x-wmv") == 0) { - gint version; - - if (!gst_structure_get_int (structure, "wmvversion", &version)) - goto refuse_caps; + guint32 fourcc; - videopad->vidinfo.bit_cnt = 24; - if (version == 2) { - videopad->vidinfo.compression = GST_MAKE_FOURCC ('W', 'M', 'V', '2'); - } else if (version == 1) { - videopad->vidinfo.compression = GST_MAKE_FOURCC ('W', 'M', 'V', '1'); - } else if (version == 3) { - videopad->vidinfo.compression = GST_MAKE_FOURCC ('W', 'M', 'V', '3'); + /* in case we have a fourcc, we use it */ + if (gst_structure_get_fourcc (structure, "format", &fourcc)) { + videopad->vidinfo.compression = fourcc; } else { - goto refuse_caps; + gint version; + if (!gst_structure_get_int (structure, "wmvversion", &version)) + goto refuse_caps; + + videopad->vidinfo.bit_cnt = 24; + if (version == 2) { + videopad->vidinfo.compression = GST_MAKE_FOURCC ('W', 'M', 'V', '2'); + } else if (version == 1) { + videopad->vidinfo.compression = GST_MAKE_FOURCC ('W', 'M', 'V', '1'); + } else if (version == 3) { + videopad->vidinfo.compression = GST_MAKE_FOURCC ('W', 'M', 'V', '3'); + } else { + goto refuse_caps; + } } } else { goto refuse_caps; |