[Live-devel] SEEK handle patch

Alex zhang xiaoguizi at gmail.com
Fri Jan 14 10:01:18 PST 2005


Hi, Ross

Under the environment that we do SEEKING operation, Is there any
necessaries to get the "bufferedPacket" cleared avoid some packet that
unhandled but leaving in the "ReorderingPacketBufferring" , when do
SEEKING we will do as
"pauseMediaSession(&mySession);
 playMediaSession(&mySession, startPoint);"

but when we do pauseMediaSession, it will only require the Server stop
send packet to us, in the process, there maybe some new packetes
coming and we didn't handle it, so when we PLAY again, expect there
are new packetes begin at the SEEK point, but unlucky, old packet
coming first, so i suggest there should add a flag indicate the
"pauseMediaSession(&mySession);" is triggered by PAUSE or part of SEEK
operation, if it part of SEEK, we should clear the receive buffer that
is ReorderingPacketBufferring as below:
"
// Judge if this blong to a seek operation  
MediaSubsession* subsession;
MediaSubsessionIterator* iter;
iter = new MediaSubsessionIterator(session);
		
while ((subsession = iter->next()) != NULL) 
{
subsession->multiFramedSource()->cleaseReorderingPacketBuffer();
}

"

which "cleaseReorderingPacketBuffer()"is a public funtion do as below:
"
void MultiFramedRTPSource::cleaseReorderingPacketBuffer()
{
	fReorderingBuffer->releaseExistPacket();	
}

void ReorderingPacketBuffer::releaseExistPacket()
{
	while (fHeadPacket != NULL)
	{
		BufferedPacket* bufPacket = fHeadPacket;		
		releaseUsedPacket(bufPacket);
	}
}
"

that what i do, is there are any problem ,please let me know!


More information about the live-devel mailing list