[Live-devel] startPlaying - stopPlaying - startPlaying issues
David BERTRAND
bidibulle at operamail.com
Tue Feb 14 16:24:42 PST 2006
Ross,
I found another issue regarding cascading calls to startPlaying and stopPlaying on the same RTP source.
In MultiFramedRTPSource::doStopGettingFrames() a reset of the ReorderingPacketBuffer should be done so tat you can restart playing again the same source without waiting for an old "NextExpectedSeqNo" or using an old "fHeadPacket".
I suggest the following patch :
- a new reset() member of ReorderingPacketBuffer :
void ReorderingPacketBuffer::reset() {
if (fHeadPacket == NULL) {
delete fSavedPacket;
} else {
delete fHeadPacket; // will also delete fSavedPacket, because it's on the list
}
fHaveSeenFirstPacket = False;
fHeadPacket = NULL;
fSavedPacket = NULL;
}
-a call to this new reset() method in MultiFramedRTPSource::doStopGettingFrames() :
void MultiFramedRTPSource::doStopGettingFrames() {
fRTPInterface.stopNetworkReading();
fAreDoingNetworkReads = False;
// David 14/02/06 : proposed patch to liveMedia library
fReorderingBuffer->reset();
}
Thanks in advance for your feedback.
David
> 1) If my RTPSource is a MultiFramedRTPSource (e.g H263plusVideoRTPSource):
> -the first sink->startPlaying(source) calls RTPInterface->startNetworkReading : OK
> -then, the sink->stopPlaying() call does RTPInterface->stopNetworkReading : OK
> -then, the second sink->startPlaying doesn't call RTPInterface->startNetworkReading : NOK !
> This is because variable "fAreDoingNetworkReads" is never set to False except when the source is created or deleted. IMO, it should be set to False in MultiFramedRTPSource::doStopGettingFrames(). Is that right ??
Yes, that was a bug.
> 2) if my Source is an AMRDeinterleaver, the RTPInterface->startNetworkReading is done by the related rawAMRRTPSource when my sink starts playing, but the RTPInterface->stopNetworkReading is never done when I stop playing. This is because AMRDeinterleaver is not inherited from MultiFramedRTPSource but from FramedSource whose doStopGettingFrames does nothing. I guess something is missing regarding the RTPInterface when stopPlaying is called. Do you agree ?
Yes, that's another bug. The "AMRDeinterleaver" class should have reimplemented the virtual function "doStopGettingFrames()" (by calling "stopGettingFrames()" on the input source ("RawAMRRTPSource").
I've now installed a new version (2005.10.05) that fixes both of these bugs. Thanks for reporting these.
Ross Finlayson
Live Networks, Inc. (LIVE555.COM)
<http://www.live555.com/>
_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
--
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com
Powered by Outblaze
More information about the live-devel
mailing list