>> The right place to be scheduling a new 'playing' task is in your 
>> 'after playing' function - i.e., the function that you passed as a 
>> parameter when you called "startPlaying()" on your "FileSink" 
>> subclass.  That 'after playing' function will get called,
>> automatically, when writes to the file fail (or if the input stream 
>> closes) - as a result of the call to "onSourceClosure(this);".  So 
>> that's where you should be scheduling your new task.
> 
> Initially we were scheduling in afterPlaying function, but your suggestion of
> reordering sets fAfterFunc to NULL in MediaSink::stopPlaying() before it gets
> called in MediaSink::onSourceClosure().
> We think the correct behavior would be to call stopGettingFrames on fSource

Yes, I agree.  In the next version of the software, this piece of code - in 
"FileSink::afterGettingFrame()" - will become:

  if (fOutFid == NULL || fflush(fOutFid) == EOF) {
    // The output file has closed.  Handle this the same way as if the input 
source had closed:
    if (fSource != NULL) fSource->stopGettingFrames();
    onSourceClosure(this);
    return;
  }


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to