gst/matroska/: Added recognition of Real Audio and Video streams in matroska demuxer.

Original commit message from CVS:
* gst/matroska/matroska-demux.c: (gst_matroska_demux_video_caps),
(gst_matroska_demux_audio_caps), (gst_matroska_demux_plugin_init):
* gst/matroska/matroska-ids.h:
Added recognition of Real Audio and Video streams in matroska demuxer.
This commit is contained in:
Edward Hervey 2006-01-23 18:39:31 +00:00
parent 07d2fd89cb
commit 593a09066d
3 changed files with 78 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2006-01-23 Edward Hervey <edward@fluendo.com>
* gst/matroska/matroska-demux.c: (gst_matroska_demux_video_caps),
(gst_matroska_demux_audio_caps), (gst_matroska_demux_plugin_init):
* gst/matroska/matroska-ids.h:
Added recognition of Real Audio and Video streams in matroska demuxer.
2006-01-23 Jan Schmidt <thaytan@mad.scientist.com>
* gst/id3demux/id3v2frames.c: (id3v2_tag_to_taglist):

View file

@ -3034,6 +3034,25 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *
}
if (codec_name)
*codec_name = g_strdup ("H264");
} else if ((!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO1)) ||
(!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO2)) ||
(!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO3)) ||
(!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO4))) {
gint rmversion = -1;
if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO1))
rmversion = 1;
else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO2))
rmversion = 2;
else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO3))
rmversion = 3;
else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO4))
rmversion = 4;
caps = gst_caps_new_simple ("video/x-pn-realvideo",
"rmversion", G_TYPE_INT, rmversion, NULL);
if (codec_name)
*codec_name = g_strdup_printf ("RealVideo %d.0", rmversion);
} else {
GST_WARNING ("Unknown codec '%s', cannot build Caps", codec_id);
return NULL;
@ -3327,6 +3346,33 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *
}
if (codec_name)
*codec_name = g_strdup ("Wavpack audio");
} else if ((!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_REAL_14_4)) ||
(!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_REAL_14_4)) ||
(!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_REAL_COOK))) {
gint raversion = -1;
if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_REAL_14_4))
raversion = 1;
else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_REAL_COOK))
raversion = 8;
else
raversion = 2;
caps = gst_caps_new_simple ("audio/x-pn-realaudio",
"raversion", G_TYPE_INT, raversion, NULL);
if (codec_name)
*codec_name = g_strdup_printf ("RealAudio %d.0", raversion);
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_REAL_SIPR)) {
caps = gst_caps_new_simple ("audio/x-sipro", NULL);
if (codec_name)
*codec_name = g_strdup ("Sipro/ACELP.NET Voice Codec");
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_REAL_RALF)) {
caps = gst_caps_new_simple ("audio/x-ralf-mpeg4-generic", NULL);
if (codec_name)
*codec_name = g_strdup ("Real Audio Lossless");
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_REAL_ATRC)) {
caps = gst_caps_new_simple ("audio/x-vnd.sony.atrac3", NULL);
if (codec_name)
*codec_name = g_strdup ("Sony ATRAC3");
} else {
GST_WARNING ("Unknown codec '%s', cannot build Caps", codec_id);
return NULL;
@ -3431,7 +3477,11 @@ gst_matroska_demux_plugin_init (GstPlugin * plugin)
GST_MATROSKA_CODEC_ID_VIDEO_MPEG1,
GST_MATROSKA_CODEC_ID_VIDEO_MPEG2,
GST_MATROSKA_CODEC_ID_VIDEO_MJPEG,
/* TODO: Real/Quicktime */
GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO1,
GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO2,
GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO3,
GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO4,
/* TODO: Quicktime */
/* FILLME */
NULL
};
@ -3448,7 +3498,13 @@ gst_matroska_demux_plugin_init (GstPlugin * plugin)
GST_MATROSKA_CODEC_ID_AUDIO_TTA,
GST_MATROSKA_CODEC_ID_AUDIO_MPEG2, GST_MATROSKA_CODEC_ID_AUDIO_MPEG4,
GST_MATROSKA_CODEC_ID_AUDIO_WAVPACK4,
/* TODO: AC3-9/10, Real, Musepack, Quicktime */
GST_MATROSKA_CODEC_ID_AUDIO_REAL_14_4,
GST_MATROSKA_CODEC_ID_AUDIO_REAL_28_8,
GST_MATROSKA_CODEC_ID_AUDIO_REAL_COOK,
GST_MATROSKA_CODEC_ID_AUDIO_REAL_SIPR,
GST_MATROSKA_CODEC_ID_AUDIO_REAL_RALF,
GST_MATROSKA_CODEC_ID_AUDIO_REAL_ATRC,
/* TODO: AC3-9/10, Musepack, Quicktime */
/* FILLME */
NULL
};

View file

@ -138,7 +138,11 @@
#define GST_MATROSKA_CODEC_ID_VIDEO_MPEG1 "V_MPEG1"
#define GST_MATROSKA_CODEC_ID_VIDEO_MPEG2 "V_MPEG2"
#define GST_MATROSKA_CODEC_ID_VIDEO_MJPEG "V_MJPEG"
/* TODO: Real/Quicktime */
#define GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO1 "V_REAL/RV10"
#define GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO2 "V_REAL/RV20"
#define GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO3 "V_REAL/RV30"
#define GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO4 "V_REAL/RV40"
/* TODO: Quicktime */
#define GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L1 "A_MPEG/L1"
#define GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L2 "A_MPEG/L2"
@ -154,7 +158,14 @@
#define GST_MATROSKA_CODEC_ID_AUDIO_MPEG4 "A_AAC/MPEG4/"
#define GST_MATROSKA_CODEC_ID_AUDIO_TTA "A_TTA1"
#define GST_MATROSKA_CODEC_ID_AUDIO_WAVPACK4 "A_WAVPACK4"
/* TODO: AC3-9/10 (?), Real, Musepack, Quicktime */
#define GST_MATROSKA_CODEC_ID_AUDIO_REAL_14_4 "A_REAL/28_8"
#define GST_MATROSKA_CODEC_ID_AUDIO_REAL_28_8 "A_REAL/28_8"
#define GST_MATROSKA_CODEC_ID_AUDIO_REAL_COOK "A_REAL/COOK"
#define GST_MATROSKA_CODEC_ID_AUDIO_REAL_SIPR "A_REAL/SIPR"
#define GST_MATROSKA_CODEC_ID_AUDIO_REAL_RALF "A_REAL/RALF"
#define GST_MATROSKA_CODEC_ID_AUDIO_REAL_ATRC "A_REAL/ATRC"
/* TODO: AC3-9/10 (?), Musepack, Quicktime */
#define GST_MATROSKA_CODEC_ID_SUBTITLE_UTF8 "S_TEXT/UTF8"