[vlc] Re: Using vlc to show video through another app

Chhaya, Harshal hchhaya at ti.com
Tue Jul 6 22:34:35 CEST 2004


> You may save the incoming stream to a file and send it 
> afterwards to VLC, so you have a chance to see, if VLC 
> accepts the stream which you get over the serial link.

Felix,

Thanks for this suggestion. I tried this approach and confirmed
that vlc can play the file if I save it to disk first.

I also tried starting vlc while the file was being written
thinking that it will continue to read the file as it was being
updated and play the entire movie. But I think vlc calculates
the length of the movie when it starts up and so it plays only
the part that was on the disk when vlc was launched. It ignores
the rest of the file.

> Is the stream which you send packed in a transport stream 
> e.g. MPEG2-TS? I wouldn't prefer to use an avi-container.

I tried both MPEG and AVI with the same result - the receive
side runs out of data buffers.

If an MPEG file is encoded for a specific data rate, how will
VLC react if it arrives at a faster rate? I think VLC stops reading
if a packet arrives too soon which causes the back-up.

I am now contemplating a couple of different approaches to solve
this problem:

- use a multi-threaded application where one thread reads the data
off the network as fast as it arrives and puts it in a large buffer.
The other thread passes the data from this buffer to vlc via the
fwrite. I am hoping that with a large enough buffer, I may be able
to avoid the buffer overrun problem.

- the second option is to modify the vlc source code to add a module
that reads from this USB interface and passes the data to the
appropriate
decoder. I am a little hesitant to do this because I haven't studied
the vlc code yet and I have only a few days to make this work.

If there is some other approach I should consider, feel free to suggest
it.

Thanks,
Harshal

-- 
This is the vlc mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/support/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc mailing list