summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/riff
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2004-04-11 17:21:32 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2004-04-11 17:21:32 +0000
commit40203b6472b1a3e5d1bfd348f1824429ed6132a9 (patch)
tree28f4473948fc39acbc105ca967c99d75da5938d7 /gst-libs/gst/riff
parentad0f3192360a62ff79d6f8ed32bceb26b23c7089 (diff)
downloadgst-plugins-bad-40203b6472b1a3e5d1bfd348f1824429ed6132a9.tar.gz
gst-plugins-bad-40203b6472b1a3e5d1bfd348f1824429ed6132a9.tar.bz2
gst-plugins-bad-40203b6472b1a3e5d1bfd348f1824429ed6132a9.zip
gst-libs/gst/riff/riff-media.c: Fix divx caps mismatch and move from video/x-jpeg to image/jpeg so that MJPEG plays b...
Original commit message from CVS: * gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps): Fix divx caps mismatch and move from video/x-jpeg to image/jpeg so that MJPEG plays back.
Diffstat (limited to 'gst-libs/gst/riff')
-rw-r--r--gst-libs/gst/riff/riff-media.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c
index cf96d5a5..cbefac2d 100644
--- a/gst-libs/gst/riff/riff-media.c
+++ b/gst-libs/gst/riff/riff-media.c
@@ -37,31 +37,31 @@ gst_riff_create_video_caps (guint32 codec_fcc,
caps = gst_caps_new_simple ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC, codec_fcc, NULL);
if (codec_name)
- *codec_name = g_strdup ("Raw, uncompressed I420");
+ *codec_name = g_strdup ("Uncompressed planar YUV 4:2:0");
break;
case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
caps = gst_caps_new_simple ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC, codec_fcc, NULL);
if (codec_name)
- *codec_name = g_strdup ("Raw, uncompressed YUV 4:2:2");
+ *codec_name = g_strdup ("Uncompressed packed YUV 4:2:2");
break;
case GST_MAKE_FOURCC ('M', 'J', 'P', 'G'): /* YUY2 MJPEG */
- caps = gst_caps_new_simple ("video/x-jpeg", NULL);
+ caps = gst_caps_new_simple ("image/jpeg", NULL);
if (codec_name)
*codec_name = g_strdup ("Motion JPEG");
break;
case GST_MAKE_FOURCC ('J', 'P', 'E', 'G'): /* generic (mostly RGB) MJPEG */
- caps = gst_caps_new_simple ("video/x-jpeg", NULL);
+ caps = gst_caps_new_simple ("image/jpeg", NULL);
if (codec_name)
*codec_name = g_strdup ("JPEG Still Image");
break;
case GST_MAKE_FOURCC ('P', 'I', 'X', 'L'): /* Miro/Pinnacle fourccs */
case GST_MAKE_FOURCC ('V', 'I', 'X', 'L'): /* Miro/Pinnacle fourccs */
- caps = gst_caps_new_simple ("video/x-jpeg", NULL);
+ caps = gst_caps_new_simple ("image/jpeg", NULL);
if (codec_name)
- *codec_name = g_strdup ("Miro/Pinnacle Video XL");
+ *codec_name = g_strdup ("Miro/Pinnacle Motion JPEG Video");
break;
case GST_MAKE_FOURCC ('H', 'F', 'Y', 'U'):
@@ -116,21 +116,22 @@ gst_riff_create_video_caps (guint32 codec_fcc,
break;
case GST_MAKE_FOURCC ('D', 'I', 'V', '3'):
+ case GST_MAKE_FOURCC ('D', 'I', 'V', '4'):
+ case GST_MAKE_FOURCC ('D', 'I', 'V', '5'):
+ case GST_MAKE_FOURCC ('D', 'I', 'V', '6'):
caps = gst_caps_new_simple ("video/x-divx",
"divxversion", G_TYPE_INT, 3, NULL);
if (codec_name)
- *codec_name = g_strdup ("DivX MPEG-4 Version 3");
+ *codec_name = g_strdup ("DivX MS-MPEG-4 Version 3");
break;
- case GST_MAKE_FOURCC ('D', 'I', 'V', '4'):
+ case GST_MAKE_FOURCC ('d', 'i', 'v', 'x'):
+ case GST_MAKE_FOURCC ('D', 'I', 'V', 'X'):
caps = gst_caps_new_simple ("video/x-divx",
- "divxversion", G_TYPE_INT, 4, NULL);
+ "divxversion", G_TYPE_INT, 3, NULL);
if (codec_name)
*codec_name = g_strdup ("DivX MPEG-4 Version 4");
break;
- case GST_MAKE_FOURCC ('d', 'i', 'v', 'x'):
- case GST_MAKE_FOURCC ('D', 'I', 'V', 'X'):
case GST_MAKE_FOURCC ('D', 'X', '5', '0'):
- case GST_MAKE_FOURCC ('D', 'I', 'V', '5'):
caps = gst_caps_new_simple ("video/x-divx",
"divxversion", G_TYPE_INT, 5, NULL);
if (codec_name)
@@ -214,7 +215,7 @@ gst_riff_create_video_caps (guint32 codec_fcc,
}
if (strh != NULL) {
- gfloat fps = 1. * strh->rate / strh->scale;
+ gdouble fps = 1. * strh->rate / strh->scale;
gst_caps_set_simple (caps, "framerate", G_TYPE_DOUBLE, fps, NULL);
} else {