diff --git a/linphone/mediastreamer2/include/mediastreamer2/msvideo.h b/linphone/mediastreamer2/include/mediastreamer2/msvideo.h index 8e6d892a9..aea6ee17d 100644 --- a/linphone/mediastreamer2/include/mediastreamer2/msvideo.h +++ b/linphone/mediastreamer2/include/mediastreamer2/msvideo.h @@ -42,12 +42,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MS_VIDEO_SIZE_720P_W 1280 #define MS_VIDEO_SIZE_720P_H 720 - #define MS_VIDEO_SIZE_NS1_W 324 #define MS_VIDEO_SIZE_NS1_H 248 -#define MS_VIDEO_SIZE_MAX_W MS_VIDEO_SIZE_720P_W -#define MS_VIDEO_SIZE_MAX_H MS_VIDEO_SIZE_720P_H +#define MS_VIDEO_SIZE_1024_W 1024 +#define MS_VIDEO_SIZE_1024_H 768 + +#define MS_VIDEO_SIZE_MAX_W MS_VIDEO_SIZE_1024_W +#define MS_VIDEO_SIZE_MAX_H MS_VIDEO_SIZE_1024_H typedef struct MSVideoSize{ int width,height; @@ -69,6 +71,8 @@ typedef struct MSRect{ #define MS_VIDEO_SIZE_NS1 (MSVideoSize){MS_VIDEO_SIZE_NS1_W,MS_VIDEO_SIZE_NS1_H} +#define MS_VIDEO_SIZE_1024 (MSVideoSize){MS_VIDEO_SIZE_1024_W, MS_VIDEO_SIZE_1024_H} + typedef enum{ MS_YUV420P, MS_YUYV, diff --git a/linphone/mediastreamer2/src/theora.c b/linphone/mediastreamer2/src/theora.c index f43282eb0..9f1901064 100644 --- a/linphone/mediastreamer2/src/theora.c +++ b/linphone/mediastreamer2/src/theora.c @@ -124,7 +124,12 @@ static int enc_set_br(MSFilter *f, void*data){ s->tinfo.target_bitrate=codecbr*0.8; s->tinfo.keyframe_data_target_bitrate=codecbr; /*those default settings would need to be affined*/ - if (br>=512000){ + if (br>=1024000){ + vsize.width = MS_VIDEO_SIZE_1024_W; + vsize.height = MS_VIDEO_SIZE_1024_H; + s->tinfo.quality=32; + fps=15; + }else if (br>=512000){ vsize.width = MS_VIDEO_SIZE_CIF_W; vsize.height = MS_VIDEO_SIZE_CIF_H; s->tinfo.quality=32; diff --git a/linphone/mediastreamer2/src/videoenc.c b/linphone/mediastreamer2/src/videoenc.c index 0b1004762..16499b199 100644 --- a/linphone/mediastreamer2/src/videoenc.c +++ b/linphone/mediastreamer2/src/videoenc.c @@ -509,7 +509,11 @@ static int enc_set_br(MSFilter *f, void *arg){ EncState *s=(EncState*)f->data; bool_t snow=s->codec==CODEC_ID_SNOW; s->maxbr=*(int*)arg; - if (s->maxbr>=512000){ + if (s->maxbr>=1024000 && s->codec!=CODEC_ID_H263P){ + s->vsize.width = MS_VIDEO_SIZE_1024_W; + s->vsize.height = MS_VIDEO_SIZE_1024_H; + s->fps=17; + }else if (s->maxbr>=512000){ s->vsize.width=MS_VIDEO_SIZE_CIF_W; s->vsize.height=MS_VIDEO_SIZE_CIF_H; s->fps=17;