[vlc-devel] [libVLC] Managing smem time needs

Antonin Delpeuch antonin at delpeuch.eu
Sat Jan 8 14:52:17 CET 2011


I'm using smem to send a stream into my application, and I'm coping with 
some latency problems.
I'm using the duplicate module to send the stream to my program and to 
the audio output both.
As you might know, VLC silently computes the time need for each module 
it uses. My problem is that
the time needed by the smem module is under-estimated, since most of the 
time is spent in the callback functions,
wich leads the stream to be outdated when it reaches the output module 
(each frame has a bad PTS).

The solutions are, I think :
- Manually change the PTS so that each audio frame has a fake PTS… I saw 
this solution in VLMC, but I'm not
sure it would be very clean or even reliable.
- Use threads ? VLC is already heavily multi-threaded, would I disturb 
the perfect schedule between modules by adding threads ?
- Register my code as a module ? It forces me to pack my program with a 
special build of VLC…

Any idea is welcome :-)


Antonin Delpeuch

More information about the vlc-devel mailing list