[Live-devel] Question about trick play, server side

Jonathan Granade edi87 at fibertel.com.ar
Sun Dec 19 16:54:53 PST 2010


Ross,

I finally make it working. I have a weird behavior with VLC, but I'm 
trying to fix it.

I did it adding to the afterPlayingStreamState function (in 
OnDemandServerMediaSubsession), a call to seekStream, to the position 0 
and a call to RTPSink->startPlaying().

The problem that I had with VLC was that the stream (a 10 secs mpg 
video+audio) starts correctly, then when this ends, the audio stream 
loops and start again, but the video hang in the last frame...
Later,  when the audio stream ends again, both streams (audio+video) 
loops and everything starts again.

It only happen with VLC, I tried with openRTSP and MPlayer and it works 
fine.

I debug a bit and I found that sometimes the audio stream ends first 
(afterPlayingStreamState of the audio StreamState object is called 
first), so it loops and video stream (video StreamState object) appear 
to never call afterPlayingStreamState function the first time, it got 
called second time, and again, on the thirth loop it's not called and on 
the fourth loop it's got called.

If you can give me any pointer about what could be happen, I will 
appreciate it.

I'm working on it, and hopefully I will send you a patch with the new 
objects to make a looping stream (if interested).

Thanks in advance,

Jonathan

On 12/11/2010 04:32 AM, Ross Finlayson wrote:
>> Now the problem is where to make the stream to loop to the start of
>> file... you said:
>>
>> "You could do this, but you'd need to write a new "FramedFilter"
>> subclass that sits
>> in front of your "ByteStreamFileSource" class (and presents the
>> illusion of delivering a single, unbroken stream to the downstream
>> object (a "MPEG2TransportStreamFramer"))"
>>
>> I can't understand why FramedFilter subclass should be used
>
> An alternative - which might be simpler for you - would be to write a
> new class (e.g. called "ContinuousByteStreamFileSource") that duplicates
> much of the functionality (and code) of the existing
> "ByteStreamFileSource" - except that it reads from its file continously
> - and just use this instead of "ByteStreamFileSource".
>
> I.e, you would define your own subclass of
> "OnDemandServerMediaSubsession" that would be identical to the existing
> "MPEG2TransportFileServerMediaSubsession", except that it use a
> "ContinuousByteStreamFileSource" as input instead of a
> "ByteStreamFileSource".
>
> As always, you should *not* need to modify any of the existing code.


More information about the live-devel mailing list