mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
ext/ffmpeg/: Add mappings for RealVideo 4.0, AMR-WB, AMR-NB and DTS to silence warnings when registering.
Original commit message from CVS: * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps), (gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid), (gst_ffmpeg_get_codecid_longname): * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_class_init): Add mappings for RealVideo 4.0, AMR-WB, AMR-NB and DTS to silence warnings when registering. Only register the 1/2,1/4 size decode and frame-skipping properties on video decoders. * gst-libs/ext/ffmpeg/configure.ac: * gst-libs/ext/ffmpeg/libavformat/Makefile.am: * gst-libs/ext/ffmpeg/patches/autotools.patch: Merge patch by Sam Morris to allow disabling of decoders. Fixes #324366
This commit is contained in:
parent
4049137cc6
commit
a3cf8e1888
3 changed files with 66 additions and 10 deletions
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
|||
2006-05-07 Jan Schmidt <thaytan@mad.scientist.com>
|
||||
|
||||
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
|
||||
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_get_codecids),
|
||||
(gst_ffmpeg_caps_to_codecid), (gst_ffmpeg_get_codecid_longname):
|
||||
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_class_init):
|
||||
Add mappings for RealVideo 4.0, AMR-WB, AMR-NB and DTS to silence
|
||||
warnings when registering.
|
||||
Only register the 1/2,1/4 size decode and frame-skipping properties
|
||||
on video decoders.
|
||||
|
||||
* gst-libs/ext/ffmpeg/configure.ac:
|
||||
* gst-libs/ext/ffmpeg/libavformat/Makefile.am:
|
||||
* gst-libs/ext/ffmpeg/patches/autotools.patch:
|
||||
Merge patch by Sam Morris to allow disabling of decoders.
|
||||
Fixes #324366
|
||||
|
||||
2006-05-07 Jan Schmidt <thaytan@mad.scientist.com>
|
||||
|
||||
* gst-libs/ext/ffmpeg/patches/autotools.patch:
|
||||
|
|
|
@ -179,8 +179,21 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
|||
|
||||
case CODEC_ID_RV10:
|
||||
case CODEC_ID_RV20:
|
||||
case CODEC_ID_RV40:
|
||||
{
|
||||
gint version = (codec_id == CODEC_ID_RV10) ? 1 : 2;
|
||||
gint version;
|
||||
|
||||
switch (codec_id) {
|
||||
case CODEC_ID_RV40:
|
||||
version = 4;
|
||||
break;
|
||||
case CODEC_ID_RV20:
|
||||
version = 2;
|
||||
break;
|
||||
default:
|
||||
version = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
/* FIXME: context->sub_id must be filled in during decoding */
|
||||
caps = GST_FF_VID_CAPS_NEW ("video/x-pn-realvideo",
|
||||
|
@ -236,6 +249,9 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
|||
caps = GST_FF_AUD_CAPS_NEW ("audio/x-ac3", NULL);
|
||||
}
|
||||
break;
|
||||
case CODEC_ID_DTS:
|
||||
caps = GST_FF_AUD_CAPS_NEW ("audio/x-dts", NULL);
|
||||
break;
|
||||
|
||||
/* MJPEG is normal JPEG, Motion-JPEG and Quicktime MJPEG-A. MJPEGB
|
||||
* is Quicktime's MJPEG-B. LJPEG is lossless JPEG. I don't know what
|
||||
|
@ -1416,6 +1432,7 @@ gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
|
|||
|
||||
case CODEC_ID_RV10:
|
||||
case CODEC_ID_RV20:
|
||||
case CODEC_ID_RV40:
|
||||
{
|
||||
guint32 fourcc;
|
||||
|
||||
|
@ -1575,6 +1592,7 @@ gst_ffmpeg_formatid_get_codecids (const gchar *format_name,
|
|||
static enum CodecID mpegts_audio_list[] = { CODEC_ID_MP2,
|
||||
CODEC_ID_MP3,
|
||||
CODEC_ID_AC3,
|
||||
CODEC_ID_DTS,
|
||||
CODEC_ID_AAC,
|
||||
CODEC_ID_NONE };
|
||||
|
||||
|
@ -1582,7 +1600,8 @@ gst_ffmpeg_formatid_get_codecids (const gchar *format_name,
|
|||
*audio_codec_list = mpegts_audio_list;
|
||||
} else if (!strcmp (format_name, "vob")) {
|
||||
static enum CodecID vob_video_list[] = { CODEC_ID_MPEG2VIDEO, CODEC_ID_NONE };
|
||||
static enum CodecID vob_audio_list[] = { CODEC_ID_MP2, CODEC_ID_AC3, CODEC_ID_NONE };
|
||||
static enum CodecID vob_audio_list[] = { CODEC_ID_MP2, CODEC_ID_AC3,
|
||||
CODEC_ID_DTS, CODEC_ID_NONE };
|
||||
|
||||
*video_codec_list = vob_video_list;
|
||||
*audio_codec_list = vob_audio_list;
|
||||
|
@ -1785,6 +1804,9 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
|
|||
} else if (!strcmp (mimetype, "audio/x-ac3")) {
|
||||
id = CODEC_ID_AC3;
|
||||
audio = TRUE;
|
||||
} else if (!strcmp (mimetype, "audio/x-dts")) {
|
||||
id = CODEC_ID_DTS;
|
||||
audio = TRUE;
|
||||
} else if (!strcmp (mimetype, "video/x-msmpeg")) {
|
||||
gint msmpegversion = 0;
|
||||
|
||||
|
@ -1975,6 +1997,9 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
|
|||
case 2:
|
||||
id = CODEC_ID_RV20;
|
||||
break;
|
||||
case 4:
|
||||
id = CODEC_ID_RV40;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (id != CODEC_ID_NONE)
|
||||
|
@ -2102,6 +2127,9 @@ gst_ffmpeg_get_codecid_longname (enum CodecID codec_id)
|
|||
case CODEC_ID_RV20:
|
||||
name = "Realvideo 2.0";
|
||||
break;
|
||||
case CODEC_ID_RV40:
|
||||
name = "Realvideo 4.0";
|
||||
break;
|
||||
case CODEC_ID_MP2:
|
||||
name = "MPEG-1 layer 2 audio";
|
||||
break;
|
||||
|
@ -2117,6 +2145,9 @@ gst_ffmpeg_get_codecid_longname (enum CodecID codec_id)
|
|||
case CODEC_ID_AC3:
|
||||
name = "AC-3 audio";
|
||||
break;
|
||||
case CODEC_ID_DTS:
|
||||
name = "DTS Audio";
|
||||
break;
|
||||
case CODEC_ID_MJPEG:
|
||||
name = "Motion-JPEG";
|
||||
break;
|
||||
|
@ -2478,6 +2509,12 @@ gst_ffmpeg_get_codecid_longname (enum CodecID codec_id)
|
|||
case CODEC_ID_TRUESPEECH:
|
||||
name = "DSP Group TrueSpeech Audio";
|
||||
break;
|
||||
case CODEC_ID_AMR_NB:
|
||||
name = "3GPP AMR NarrowBand speech audio codec";
|
||||
break;
|
||||
case CODEC_ID_AMR_WB:
|
||||
name = "3GPP AMR WideBand speech audio codec";
|
||||
break;
|
||||
default:
|
||||
GST_WARNING ("Unknown codecID 0x%x", codec_id);
|
||||
break;
|
||||
|
|
|
@ -256,14 +256,16 @@ gst_ffmpegdec_class_init (GstFFMpegDecClass * klass)
|
|||
gobject_class->get_property = gst_ffmpegdec_get_property;
|
||||
gstelement_class->change_state = gst_ffmpegdec_change_state;
|
||||
|
||||
g_object_class_install_property (gobject_class, ARG_SKIPFRAME,
|
||||
g_param_spec_enum ("skip-frame", "Skip frames",
|
||||
"Which types of frames to skip during decoding",
|
||||
GST_FFMPEGDEC_TYPE_SKIPFRAME, 0, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (gobject_class, ARG_LOWRES,
|
||||
g_param_spec_enum ("lowres", "Low resolution",
|
||||
"At which resolution to decode images",
|
||||
GST_FFMPEGDEC_TYPE_LOWRES, 0, G_PARAM_READWRITE));
|
||||
if (klass->in_plugin->type == CODEC_TYPE_VIDEO) {
|
||||
g_object_class_install_property (gobject_class, ARG_SKIPFRAME,
|
||||
g_param_spec_enum ("skip-frame", "Skip frames",
|
||||
"Which types of frames to skip during decoding",
|
||||
GST_FFMPEGDEC_TYPE_SKIPFRAME, 0, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (gobject_class, ARG_LOWRES,
|
||||
g_param_spec_enum ("lowres", "Low resolution",
|
||||
"At which resolution to decode images",
|
||||
GST_FFMPEGDEC_TYPE_LOWRES, 0, G_PARAM_READWRITE));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue