From: <sb...@us...> - 2008-02-04 22:50:26
|
Revision: 1339 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1339&view=rev Author: sbalea Date: 2008-02-04 14:50:20 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Full video frames should be sent whenever the 15 bits video timestamp rolls over Modified Paths: -------------- trunk/lib/libiax2/src/iax.c Modified: trunk/lib/libiax2/src/iax.c =================================================================== --- trunk/lib/libiax2/src/iax.c 2008-02-01 16:19:08 UTC (rev 1338) +++ trunk/lib/libiax2/src/iax.c 2008-02-04 22:50:20 UTC (rev 1339) @@ -167,6 +167,8 @@ unsigned int last_ts; /* Last transmitted timestamp */ unsigned int lastsent; + /* Timestamp of the last transmitted video frame */ + unsigned int lastvsent; #ifdef USE_VOICE_TS_PREDICTION /* Next predicted voice ts */ unsigned int nextpred; @@ -641,10 +643,7 @@ if(ms <= session->lastsent) ms = session->lastsent + 3; #endif - } else if (video) { - if ((unsigned int)ms <= session->lastsent) - ms = session->lastsent + 3; - } else { + } else if ( !video ) { /* On a dataframe, use last value + 3 (to accomodate jitter buffer shrinking) if appropriate unless it's a genuine frame */ if (genuine) { @@ -1102,7 +1101,7 @@ /* Bitmask taken from chan_iax2.c... I must ask Mark Spencer for this? I think not... */ if ( f->frametype == AST_FRAME_VIDEO ) { - if (((fts & 0xFFFF8000L) == (lastsent & 0xFFFF8000L)) + if (((fts & 0xFFFF8000L) == (pvt->lastvsent & 0xFFFF8000L)) /* High two bits are the same on timestamp, or sending on a trunk */ && ((f->subclass & ~0x01) == pvt->svideoformat) /* is the same type */ ) @@ -1117,6 +1116,7 @@ now = 0; sendmini = 0; } + pvt->lastvsent = fts; } /* if requested, force a full frame */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |