[Live-devel] How to assign sinks to subsessions

Shaheed Abdol Shaheed at scansoft.co.za
Wed Feb 15 05:43:23 PST 2012


Good afternoon,
 
It took me the better part of two full working days, but I discovered
the solution. I would like to post the answer in case somebody else gets
stuck with it.
 
I am pulling data from an IP camera, then subclassing MediaSink class to
decode the data from the camera, then passing the data to a dialog which
displays the output and plays the sound chunks. When I try to play both
video and audio, then the video stream gets stuck, I can play the
individual streams perfectly. After meticulously making incremental
changes to discover the issue, I found that when playing audio using the
PortAudio library, it is required to call the PA_WriteStream(...)
function within a separate thread. The only reason the video was getting
stuck is due to some side-effect (unknown) of the way PortAudio writes
to the default sound device which is not compatible with the way in
which I am using live555.
 
To allow for a bit more clarity, I am using live555 to stream rtsp data,
ffmpeg to decode/transcode the streamed data, Direct3D to display video,
and PortAudio to play sound. With this toolchain it is essential to play
the audio in a seperate thread, else the video sink will lock up.
 
Thank you for all your assistance.
Regards
____________________________

Shaheed Abdol

 

Web: www.scansoft.co.za <http://www.scansoft.co.za/> 
Tel:  +27 21 913 8664
Cell: +27 79 835 8771
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120215/d529a882/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 32497 bytes
Desc: SST Email.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120215/d529a882/attachment-0001.png>


More information about the live-devel mailing list