Commit a5bfaf8a authored by Heekyoung Seo's avatar Heekyoung Seo Committed by Sebastian Dröge

qtdemux: Enable xvid/mp2 codec support

Add support for xvid video and mp2 audio, add m2v1 fourcc.

https://bugzilla.gnome.org/show_bug.cgi?id=775794
parent 63938ef7
......@@ -64,6 +64,7 @@ G_BEGIN_DECLS
#define FOURCC_VP80 GST_MAKE_FOURCC('V','P','8','0')
#define FOURCC_WRLE GST_MAKE_FOURCC('W','R','L','E')
#define FOURCC_XMP_ GST_MAKE_FOURCC('X','M','P','_')
#define FOURCC_XVID GST_MAKE_FOURCC('X','V','I','D')
#define FOURCC__ART GST_MAKE_FOURCC(0xa9,'A','R','T')
#define FOURCC_____ GST_MAKE_FOURCC('-','-','-','-')
#define FOURCC___in GST_MAKE_FOURCC(' ',' ','i','n')
......@@ -243,6 +244,7 @@ G_BEGIN_DECLS
#define FOURCC_vc_1 GST_MAKE_FOURCC('v','c','-','1')
#define FOURCC_vide GST_MAKE_FOURCC('v','i','d','e')
#define FOURCC_vmhd GST_MAKE_FOURCC('v','m','h','d')
#define FOURCC_xvid GST_MAKE_FOURCC('x','v','i','d')
#define FOURCC_wave GST_MAKE_FOURCC('w','a','v','e')
#define FOURCC_wide GST_MAKE_FOURCC('w','i','d','e')
#define FOURCC_zlib GST_MAKE_FOURCC('z','l','i','b')
......
......@@ -7225,6 +7225,8 @@ qtdemux_parse_node (GstQTDemux * qtdemux, GNode * node, const guint8 * buffer,
case FOURCC_apcn:
case FOURCC_apco:
case FOURCC_ap4h:
case FOURCC_xvid:
case FOURCC_XVID:
{
const guint8 *buf;
guint32 version;
......@@ -10021,6 +10023,8 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
case FOURCC_MP4V:
case FOURCC_fmp4:
case FOURCC_FMP4:
case FOURCC_xvid:
case FOURCC_XVID:
{
GNode *glbl;
......@@ -13404,6 +13408,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
case GST_MAKE_FOURCC ('A', 'V', 'm', 'p'): /* AVID IMX PAL */
case GST_MAKE_FOURCC ('m', 'p', 'g', '2'): /* AVID IMX PAL */
case GST_MAKE_FOURCC ('m', 'p', '2', 'v'): /* AVID IMX PAL */
case GST_MAKE_FOURCC ('m', '2', 'v', '1'):
_codec ("MPEG-2 video");
caps = gst_caps_new_simple ("video/mpeg", "mpegversion", G_TYPE_INT, 2,
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
......@@ -13458,12 +13463,13 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
case GST_MAKE_FOURCC ('3', 'I', 'V', '1'):
case GST_MAKE_FOURCC ('3', 'I', 'V', '2'):
case GST_MAKE_FOURCC ('X', 'V', 'I', 'D'):
case GST_MAKE_FOURCC ('x', 'v', 'i', 'd'):
case FOURCC_XVID:
case FOURCC_xvid:
case FOURCC_FMP4:
case FOURCC_fmp4:
case GST_MAKE_FOURCC ('U', 'M', 'P', '4'):
caps = gst_caps_new_simple ("video/mpeg",
"mpegversion", G_TYPE_INT, 4, NULL);
caps = gst_caps_new_simple ("video/mpeg", "mpegversion", G_TYPE_INT, 4,
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
_codec ("MPEG-4");
break;
......@@ -13782,6 +13788,12 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
caps = gst_caps_new_simple ("audio/mpeg", "layer", G_TYPE_INT, 3,
"mpegversion", G_TYPE_INT, 1, NULL);
break;
case GST_MAKE_FOURCC ('.', 'm', 'p', '2'):
_codec ("MPEG-1 layer 2");
/* MPEG layer 2 */
caps = gst_caps_new_simple ("audio/mpeg", "layer", G_TYPE_INT, 2,
"mpegversion", G_TYPE_INT, 1, NULL);
break;
case 0x20736d:
case GST_MAKE_FOURCC ('e', 'c', '-', '3'):
_codec ("EAC-3 audio");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment