ext/ffmpeg/gstffmpegcfg.c: FLV is in fact h263 and can take the same parameters as other mpeg derivatives.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegcfg.c:
FLV is in fact h263 and can take the same parameters as other mpeg
derivatives.
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_caps_with_codecid):
Add pixel format to video/x-dv,systemstream=False
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_class_init),
(gst_ffmpegenc_init):
Use EPZS (Enhanced Predictive Zonal Search) as the default motion
estimation method, since it's the best quality to speed compromise.
This commit is contained in:
Edward Hervey 2006-10-24 09:27:16 +00:00
parent b4f0d0c929
commit 5ace343ac9
5 changed files with 80 additions and 5 deletions

View file

@ -1,3 +1,16 @@
2006-10-24 Edward Hervey <edward@fluendo.com>
* ext/ffmpeg/gstffmpegcfg.c:
FLV is in fact h263 and can take the same parameters as other mpeg
derivatives.
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_caps_with_codecid):
Add pixel format to video/x-dv,systemstream=False
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_class_init),
(gst_ffmpegenc_init):
Use EPZS (Enhanced Predictive Zonal Search) as the default motion
estimation method, since it's the best quality to speed compromise.
2006-10-20 Thomas Vander Stichele <thomas at apestaart dot org>
reviewed by: <delete if not using a buddy>

2
common

@ -1 +1 @@
Subproject commit efcacf2625da231fbee99b68e0f5db6816cf6fad
Subproject commit ee0bb43e2b66781d04078e2210404da48f6c68f0

View file

@ -353,6 +353,7 @@ static gint mpeg4[] = {
CODEC_ID_MSMPEG4V1,
CODEC_ID_MSMPEG4V2,
CODEC_ID_MSMPEG4V3,
CODEC_ID_FLV1,
CODEC_ID_NONE
};

View file

@ -398,9 +398,41 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
break;
case CODEC_ID_DVVIDEO:
caps = gst_ff_vid_caps_new (context, "video/x-dv",
"systemstream", G_TYPE_BOOLEAN, FALSE,
NULL);
{
if (encode && context) {
guint32 fourcc;
switch (context->pix_fmt) {
case PIX_FMT_YUV422:
fourcc = GST_MAKE_FOURCC ('Y', 'U', 'Y', '2');
break;
case PIX_FMT_YUV420P:
fourcc = GST_MAKE_FOURCC ('I', '4', '2', '0');
break;
case PIX_FMT_YUV411P:
fourcc = GST_MAKE_FOURCC ('Y', '4', '1', 'B');
break;
case PIX_FMT_YUV422P:
fourcc = GST_MAKE_FOURCC ('Y', '4', '2', 'B');
break;
case PIX_FMT_YUV410P:
fourcc = GST_MAKE_FOURCC ('Y', 'U', 'V', '9');
break;
default:
GST_WARNING ("Couldnt' find fourcc for pixfmt %d, defaulting to I420", context->pix_fmt);
fourcc = GST_MAKE_FOURCC ('I', '4', '2', '0');
break;
}
caps = gst_ff_vid_caps_new (context, "video/x-dv",
"systemstream", G_TYPE_BOOLEAN, FALSE,
"format", GST_TYPE_FOURCC, fourcc,
NULL);
} else {
caps = gst_ff_vid_caps_new (context, "video/x-dv",
"systemstream", G_TYPE_BOOLEAN, FALSE,
NULL);
}
}
break;
case CODEC_ID_WMAV1:
@ -1531,6 +1563,34 @@ gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
gst_structure_get_int (str, "samplesize", &context->bits_per_sample);
break;
case CODEC_ID_DVVIDEO:
{
guint32 fourcc;
if (gst_structure_get_fourcc (str, "format", &fourcc))
switch (fourcc) {
case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
context->pix_fmt = PIX_FMT_YUV422;
break;
case GST_MAKE_FOURCC ('I', '4', '2', '0'):
context->pix_fmt = PIX_FMT_YUV420P;
break;
case GST_MAKE_FOURCC ('Y', '4', '1', 'B'):
context->pix_fmt = PIX_FMT_YUV411P;
break;
case GST_MAKE_FOURCC ('Y', '4', '2', 'B'):
context->pix_fmt = PIX_FMT_YUV422P;
break;
case GST_MAKE_FOURCC ('Y', 'U', 'V', '9'):
context->pix_fmt = PIX_FMT_YUV410P;
break;
default:
GST_WARNING ("couldn't convert fourcc %"GST_FOURCC_FORMAT" to a pixel format",
GST_FOURCC_ARGS(fourcc));
break;
}
}
default:
break;
}

View file

@ -188,7 +188,7 @@ gst_ffmpegenc_class_init (GstFFMpegEncClass * klass)
DEFAULT_VIDEO_GOP_SIZE, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_ME_METHOD,
g_param_spec_enum ("me_method", "ME Method", "Motion Estimation Method",
GST_TYPE_ME_METHOD, ME_LOG, G_PARAM_READWRITE));
GST_TYPE_ME_METHOD, ME_EPZS, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BUFSIZE,
g_param_spec_ulong ("buffer_size", "Buffer Size",
"Size of the video buffers", 0, G_MAXULONG, 0, G_PARAM_READWRITE));
@ -238,6 +238,7 @@ gst_ffmpegenc_init (GstFFMpegEnc * ffmpegenc)
gst_pad_set_event_function (ffmpegenc->sinkpad, gst_ffmpegenc_event_video);
ffmpegenc->bitrate = DEFAULT_VIDEO_BITRATE;
ffmpegenc->me_method = ME_EPZS;
ffmpegenc->buffer_size = 512 * 1024;
ffmpegenc->gop_size = DEFAULT_VIDEO_GOP_SIZE;
ffmpegenc->rtp_payload_size = 0;