From d2b34efe225e15bb82793ce166c21af9ab964a5e Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Tue, 24 Nov 2009 15:54:17 +0000 Subject: [PATCH] Update ffserver to include all basic x264 parameters in .ffm files. Originally committed as revision 20601 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/ffmdec.c | 13 +++++++++++++ libavformat/ffmenc.c | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index dc4da29..d2f1633 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -336,6 +336,19 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) codec->rc_buffer_aggressivity = av_int2dbl(get_be64(pb)); codec->codec_tag = get_be32(pb); codec->thread_count = get_byte(pb); + codec->coder_type = get_be32(pb); + codec->me_cmp = get_be32(pb); + codec->partitions = get_be32(pb); + codec->me_subpel_quality = get_be32(pb); + codec->me_range = get_be32(pb); + codec->keyint_min = get_be32(pb); + codec->scenechange_threshold = get_be32(pb); + codec->b_frame_strategy = get_be32(pb); + codec->qcompress = av_int2dbl(get_be64(pb)); + codec->qblur = av_int2dbl(get_be64(pb)); + codec->max_qdiff = get_be32(pb); + codec->refs = get_be32(pb); + codec->directpred = get_be32(pb); break; case CODEC_TYPE_AUDIO: codec->sample_rate = get_be32(pb); diff --git a/libavformat/ffmenc.c b/libavformat/ffmenc.c index 3de4984..eb97b8b 100644 --- a/libavformat/ffmenc.c +++ b/libavformat/ffmenc.c @@ -154,6 +154,19 @@ static int ffm_write_header(AVFormatContext *s) put_be64(pb, av_dbl2int(codec->rc_buffer_aggressivity)); put_be32(pb, codec->codec_tag); put_byte(pb, codec->thread_count); + put_be32(pb, codec->coder_type); + put_be32(pb, codec->me_cmp); + put_be32(pb, codec->partitions); + put_be32(pb, codec->me_subpel_quality); + put_be32(pb, codec->me_range); + put_be32(pb, codec->keyint_min); + put_be32(pb, codec->scenechange_threshold); + put_be32(pb, codec->b_frame_strategy); + put_be64(pb, av_dbl2int(codec->qcompress)); + put_be64(pb, av_dbl2int(codec->qblur)); + put_be32(pb, codec->max_qdiff); + put_be32(pb, codec->refs); + put_be32(pb, codec->directpred); break; case CODEC_TYPE_AUDIO: put_be32(pb, codec->sample_rate); -- 2.7.4