Changeset 246:92c065266a1d in mediastreamer2
- Timestamp:
- Feb 9, 2009 2:28:37 PM (4 years ago)
- Branch:
- default
- File:
-
- 1 edited
-
linphone/mediastreamer2/src/videoenc.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
linphone/mediastreamer2/src/videoenc.c
r205 r246 60 60 int maxbr; 61 61 int qmin; 62 uint32_t framenum; 62 63 bool_t req_vfu; 63 64 }EncState; … … 163 164 s->qmin=2; 164 165 s->req_vfu=FALSE; 166 s->framenum=0; 165 167 s->av_context.codec=NULL; 166 168 } … … 459 461 mblk_t *comp_buf=s->comp_buf; 460 462 int comp_buf_sz=comp_buf->b_datap->db_lim-comp_buf->b_datap->db_base; 461 463 462 464 /* convert image if necessary */ 463 465 avcodec_get_frame_defaults(&pict); … … 466 468 /* timestamp used by ffmpeg, unset here */ 467 469 pict.pts=AV_NOPTS_VALUE; 470 471 if (s->framenum==(int)s->fps*2 || s->framenum==(int)s->fps*4){ 472 /*sends an I frame at 2 seconds and 4 seconds after the beginning of the call*/ 473 s->req_vfu=TRUE; 474 } 468 475 if (s->req_vfu){ 469 476 pict.pict_type=FF_I_TYPE; … … 481 488 if (error<=0) ms_warning("ms_AVencoder_process: error %i.",error); 482 489 else{ 490 s->framenum++; 483 491 if (c->coded_frame->pict_type==FF_I_TYPE){ 484 492 ms_message("Emitting I-frame");
Note: See TracChangeset
for help on using the changeset viewer.
