> I need to stream a mkv in a loop, i know that I need to write my own 
> ByteStreamFileSource subclass

No, I don't recommend doing things this way.

Rather than defining a new class that would sit 'below' MatroskaFile (because, 
as you discovered, this would require a lot of code duplication), I recommend 
that you instead define a new class (a subclass of "FramedFilter", perhaps) 
that would sit *above* "MatroskaFile".

In particular, your new class would - when needed - create a new "MatroskaFile" 
object (to start reading from the underlying file all over again, and create 
demuxed track(s)).  When calling "getNextFrame()" on the demuxed track(s), it 
would set an appropriate 'onCloseFunc' that would be called when the end of the 
underlying file is reached.  At that point, you would just close the existing 
"MatroskaFile", and create a new one.

You should be able to do this without modifying (or duplicating) any of the 
"Matroska*" code.


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