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

chenjun zjuchenjun at hotmail.com
Thu Jan 18 04:25:05 PST 2007


Hi,
 
I replace "non-blocking fashion " with a "while" sentence like : while(HasItemForH264==0) for experiment;
 
In client, i implemented:[root at localhost ~]# mplayer rtsp://10.13.72.91:8554/H264LiveVideoTest
 
(The result is :)
 
MPlayer 1.0rc1-3.2.3 (C) 2000-2006 MPlayer TeamCPU: Intel(R) Pentium(R) 4 CPU 3.06GHz (Family: 15, Model: 4, Stepping: 9)CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
Playing rtsp://10.13.72.91:8554/H264LiveVideoTest.Resolving 10.13.72.91 for AF_INET6...Couldn't resolve name for AF_INET6: 10.13.72.91Connecting to server 10.13.72.91[10.13.72.91]: 8554...rtsp_session: unsupported RTSP server. Server type is 'unknown'.STREAM_LIVE555, URL: rtsp://10.13.72.91:8554/H264LiveVideoTestStream not seekable! file format detected.Initiated "video/H264" RTP subsession on port 32770demux_rtp: Guessed the video frame rate as 16 frames-per-second.        (If this is wrong, use the "-fps <frame-rate>" option instead.)VIDEO:  [H264]  0x0  0bpp  16.000 fps    0.0 kbps ( 0.0 kbyte/s)It seems there is no Xvideo support for your video card available.Run 'xvinfo' to verify its Xv support and read DOCS/HTML/en/video.html#xv!See 'mplayer -vo help' for other (non-xv) video out drivers. Try -vo x11==========================================================================Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec familySelected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)==========================================================================Audio: no soundStarting playback...Error while decoding frame![h264 @ 0x87b73f4]non existing PPS referenced[h264 @ 0x87b73f4]decode_slice_header errorError while decoding frame!Error while decoding frame!,?% 0 0[h264 @ 0x87b73f4]non existing PPS referenced[h264 @ 0x87b73f4]decode_slice_header errorError while decoding frame!Error while decoding frame!,?% 0 0Error while decoding frame!,?% 0 0V:   0.1   6/  6 ??% ??% ??,?% 0 0
 
Would you please give some suggestions about this result?
 
Thanks very much! 
 


From: zjuchenjun at hotmail.comTo: live-devel at ns.live555.comDate: Thu, 18 Jan 2007 12:58:39 +0800Subject: Re: [Live-devel] "createNewStreamSource()" member function


Hi Ross, I want to ask another question before you answer my previous question :) In DeviceSource::doGetNextFrame() ,it mentiond a "non-blocking fashion ", I read the maillist and  write my own code ,but it doesn't work. Where is my fault?  Thanks in advance. void H264VideoStreamDiscreteFramer::doGetNextFrame() {  //**************************non-blocking fashion**************************//while(1){   envforH264->taskScheduler().doEventLoop(HasItemForH264);   pthread_mutex_lock(&mutexforH264);        if(*HasItemForH264==99)        {                  deliverFrame();                * HasItemForH264=0;        }                        pthread_mutex_unlock(&mutexforH264);                       sleep(1);            }                   //if (0 /* the source stops being readable */) { //   handleClosure(this); //  return; // }   }


From: zjuchenjun at hotmail.comTo: live-devel at ns.live555.comDate: Wed, 17 Jan 2007 10:35:24 +0800Subject: Re: [Live-devel] "createNewStreamSource()" member function

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 Mail。 Windows Live Mail 

率先尝试 Windows Live Mail。 Windows Live Mail 
_________________________________________________________________
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/20070118/4061524f/attachment.html 


More information about the live-devel mailing list