[Live-devel] Access violation in StramParser::testBytes()

Shaheed Abdol Shaheed at scansoft.co.za
Thu Sep 6 05:39:06 PDT 2012


Thank you Ross,
 
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.
 
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.
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:
[code]
 
//Assume that info.isDiscrete = false, and m_codec = CODEC_ID_H264 for
this case
 
FramedSource *
COnDemandVideoInputSubsession::createNewStreamSource(unsigned int
clientSessionID, unsigned& estBitrate)
{
 estBitrate = 500; //Not really hard coded, but not relevant to question
 InputDeviceSource * ids = InputDeviceSource::createNew(envir(),
m_deviceParams);  //assume that m_deviceParams contains pointer to frame
queue
 
 switch (m_codec)
 { //checking if the stream is discrete, or elementary
 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)
  {
   estBitrate = 1500; //higher bitrate for "high-def" streams
(irrespective of the true throughput)
 
   if (info.isDiscrete)
    m_framedSource = H264VideoStreamDiscreteFramer::createNew(envir(),
ids);
   else
   {
    MPEG1or2Demux * mpegDemux = MPEG1or2Demux::createNew(envir(), ids);
    MPEG1or2DemuxedElementaryStream * pesSource =
mpegDemux->newVideoStream(); //same as using raw pes stream.
    m_framedSource = H264VideoStreamFramer::createNew(envir(),
pesSource);//MPEG2TransportStreamFramer::createNew(envir(), ids);//
   }
  }
  break;
 case CODEC_ID_MPEG4:
  {
   if (info.isDiscrete)
    m_framedSource = MPEG4VideoStreamDiscreteFramer::createNew(envir(),
ids);
   else
    m_framedSource = MPEG4VideoStreamFramer::createNew(envir(), ids);
  }
  break;
 }
 
 return m_framedSource;
 }
[/code]
 
The corresponding H264VideoRTPSink is created in the derived
createNewRTPSink function. Could you think of a quicker method for me to
acheive the same result?
 
Thank you
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120906/57b978a1/attachment.html>


More information about the live-devel mailing list