[Live-devel] "createNewStreamSource()" member function

chenjun zjuchenjun at hotmail.com
Tue Jan 16 18:35:24 PST 2007


Hi ROSS,
Thanks for your reply!
I had defined "H264VideoStreamDiscreteFramer" to be a subclass of ""H264VideoStreamFramer".And the class "H264VideoStreamDiscreteFramer" included 
two member function(I read your reply in maillist):void H264VideoStreamDiscreteFramer::doGetNextFrame(),
                                 Boolean  H264VideoStreamDiscreteFramer::currentNALUnitEndsAccessUnit().
Is it right ?
 
According to your reply, I rewrite my code like this :
 
//************************************************************************************************************************************//FramedSource* H264VideoLiveServerMediaSubsession::createNewStreamSource(unsigned /*clientSessionId*/, unsigned& estBitrate) {
  estBitrate = 320; // kbps, estimate ; see my notebook
 
  // Create the video source:H264VideoStreamDiscreteFramer *liveSource     =H264VideoStreamDiscreteFramer::createNew(*env_H264,  NULL, buffers_H264, length_H264, bufferhasitem_H264, mutex_H264);   if (liveSource == NULL)  return NULL;       return  liveSource;  }//***********************************************************************************************************************************//
 
Is it right?
 


Date: Tue, 16 Jan 2007 06:13:07 -0800To: live-devel at ns.live555.comFrom: finlayson at live555.comSubject: Re: [Live-devel] "createNewStreamSource()" member function



 return H264VideoStreamFramer::createNew(envir(),liveSource); 

You can't do this, because "H264VideoStreamFramer" is a virtual base class.  Instead, you should define your own class "H263VideoStreamDiscreteFramer" to be a subclass of ""H264VideoStreamFramer".  Then, your "H263VideoStreamDiscreteFramer" object can be the value returned by your implementation of "createNewStreamSource()".-- 

Ross FinlaysonLive Networks, Inc.http://www.live555.com/
_________________________________________________________________
Windows Live Safety Center 为您的计算机提供免费的安全扫描服务。
http://safety.live.com/site/ZH-CN/default.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20070116/fabd8873/attachment.html 


More information about the live-devel mailing list