<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Scansoft</TITLE>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16447"></HEAD>
<BODY
style="BACKGROUND-COLOR: #e0e0e0; FONT-FAMILY: Trebuchet MS; COLOR: #005080; FONT-SIZE: 10pt"
background="" bgColor=#e0e0e0>
<DIV><SPAN class=691262512-06092012>Thank you Ross,</SPAN></DIV>
<DIV><SPAN class=691262512-06092012></SPAN> </DIV>
<DIV><SPAN class=691262512-06092012>I should at this point mention that I am
using the DeviceSource template you provided as a means to retreive "live"
footage from a DVR device. I am using the code on Windows, and am synchronizing
access to the frame queue using critical sections.</SPAN></DIV>
<DIV><SPAN class=691262512-06092012></SPAN> </DIV>
<DIV><SPAN class=691262512-06092012>For this specific case, I am passing the
data to live555 in chunks as large as possible - since it is not discrete
data. This seems to work well in that I can avoid the cost of locking for each
portion of data we need to dequeue.</SPAN></DIV>
<DIV><SPAN class=691262512-06092012>I was hoping you might be able to shed some
light on why this works as well as it does, since the MPEG1or2Demux code seems
to figuring out where the individual frames are within the data I pass to
live555. For brevity I have included my derived createNewStreamSource
function:</SPAN></DIV>
<DIV><SPAN class=691262512-06092012>[code]</SPAN></DIV>
<DIV><SPAN class=691262512-06092012></SPAN> </DIV>
<DIV><SPAN class=691262512-06092012>//Assume that info.isDiscrete = false, and
m_codec = CODEC_ID_H264 for this case</SPAN></DIV>
<DIV><SPAN class=691262512-06092012></SPAN> </DIV>
<DIV>FramedSource *
COnDemandVideoInputSubsession::createNewStreamSource(unsigned int
clientSessionID, unsigned& estBitrate)<BR>{<BR> estBitrate =
500; //<SPAN class=691262512-06092012>Not really hard coded, but not
relevant to question</SPAN><BR> InputDeviceSource * ids =
InputDeviceSource::createNew(envir(), m_deviceParams); //assume that
m_deviceParams contains pointer to frame queue</DIV>
<DIV> </DIV>
<DIV> switch (m_codec)<BR> { //checking if the stream is
discrete, or elementary<BR> case CODEC_ID_H264: //we have no way of
knowing if this is a discrete stream we are being fed (frame sizes seem pretty
uniform to me though)<BR> {<BR> estBitrate =
1500; //higher bitrate for "high-def" streams (irrespective of the true
throughput)</DIV>
<DIV> </DIV>
<DIV> if
(info.isDiscrete)<BR> m_framedSource =
H264VideoStreamDiscreteFramer::createNew(envir(),
ids);<BR> else<BR> {</DIV>
<DIV><SPAN class=691262512-06092012> </SPAN>MPEG1or2Demux<SPAN
class=691262512-06092012> * </SPAN>mpegDemux = MPEG1or2Demux::createNew(envir(),
ids);<BR> MPEG1or2DemuxedElementaryStream * pesSource =
mpegDemux->newVideoStream(); //same as using raw pes
stream.<BR> m_framedSource =
H264VideoStreamFramer::createNew(envir(),
pesSource);//MPEG2TransportStreamFramer::createNew(envir(),
ids);//<BR> }<BR> }<BR> break;<BR> case
CODEC_ID_MPEG4:<BR> {<BR> if
(info.isDiscrete)<BR> m_framedSource =
MPEG4VideoStreamDiscreteFramer::createNew(envir(),
ids);<BR> else<BR> m_framedSource =
MPEG4VideoStreamFramer::createNew(envir(),
ids);<BR> }<BR> break;<BR> }<BR> <BR> return
m_framedSource;<BR> }</DIV>
<DIV><SPAN class=691262512-06092012>[/code]</SPAN></DIV>
<DIV><SPAN class=691262512-06092012></SPAN> </DIV>
<DIV><SPAN class=691262512-06092012>The corresponding H264VideoRTPSink is
created in the derived createNewRTPSink function. Could you think of a quicker
method for me to acheive the same result?</SPAN></DIV>
<DIV><SPAN class=691262512-06092012></SPAN> </DIV>
<DIV><SPAN class=691262512-06092012>Thank you</SPAN></DIV>
<DIV><SPAN class=691262512-06092012>Regards</SPAN></DIV></BODY></HTML>