Commit 5e39aa8e authored by Edward Hervey's avatar Edward Hervey 🤘

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.
parent c3d69815
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> 2006-10-09 Edward Hervey <edward@fluendo.com>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_formatid_to_caps), * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_formatid_to_caps),
......
...@@ -1697,6 +1697,28 @@ gst_ffmpeg_formatid_get_codecids (const gchar *format_name, ...@@ -1697,6 +1697,28 @@ gst_ffmpeg_formatid_get_codecids (const gchar *format_name,
*video_codec_list = asf_video_list; *video_codec_list = asf_video_list;
*audio_codec_list = asf_audio_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 { } else {
GST_LOG ("Format %s not found", format_name); GST_LOG ("Format %s not found", format_name);
return FALSE; return FALSE;
......
...@@ -323,14 +323,20 @@ gst_ffmpegenc_getcaps (GstPad * pad) ...@@ -323,14 +323,20 @@ gst_ffmpegenc_getcaps (GstPad * pad)
_shut_up_I_am_probing = TRUE; _shut_up_I_am_probing = TRUE;
#endif #endif
for (pixfmt = 0; pixfmt < PIX_FMT_NB; pixfmt++) { for (pixfmt = 0; pixfmt < PIX_FMT_NB; pixfmt++) {
GstCaps * tmpcaps;
ctx->pix_fmt = pixfmt; ctx->pix_fmt = pixfmt;
if (gst_ffmpeg_avcodec_open (ctx, oclass->in_plugin) >= 0 && if (gst_ffmpeg_avcodec_open (ctx, oclass->in_plugin) >= 0 &&
ctx->pix_fmt == pixfmt) { ctx->pix_fmt == pixfmt) {
ctx->width = -1; ctx->width = -1;
if (!caps) if (!caps)
caps = gst_caps_new_empty (); caps = gst_caps_new_empty ();
gst_caps_append (caps, tmpcaps = gst_ffmpeg_codectype_to_caps (oclass->in_plugin->type, ctx);
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); gst_ffmpeg_avcodec_close (ctx);
} }
if (ctx->priv_data) if (ctx->priv_data)
...@@ -939,7 +945,7 @@ gst_ffmpegenc_register (GstPlugin * plugin) ...@@ -939,7 +945,7 @@ gst_ffmpegenc_register (GstPlugin * plugin)
/* first make sure we've got a supported type */ /* first make sure we've got a supported type */
srccaps = gst_ffmpeg_codecid_to_caps (in_plugin->id, NULL, TRUE); srccaps = gst_ffmpeg_codecid_to_caps (in_plugin->id, NULL, TRUE);
if (in_plugin->type == CODEC_TYPE_VIDEO) { 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 { } else {
sinkcaps = gst_ffmpeg_codectype_to_caps (in_plugin->type, NULL); sinkcaps = gst_ffmpeg_codectype_to_caps (in_plugin->type, NULL);
} }
......
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