<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Re: [Live-devel] push and pull
streaming</title></head><body>
<blockquote type="cite" cite><font face="Arial" size="-1">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.</font></blockquote>
<div><br></div>
<div>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()".</div>
<div><br></div>
<div><br></div>
<blockquote type="cite" cite><font face="Arial" size="-1">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?</font></blockquote>
<div><br></div>
<div>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.</div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div><br>
Ross Finlayson<br>
Live Networks, Inc.<br>
http://www.live555.com/</div>
</body>
</html>