[Live-devel] Streaming live h.264 video + PCM/ulaw from a fifo
Ross Finlayson
finlayson at live555.com
Fri Feb 3 00:38:07 PST 2012
> Then problem is combining audio+video. I think I did the audio incorrectly. I think it's doing a blocking read on my audio fifo and messing up the video since the whole shebang is single threaded. I think what I need is the ByteStream class which does async, that way it tells the scheduler to wait on available read data.
By default, reading from a "ByteStreamFileSource" object *is* asynchronous - unless you're running Windows (because Windows is brain damaged, and doesn't let you call "select()" on open files). So, if you're running Windows, you'll get asynchronous file reading if you switch to a real operating system :-)
But I'm not convinced that that is your problem. One important thing to get right if you're streaming multiple media types is presentation times - i.e., the "fPresentationTime" values that you set in your media source classes (when delivering each frame). These values *must* be properly synchronized, and *must* also be aligned with 'wall clock' time - i.e., the time that you'd get by calling "gettimeofday()".
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120203/1a997c0d/attachment.html>
More information about the live-devel
mailing list