[Live-devel] push and pull streaming
Ross Finlayson
finlayson at live555.com
Fri Dec 14 22:43:27 PST 2007
>I read in the FAQ section that it is possible to modify the
> test*Streamer application to stream from an Mpeg encoder. Doing
>that change will switch the library from a pulling to pushing
>streaming model.
No. The library always works by having each downstream object call
its upstream object, asking for data. However, when you're streaming
from a live source (such as an encoder), the key point to note is
that the arrival of data from the live source is best handled as an
event in the event loop (rather than a synchronous read). In any
case, the live source is encapsulated in a subclass (that you would
write) of "FramedSource", and new data is delivered to the downstream
object in your implementation of the virtual function
"doGetNextFrame()".
>I'm also concerned by the fact that a hardware encoder might have a
>different system clock (hardware based) than the library which seems
>to be CPU based?
This should not be a problem. If - in your "FramedSource" subclass -
you *don't* set the "fDurationInMicroseconds" field. By not setting
this field, it remains at its default value of 0, and the (RTP) sink
object will ask for new data immediately after it sends a packet.
--
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/20071214/b8666a2a/attachment-0001.html
More information about the live-devel
mailing list