From b813bd5a8c993ef3464c56e3f431cbff857e1183 Mon Sep 17 00:00:00 2001 From: aymeric Date: Fri, 26 Sep 2008 08:28:36 +0000 Subject: [PATCH] add support for 4CIF negotiation git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@45 3f6dc0c8-ddfe-455d-9043-3cd528dc4637 --- linphone/mediastreamer2/plugins/msx264/src/msx264.c | 10 +++++++--- linphone/mediastreamer2/src/theora.c | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/linphone/mediastreamer2/plugins/msx264/src/msx264.c b/linphone/mediastreamer2/plugins/msx264/src/msx264.c index 327500281..146657e56 100644 --- a/linphone/mediastreamer2/plugins/msx264/src/msx264.c +++ b/linphone/mediastreamer2/plugins/msx264/src/msx264.c @@ -172,9 +172,13 @@ static void enc_postprocess(MSFilter *f){ static int enc_set_br(MSFilter *f, void *arg){ EncData *d=(EncData*)f->data; d->bitrate=*(int*)arg; - if (d->bitrate>=384000){ - d->vsize=MS_VIDEO_SIZE_CIF; - d->fps=30; + + if (d->bitrate>=1024000){ + d->vsize=MS_VIDEO_SIZE_4CIF; + d->fps=15; + }else if (d->bitrate>=384000){ + d->vsize=MS_VIDEO_SIZE_CIF; + d->fps=30; }else if (d->bitrate>=256000){ d->vsize=MS_VIDEO_SIZE_CIF; d->fps=15; diff --git a/linphone/mediastreamer2/src/theora.c b/linphone/mediastreamer2/src/theora.c index 9f1901064..f36a3ae93 100644 --- a/linphone/mediastreamer2/src/theora.c +++ b/linphone/mediastreamer2/src/theora.c @@ -125,8 +125,8 @@ static int enc_set_br(MSFilter *f, void*data){ s->tinfo.keyframe_data_target_bitrate=codecbr; /*those default settings would need to be affined*/ if (br>=1024000){ - vsize.width = MS_VIDEO_SIZE_1024_W; - vsize.height = MS_VIDEO_SIZE_1024_H; + vsize.width = MS_VIDEO_SIZE_4CIF_W; + vsize.height = MS_VIDEO_SIZE_4CIF_H; s->tinfo.quality=32; fps=15; }else if (br>=512000){