summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis de Bethencourt <luisbg@osg.samsung.com>2015-11-19 19:28:20 +0000
committerLuis de Bethencourt <luisbg@osg.samsung.com>2015-11-19 19:28:25 +0000
commitca6d71ef2aac7a94bb6f0a84a0f3911af10ef65c (patch)
tree49a0f6d060d1f0f9c8a0cdb23b26df625a514425
parentca46897bf7b0a271a91d1a39b5e48b8787fa6c62 (diff)
qtdemux: remove duplicate FourCC
Use the available FourCCs in fourcc.h instead of duplicating them.
-rw-r--r--gst/isomp4/fourcc.h2
-rw-r--r--gst/isomp4/qtdemux.c106
2 files changed, 54 insertions, 54 deletions
diff --git a/gst/isomp4/fourcc.h b/gst/isomp4/fourcc.h
index b0e313095..d4a8e7833 100644
--- a/gst/isomp4/fourcc.h
+++ b/gst/isomp4/fourcc.h
@@ -165,7 +165,7 @@ G_BEGIN_DECLS
#define FOURCC_minf GST_MAKE_FOURCC('m','i','n','f')
#define FOURCC_moov GST_MAKE_FOURCC('m','o','o','v')
#define FOURCC_mp4a GST_MAKE_FOURCC('m','p','4','a')
-#define FOURCC_mp4s GST_MAKE_FOURCC('m','p','4','s')
+#define FOURCC_mp4s GST_MAKE_FOURCC('m','p','4','s')
#define FOURCC_mp4s GST_MAKE_FOURCC('m','p','4','s')
#define FOURCC_mp4v GST_MAKE_FOURCC('m','p','4','v')
#define FOURCC_name GST_MAKE_FOURCC('n','a','m','e')
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index 3c10f4eb0..ce24265d9 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -6315,7 +6315,7 @@ qtdemux_parse_moov (GstQTDemux * qtdemux, const guint8 * buffer, guint length)
method = QT_FOURCC ((guint8 *) dcom->data + 8);
switch (method) {
#ifdef HAVE_ZLIB
- case GST_MAKE_FOURCC ('z', 'l', 'i', 'b'):{
+ case FOURCC_zlib:{
guint uncompressed_length;
guint compressed_length;
guint8 *buf;
@@ -8293,7 +8293,7 @@ qtdemux_parse_amr_bitrate (GstBuffer * buf, gboolean wb)
goto bad_data;
}
- if (QT_FOURCC (map.data + 4) != GST_MAKE_FOURCC ('d', 'a', 'm', 'r')) {
+ if (QT_FOURCC (map.data + 4) != FOURCC_damr) {
GST_DEBUG ("Unknown atom in %" GST_FOURCC_FORMAT,
GST_FOURCC_ARGS (QT_UINT32 (map.data + 4)));
goto bad_data;
@@ -12097,7 +12097,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
_codec ("PNG still images");
caps = gst_caps_new_empty_simple ("image/png");
break;
- case GST_MAKE_FOURCC ('j', 'p', 'e', 'g'):
+ case FOURCC_jpeg:
_codec ("JPEG still images");
caps =
gst_caps_new_simple ("image/jpeg", "parsed", G_TYPE_BOOLEAN, TRUE,
@@ -12116,13 +12116,13 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
_codec ("Motion-JPEG format B");
caps = gst_caps_new_empty_simple ("video/x-mjpeg-b");
break;
- case GST_MAKE_FOURCC ('m', 'j', 'p', '2'):
+ case FOURCC_mjp2:
_codec ("JPEG-2000");
/* override to what it should be according to spec, avoid palette_data */
stream->bits_per_sample = 24;
caps = gst_caps_new_simple ("image/x-j2c", "fields", G_TYPE_INT, 1, NULL);
break;
- case GST_MAKE_FOURCC ('S', 'V', 'Q', '3'):
+ case FOURCC_SVQ3:
_codec ("Sorensen video v.3");
caps = gst_caps_new_simple ("video/x-svq",
"svqversion", G_TYPE_INT, 3, NULL);
@@ -12138,7 +12138,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
gst_caps_set_simple (caps, "format", G_TYPE_STRING, "RGB8P", NULL);
_codec ("Windows Raw RGB");
break;
- case GST_MAKE_FOURCC ('r', 'a', 'w', ' '):
+ case FOURCC_raw_:
{
guint16 bps;
@@ -12169,7 +12169,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
case GST_MAKE_FOURCC ('Y', 'u', 'v', '2'):
format = GST_VIDEO_FORMAT_I420;
break;
- case GST_MAKE_FOURCC ('2', 'v', 'u', 'y'):
+ case FOURCC_2vuy:
case GST_MAKE_FOURCC ('2', 'V', 'u', 'y'):
format = GST_VIDEO_FORMAT_UYVY;
break;
@@ -12179,7 +12179,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
case GST_MAKE_FOURCC ('v', '2', '1', '6'):
format = GST_VIDEO_FORMAT_v216;
break;
- case GST_MAKE_FOURCC ('v', '2', '1', '0'):
+ case FOURCC_v210:
format = GST_VIDEO_FORMAT_v210;
break;
case GST_MAKE_FOURCC ('r', '2', '1', '0'):
@@ -12256,17 +12256,17 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
_codec ("GIF still images");
caps = gst_caps_new_empty_simple ("image/gif");
break;
- case GST_MAKE_FOURCC ('h', '2', '6', '3'):
+ case FOURCC_h263:
case GST_MAKE_FOURCC ('H', '2', '6', '3'):
- case GST_MAKE_FOURCC ('s', '2', '6', '3'):
+ case FOURCC_s263:
case GST_MAKE_FOURCC ('U', '2', '6', '3'):
_codec ("H.263");
/* ffmpeg uses the height/width props, don't know why */
caps = gst_caps_new_simple ("video/x-h263",
"variant", G_TYPE_STRING, "itu", NULL);
break;
- case GST_MAKE_FOURCC ('m', 'p', '4', 'v'):
- case GST_MAKE_FOURCC ('M', 'P', '4', 'V'):
+ case FOURCC_mp4v:
+ case FOURCC_MP4V:
_codec ("MPEG-4 video");
caps = gst_caps_new_simple ("video/mpeg", "mpegversion", G_TYPE_INT, 4,
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
@@ -12304,7 +12304,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
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 GST_MAKE_FOURCC ('F', 'M', 'P', '4'):
+ case FOURCC_FMP4:
case GST_MAKE_FOURCC ('U', 'M', 'P', '4'):
caps = gst_caps_new_simple ("video/mpeg",
"mpegversion", G_TYPE_INT, 4, NULL);
@@ -12324,38 +12324,38 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
_codec ("Apple video");
caps = gst_caps_new_empty_simple ("video/x-apple-video");
break;
- case GST_MAKE_FOURCC ('H', '2', '6', '4'):
- case GST_MAKE_FOURCC ('a', 'v', 'c', '1'):
+ case FOURCC_H264:
+ case FOURCC_avc1:
_codec ("H.264 / AVC");
caps = gst_caps_new_simple ("video/x-h264",
"stream-format", G_TYPE_STRING, "avc",
"alignment", G_TYPE_STRING, "au", NULL);
break;
- case GST_MAKE_FOURCC ('a', 'v', 'c', '3'):
+ case FOURCC_avc3:
_codec ("H.264 / AVC");
caps = gst_caps_new_simple ("video/x-h264",
"stream-format", G_TYPE_STRING, "avc3",
"alignment", G_TYPE_STRING, "au", NULL);
break;
- case GST_MAKE_FOURCC ('H', '2', '6', '5'):
- case GST_MAKE_FOURCC ('h', 'v', 'c', '1'):
+ case FOURCC_H265:
+ case FOURCC_hvc1:
_codec ("H.265 / HEVC");
caps = gst_caps_new_simple ("video/x-h265",
"stream-format", G_TYPE_STRING, "hvc1",
"alignment", G_TYPE_STRING, "au", NULL);
break;
- case GST_MAKE_FOURCC ('h', 'e', 'v', '1'):
+ case FOURCC_hev1:
_codec ("H.265 / HEVC");
caps = gst_caps_new_simple ("video/x-h265",
"stream-format", G_TYPE_STRING, "hev1",
"alignment", G_TYPE_STRING, "au", NULL);
break;
- case GST_MAKE_FOURCC ('r', 'l', 'e', ' '):
+ case FOURCC_rle_:
_codec ("Run-length encoding");
caps = gst_caps_new_simple ("video/x-rle",
"layout", G_TYPE_STRING, "quicktime", NULL);
break;
- case GST_MAKE_FOURCC ('W', 'R', 'L', 'E'):
+ case FOURCC_WRLE:
_codec ("Run-length encoding");
caps = gst_caps_new_simple ("video/x-rle",
"layout", G_TYPE_STRING, "microsoft", NULL);
@@ -12372,8 +12372,8 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
caps = gst_caps_new_simple ("video/x-indeo",
"indeoversion", G_TYPE_INT, 4, NULL);
break;
- case GST_MAKE_FOURCC ('d', 'v', 'c', 'p'):
- case GST_MAKE_FOURCC ('d', 'v', 'c', ' '):
+ case FOURCC_dvcp:
+ case FOURCC_dvc_:
case GST_MAKE_FOURCC ('d', 'v', 's', 'd'):
case GST_MAKE_FOURCC ('D', 'V', 'S', 'D'):
case GST_MAKE_FOURCC ('d', 'v', 'c', 's'):
@@ -12384,8 +12384,8 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
caps = gst_caps_new_simple ("video/x-dv", "dvversion", G_TYPE_INT, 25,
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
break;
- case GST_MAKE_FOURCC ('d', 'v', '5', 'n'): /* DVCPRO50 NTSC */
- case GST_MAKE_FOURCC ('d', 'v', '5', 'p'): /* DVCPRO50 PAL */
+ case FOURCC_dv5n: /* DVCPRO50 NTSC */
+ case FOURCC_dv5p: /* DVCPRO50 PAL */
_codec ("DVCPro50 Video");
caps = gst_caps_new_simple ("video/x-dv", "dvversion", G_TYPE_INT, 50,
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
@@ -12408,14 +12408,14 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
_codec ("VP6 Flash");
caps = gst_caps_new_empty_simple ("video/x-vp6-flash");
break;
- case GST_MAKE_FOURCC ('X', 'i', 'T', 'h'):
+ case FOURCC_XiTh:
_codec ("Theora");
caps = gst_caps_new_empty_simple ("video/x-theora");
/* theora uses one byte of padding in the data stream because it does not
* allow 0 sized packets while theora does */
stream->padding = 1;
break;
- case GST_MAKE_FOURCC ('d', 'r', 'a', 'c'):
+ case FOURCC_drac:
_codec ("Dirac");
caps = gst_caps_new_empty_simple ("video/x-dirac");
break;
@@ -12431,35 +12431,35 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
_codec ("AVID DNxHD");
caps = gst_caps_from_string ("video/x-dnxhd");
break;
- case GST_MAKE_FOURCC ('V', 'P', '8', '0'):
+ case FOURCC_VP80:
_codec ("On2 VP8");
caps = gst_caps_from_string ("video/x-vp8");
break;
- case GST_MAKE_FOURCC ('a', 'p', 'c', 's'):
+ case FOURCC_apcs:
_codec ("Apple ProRes LT");
caps =
gst_caps_new_simple ("video/x-prores", "variant", G_TYPE_STRING, "lt",
NULL);
break;
- case GST_MAKE_FOURCC ('a', 'p', 'c', 'h'):
+ case FOURCC_apch:
_codec ("Apple ProRes HQ");
caps =
gst_caps_new_simple ("video/x-prores", "variant", G_TYPE_STRING, "hq",
NULL);
break;
- case GST_MAKE_FOURCC ('a', 'p', 'c', 'n'):
+ case FOURCC_apcn:
_codec ("Apple ProRes");
caps =
gst_caps_new_simple ("video/x-prores", "variant", G_TYPE_STRING,
"standard", NULL);
break;
- case GST_MAKE_FOURCC ('a', 'p', 'c', 'o'):
+ case FOURCC_apco:
_codec ("Apple ProRes Proxy");
caps =
gst_caps_new_simple ("video/x-prores", "variant", G_TYPE_STRING,
"proxy", NULL);
break;
- case GST_MAKE_FOURCC ('a', 'p', '4', 'h'):
+ case FOURCC_ap4h:
_codec ("Apple ProRes 4444");
caps =
gst_caps_new_simple ("video/x-prores", "variant", G_TYPE_STRING,
@@ -12517,15 +12517,15 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
switch (fourcc) {
case GST_MAKE_FOURCC ('N', 'O', 'N', 'E'):
- case GST_MAKE_FOURCC ('r', 'a', 'w', ' '):
+ case FOURCC_raw_:
/* 8-bit audio is unsigned */
if (depth == 8)
format = GST_AUDIO_FORMAT_U8;
/* otherwise it's signed and big-endian just like 'twos' */
- case GST_MAKE_FOURCC ('t', 'w', 'o', 's'):
+ case FOURCC_twos:
endian = G_BIG_ENDIAN;
/* fall-through */
- case GST_MAKE_FOURCC ('s', 'o', 'w', 't'):
+ case FOURCC_sowt:
{
gchar *str;
@@ -12570,11 +12570,11 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
"format", G_TYPE_STRING, "S32BE",
"layout", G_TYPE_STRING, "interleaved", NULL);
break;
- case GST_MAKE_FOURCC ('u', 'l', 'a', 'w'):
+ case FOURCC_ulaw:
_codec ("Mu-law audio");
caps = gst_caps_new_empty_simple ("audio/x-mulaw");
break;
- case GST_MAKE_FOURCC ('a', 'l', 'a', 'w'):
+ case FOURCC_alaw:
_codec ("A-law audio");
caps = gst_caps_new_empty_simple ("audio/x-alaw");
break;
@@ -12601,7 +12601,7 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
case 0x5500736d:
case 0x6d730055:
/* MPEG layer 3, CBR only (pre QT4.1) */
- case GST_MAKE_FOURCC ('.', 'm', 'p', '3'):
+ case FOURCC__mp3:
_codec ("MPEG-1 layer 3");
/* MPEG layer 3, CBR & VBR (QT4.1 and later) */
caps = gst_caps_new_simple ("audio/mpeg", "layer", G_TYPE_INT, 3,
@@ -12615,7 +12615,7 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
stream->sampled = TRUE;
break;
case GST_MAKE_FOURCC ('s', 'a', 'c', '3'): // Nero Recode
- case GST_MAKE_FOURCC ('a', 'c', '-', '3'):
+ case FOURCC_ac_3:
_codec ("AC-3 audio");
caps = gst_caps_new_simple ("audio/x-ac3",
"framed", G_TYPE_BOOLEAN, TRUE, NULL);
@@ -12635,12 +12635,12 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
"framed", G_TYPE_BOOLEAN, TRUE, NULL);
stream->sampled = TRUE;
break;
- case GST_MAKE_FOURCC ('M', 'A', 'C', '3'):
+ case FOURCC_MAC3:
_codec ("MACE-3");
caps = gst_caps_new_simple ("audio/x-mace",
"maceversion", G_TYPE_INT, 3, NULL);
break;
- case GST_MAKE_FOURCC ('M', 'A', 'C', '6'):
+ case FOURCC_MAC6:
_codec ("MACE-6");
caps = gst_caps_new_simple ("audio/x-mace",
"maceversion", G_TYPE_INT, 6, NULL);
@@ -12653,7 +12653,7 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
_codec ("DV audio");
caps = gst_caps_new_empty_simple ("audio/x-dv");
break;
- case GST_MAKE_FOURCC ('m', 'p', '4', 'a'):
+ case FOURCC_mp4a:
_codec ("MPEG-4 AAC audio");
caps = gst_caps_new_simple ("audio/mpeg",
"mpegversion", G_TYPE_INT, 4, "framed", G_TYPE_BOOLEAN, TRUE,
@@ -12663,7 +12663,7 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
_codec ("QDesign Music");
caps = gst_caps_new_empty_simple ("audio/x-qdm");
break;
- case GST_MAKE_FOURCC ('Q', 'D', 'M', '2'):
+ case FOURCC_QDM2:
_codec ("QDesign Music v.2");
/* FIXME: QDesign music version 2 (no constant) */
if (FALSE && data) {
@@ -12675,24 +12675,24 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
caps = gst_caps_new_empty_simple ("audio/x-qdm2");
}
break;
- case GST_MAKE_FOURCC ('a', 'g', 's', 'm'):
+ case FOURCC_agsm:
_codec ("GSM audio");
caps = gst_caps_new_empty_simple ("audio/x-gsm");
break;
- case GST_MAKE_FOURCC ('s', 'a', 'm', 'r'):
+ case FOURCC_samr:
_codec ("AMR audio");
caps = gst_caps_new_empty_simple ("audio/AMR");
break;
- case GST_MAKE_FOURCC ('s', 'a', 'w', 'b'):
+ case FOURCC_sawb:
_codec ("AMR-WB audio");
caps = gst_caps_new_empty_simple ("audio/AMR-WB");
break;
- case GST_MAKE_FOURCC ('i', 'm', 'a', '4'):
+ case FOURCC_ima4:
_codec ("Quicktime IMA ADPCM");
caps = gst_caps_new_simple ("audio/x-adpcm",
"layout", G_TYPE_STRING, "quicktime", NULL);
break;
- case GST_MAKE_FOURCC ('a', 'l', 'a', 'c'):
+ case FOURCC_alac:
_codec ("Apple lossless audio");
caps = gst_caps_new_empty_simple ("audio/x-alac");
break;
@@ -12803,15 +12803,15 @@ qtdemux_sub_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
GST_DEBUG_OBJECT (qtdemux, "resolve fourcc 0x%08x", GUINT32_TO_BE (fourcc));
switch (fourcc) {
- case GST_MAKE_FOURCC ('m', 'p', '4', 's'):
+ case FOURCC_mp4s:
_codec ("DVD subtitle");
caps = gst_caps_new_empty_simple ("subpicture/x-dvd");
stream->need_process = TRUE;
break;
- case GST_MAKE_FOURCC ('t', 'e', 'x', 't'):
+ case FOURCC_text:
_codec ("Quicktime timed text");
goto text;
- case GST_MAKE_FOURCC ('t', 'x', '3', 'g'):
+ case FOURCC_tx3g:
_codec ("3GPP timed text");
text:
caps = gst_caps_new_simple ("text/x-raw", "format", G_TYPE_STRING,
@@ -12844,7 +12844,7 @@ qtdemux_generic_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
GstCaps *caps;
switch (fourcc) {
- case GST_MAKE_FOURCC ('m', '1', 'v', ' '):
+ case FOURCC_m1v:
_codec ("MPEG 1 video");
caps = gst_caps_new_simple ("video/mpeg", "mpegversion", G_TYPE_INT, 1,
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL);