mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
ext/ffmpeg/gstffmpegcodecmap.c: Added some codec mappings for dv and mov muxers.
Original commit message from CVS: * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_formatid_get_codecids): Added some codec mappings for dv and mov muxers. * ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps), (gst_ffmpegenc_register): Don't attempt to add caps to a NULL caps. Add video/x-raw-gray to the input raw video types.
This commit is contained in:
parent
c3d6981559
commit
5e39aa8e8e
3 changed files with 41 additions and 3 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2006-10-13 Edward Hervey <edward@fluendo.com>
|
||||
|
||||
* ext/ffmpeg/gstffmpegcodecmap.c:
|
||||
(gst_ffmpeg_formatid_get_codecids):
|
||||
Added some codec mappings for dv and mov muxers.
|
||||
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
|
||||
(gst_ffmpegenc_register):
|
||||
Don't attempt to add caps to a NULL caps.
|
||||
Add video/x-raw-gray to the input raw video types.
|
||||
|
||||
2006-10-09 Edward Hervey <edward@fluendo.com>
|
||||
|
||||
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_formatid_to_caps),
|
||||
|
|
|
@ -1697,6 +1697,28 @@ gst_ffmpeg_formatid_get_codecids (const gchar *format_name,
|
|||
|
||||
*video_codec_list = asf_video_list;
|
||||
*audio_codec_list = asf_audio_list;
|
||||
} else if (!strcmp (format_name, "dv")) {
|
||||
static enum CodecID dv_video_list[] = { CODEC_ID_DVVIDEO, CODEC_ID_NONE };
|
||||
static enum CodecID dv_audio_list[] = { CODEC_ID_PCM_S16LE, CODEC_ID_NONE };
|
||||
|
||||
*video_codec_list = dv_video_list;
|
||||
*audio_codec_list = dv_audio_list;
|
||||
} else if (!strcmp (format_name, "mov")) {
|
||||
static enum CodecID mov_video_list[] = {
|
||||
CODEC_ID_SVQ1, CODEC_ID_SVQ3, CODEC_ID_MPEG4, CODEC_ID_H263,
|
||||
CODEC_ID_H264, CODEC_ID_DVVIDEO,
|
||||
CODEC_ID_NONE
|
||||
};
|
||||
static enum CodecID mov_audio_list[] = {
|
||||
CODEC_ID_PCM_MULAW, CODEC_ID_PCM_ALAW, CODEC_ID_ADPCM_IMA_QT,
|
||||
CODEC_ID_MACE3, CODEC_ID_MACE6, CODEC_ID_AAC,
|
||||
CODEC_ID_AMR_NB, CODEC_ID_AMR_WB,
|
||||
CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE,
|
||||
CODEC_ID_MP3, CODEC_ID_NONE
|
||||
};
|
||||
|
||||
*video_codec_list = mov_video_list;
|
||||
*audio_codec_list = mov_audio_list;
|
||||
} else {
|
||||
GST_LOG ("Format %s not found", format_name);
|
||||
return FALSE;
|
||||
|
|
|
@ -323,14 +323,20 @@ gst_ffmpegenc_getcaps (GstPad * pad)
|
|||
_shut_up_I_am_probing = TRUE;
|
||||
#endif
|
||||
for (pixfmt = 0; pixfmt < PIX_FMT_NB; pixfmt++) {
|
||||
GstCaps * tmpcaps;
|
||||
|
||||
ctx->pix_fmt = pixfmt;
|
||||
if (gst_ffmpeg_avcodec_open (ctx, oclass->in_plugin) >= 0 &&
|
||||
ctx->pix_fmt == pixfmt) {
|
||||
ctx->width = -1;
|
||||
if (!caps)
|
||||
caps = gst_caps_new_empty ();
|
||||
gst_caps_append (caps,
|
||||
gst_ffmpeg_codectype_to_caps (oclass->in_plugin->type, ctx));
|
||||
tmpcaps = gst_ffmpeg_codectype_to_caps (oclass->in_plugin->type, ctx);
|
||||
if (tmpcaps)
|
||||
gst_caps_append (caps, tmpcaps);
|
||||
else
|
||||
GST_LOG_OBJECT (ffmpegenc, "Couldn't get caps for oclass->in_plugin->name:%s",
|
||||
oclass->in_plugin->name);
|
||||
gst_ffmpeg_avcodec_close (ctx);
|
||||
}
|
||||
if (ctx->priv_data)
|
||||
|
@ -939,7 +945,7 @@ gst_ffmpegenc_register (GstPlugin * plugin)
|
|||
/* first make sure we've got a supported type */
|
||||
srccaps = gst_ffmpeg_codecid_to_caps (in_plugin->id, NULL, TRUE);
|
||||
if (in_plugin->type == CODEC_TYPE_VIDEO) {
|
||||
sinkcaps = gst_caps_from_string ("video/x-raw-rgb; video/x-raw-yuv");
|
||||
sinkcaps = gst_caps_from_string ("video/x-raw-rgb; video/x-raw-yuv; video/x-raw-gray");
|
||||
} else {
|
||||
sinkcaps = gst_ffmpeg_codectype_to_caps (in_plugin->type, NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue