Commit ab1690f4 authored by Aymeric Moizard's avatar Aymeric Moizard

Merge branch 'master' of git.linphone.org:mediastreamer2

parents 3ae3a469 8dae09b1
......@@ -165,7 +165,7 @@ AC_DEFUN([MS_CHECK_VIDEO],[
fi
if test "$mingw_found" = "yes" ; then
VIDEO_LIBS="$VIDEO_LIBS -lvfw32"
VIDEO_LIBS="$VIDEO_LIBS -lvfw32 -lgdi32"
fi
case $target_os in
......
......@@ -98,8 +98,14 @@ static void enc_preprocess(MSFilter *f){
params.i_keyint_min = (int)d->fps;
*/
params.b_repeat_headers=1;
params.b_cabac=0;//disable cabac to be baseline
params.i_bframe=0;/*no B frames*/
//these parameters must be set so that our stream is baseline
params.analyse.b_transform_8x8 = 0;
params.b_cabac = 0;
params.i_cqm_preset = X264_CQM_FLAT;
params.i_bframe = 0;
params.analyse.i_weighted_pred = X264_WEIGHTP_NONE;
d->enc=x264_encoder_open(&params);
if (d->enc==NULL) ms_error("Fail to create x264 encoder.");
d->framenum=0;
......
......@@ -1589,6 +1589,7 @@ mblk_t *ms_load_jpeg_as_yuv(const char *jpgpath, MSVideoSize *reqsize){
mblk_t *m=NULL;
struct stat statbuf;
uint8_t *jpgbuf;
int err;
#if !defined(_MSC_VER)
int fd=open(jpgpath,O_RDONLY);
#else
......@@ -1620,10 +1621,13 @@ mblk_t *ms_load_jpeg_as_yuv(const char *jpgpath, MSVideoSize *reqsize){
return m;
}
#if !defined(_MSC_VER)
read(fd,jpgbuf,statbuf.st_size);
err=read(fd,jpgbuf,statbuf.st_size);
#else
_read(fd,jpgbuf,statbuf.st_size);
err=_read(fd,jpgbuf,statbuf.st_size);
#endif
if (err!=statbuf.st_size){
ms_error("Could not read as much as wanted !");
}
m=jpeg2yuv(jpgbuf,statbuf.st_size,reqsize);
ms_free(jpgbuf);
if (m==NULL)
......
......@@ -175,7 +175,7 @@ int main(int argc, char * argv[])
vs.width=MS_VIDEO_SIZE_CIF_W;
vs.height=MS_VIDEO_SIZE_CIF_H;
if (argc<4) {
printf(usage);
printf("%s",usage);
return -1;
}
for (i=1;i<argc;i++){
......@@ -185,7 +185,7 @@ int main(int argc, char * argv[])
}else if (strcmp(argv[i],"--remote")==0){
i++;
if (!parse_addr(argv[i],ip,sizeof(ip),&remoteport)) {
printf(usage);
printf("%s",usage);
return -1;
}
printf("Remote addr: ip=%s port=%i\n",ip,remoteport);
......
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