<!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] Capturing video from
device</title></head><body>
<blockquote type="cite" cite><font face="Arial" size="-1">I am
imlementing live RTSP video streaming server which capture video from
live camera, encoded it in hardware and its output are NAL
units.</font><br>
</blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">I noticed
the DeviceSource template and got some questions about using
it.</font><br>
</blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">1.
Does my flow should be</font><br>
</blockquote>
<blockquote type="cite"
cite> <font face="Arial"
size="-1"> DevideSource::doGetNextFrame -> H264Framer
->H264RTPSinc.</font></blockquote>
<div><br></div>
<div>Yes, sort of. The data flow is:</div>
<div><x-tab> </x-tab>Your
source of NAL units -> Your subclass of H264VideoStreamFramer ->
H264VideoRTPSink</div>
<div><br></div>
<div><br></div>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">2. Does the
Framer is source or filter.</font></blockquote>
<div><br></div>
<div>"H264VideoStreamFramer", and thus the subclass of
"H264VideoStreamFramer" that you will write, is a
filter.</div>
<div><br></div>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">3. If my
encoder output is NAL units, what is the function of the
framer.</font></blockquote>
<div><br></div>
<div>Two things. First, you must implement the virtual function
"currentNALUnitEndsAccessUnit()", which returns True iff the
current NAL unit is the end of a complete video frame. Second,
you must set the "fPresentationTime" variable appropriately
for each NAL unit.</div>
<div><br></div>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">4. what is
the functionality that should be given to the
DevideSource::deliverFrame().</font></blockquote>
<div><br></div>
<div>Delivering a single NAL unit, in response to each call to
"doGetNextFrame()"</div>
<div><br></div>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">5. If my
camera got it frame rate (PAL 25 fps), how do I implemet
different farem rate using the schedualer.</font></blockquote>
<div><br></div>
<div>If your capture device delivers NAL units in 'real time', then
you don't have to do anything special. The NAL units will get
consumed at the rate at which they arrive.</div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div><br>
Ross Finlayson<br>
Live Networks, Inc.<br>
http://www.live555.com/</div>
</body>
</html>