summaryrefslogtreecommitdiffstats
path: root/gst/matroska
diff options
context:
space:
mode:
authorThiago Santos <thiagoss@embedded.ufcg.edu.br>2009-08-06 20:15:17 -0300
committerThiago Santos <thiagoss@embedded.ufcg.edu.br>2009-08-09 20:34:04 -0300
commitdf442b47272295a2f5ec3e41023d5a0cf1b9c7a0 (patch)
tree13efc6b88a03b4c375b4b24bb8f47b16bbe271f4 /gst/matroska
parent8c8e6af45badae969278c35da114ded6ce0ef0f7 (diff)
matroskamux: adds support for wmv family
Adds support to WMV1, WMV2, WMV3 and other family formats that are signaled by the 'format' field in the caps (i.e. WVC1). Partially fixes #576378
Diffstat (limited to 'gst/matroska')
-rw-r--r--gst/matroska/matroska-mux.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c
index 421dcd50..a40cea32 100644
--- a/gst/matroska/matroska-mux.c
+++ b/gst/matroska/matroska-mux.c
@@ -115,7 +115,8 @@ static GstStaticPadTemplate videosink_templ =
COMMON_VIDEO_CAPS "; "
"video/x-raw-yuv, "
"format = (fourcc) { YUY2, I420, YV12, UYVY, AYUV }, "
- COMMON_VIDEO_CAPS)
+ COMMON_VIDEO_CAPS "; "
+ "video/x-wmv, " "wmvversion = (int) [ 1, 3 ], " COMMON_VIDEO_CAPS)
);
#define COMMON_AUDIO_CAPS \
@@ -710,7 +711,8 @@ skip_details:
|| !strcmp (mimetype, "video/x-divx")
|| !strcmp (mimetype, "video/x-dv")
|| !strcmp (mimetype, "video/x-h263")
- || !strcmp (mimetype, "video/x-msmpeg")) {
+ || !strcmp (mimetype, "video/x-msmpeg")
+ || !strcmp (mimetype, "video/x-wmv")) {
BITMAPINFOHEADER *bih;
gint size = sizeof (BITMAPINFOHEADER);
guint32 fourcc = 0;
@@ -753,6 +755,22 @@ skip_details:
goto msmpeg43;
break;
}
+ } else if (!strcmp (mimetype, "video/x-wmv")) {
+ gint wmvversion;
+ guint32 format;
+ GST_WARNING_OBJECT (mux, "WMV");
+ if (gst_structure_get_fourcc (structure, "format", &format)) {
+ fourcc = format;
+ } else if (gst_structure_get_int (structure, "wmvversion", &wmvversion)) {
+ if (wmvversion == 2) {
+ fourcc = GST_MAKE_FOURCC ('W', 'M', 'V', '2');
+ } else if (wmvversion == 1) {
+ fourcc = GST_MAKE_FOURCC ('W', 'M', 'V', '1');
+ } else if (wmvversion == 3) {
+ fourcc = GST_MAKE_FOURCC ('W', 'M', 'V', '3');
+ }
+ }
+ GST_WARNING_OBJECT (mux, "fourcc=%u", fourcc);
}
if (!fourcc)