<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 9pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>Hi,<BR>
<BR>
I replace "non-blocking fashion " with a "while" sentence like : while(HasItemForH264==0) for experiment;<BR>
<BR>
In client, i implemented:[root@localhost ~]# mplayer rtsp://10.13.72.91:8554/H264LiveVideoTest<BR>
<BR>
(The result is :)<BR>
<BR>
MPlayer 1.0rc1-3.2.3 (C) 2000-2006 MPlayer Team<BR>CPU: Intel(R) Pentium(R) 4 CPU 3.06GHz (Family: 15, Model: 4, Stepping: 9)<BR>CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1<BR>Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2<BR>
Playing rtsp://10.13.72.91:8554/H264LiveVideoTest.<BR>Resolving 10.13.72.91 for AF_INET6...<BR>Couldn't resolve name for AF_INET6: 10.13.72.91<BR>Connecting to server 10.13.72.91[10.13.72.91]: 8554...<BR>rtsp_session: unsupported RTSP server. Server type is 'unknown'.<BR>STREAM_LIVE555, URL: rtsp://10.13.72.91:8554/H264LiveVideoTest<BR>Stream not seekable!<BR> file format detected.<BR>Initiated "video/H264" RTP subsession on port 32770<BR>demux_rtp: Guessed the video frame rate as 16 frames-per-second.<BR> (If this is wrong, use the "-fps <frame-rate>" option instead.)<BR>VIDEO: [H264] 0x0 0bpp 16.000 fps 0.0 kbps ( 0.0 kbyte/s)<BR>It seems there is no Xvideo support for your video card available.<BR>Run 'xvinfo' to verify its Xv support and read DOCS/HTML/en/video.html#xv!<BR>See 'mplayer -vo help' for other (non-xv) video out drivers. Try -vo x11<BR>==========================================================================<BR>Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family<BR>Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)<BR>==========================================================================<BR>Audio: no sound<BR>Starting playback...<BR>Error while decoding frame!<BR>[h264 @ 0x87b73f4]non existing PPS referenced<BR>[h264 @ 0x87b73f4]decode_slice_header error<BR>Error while decoding frame!<BR>Error while decoding frame!,?% 0 0<BR>[h264 @ 0x87b73f4]non existing PPS referenced<BR>[h264 @ 0x87b73f4]decode_slice_header error<BR>Error while decoding frame!<BR>Error while decoding frame!,?% 0 0<BR>Error while decoding frame!,?% 0 0<BR>V: 0.1 6/ 6 ??% ??% ??,?% 0 0<BR>
<BR>
Would you please give some suggestions about this result?<BR>
<BR>
Thanks very much! <BR><BR>
<BR><BR><BR><BR> <BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #008080 2px solid; MARGIN-RIGHT: 0px">
<HR id=EC_stopSpelling>
From: zjuchenjun@hotmail.com<BR>To: live-devel@ns.live555.com<BR>Date: Thu, 18 Jan 2007 12:58:39 +0800<BR>Subject: Re: [Live-devel] "createNewStreamSource()" member function<BR><BR>
<META content="Microsoft SafeHTML" name=Generator>
<STYLE>
.ExternalClass P
{padding:0px;}
.ExternalClass
{font-size:9pt;font-family:Tahoma;}
</STYLE>
Hi Ross,<BR> <BR>I want to ask another question before you answer my previous question :)<BR> <BR>In DeviceSource::doGetNextFrame() ,it mentiond a "non-blocking fashion ", I read the maillist and <BR> <BR>write my own code ,but it doesn't work. Where is my fault? <BR> <BR>Thanks in advance.<BR> <BR>void H264VideoStreamDiscreteFramer::doGetNextFrame()<BR> {<BR> <BR><BR>//**************************non-blocking fashion**************************//<BR>while(1){<BR> <BR> envforH264->taskScheduler().doEventLoop(HasItemForH264);<BR><BR> pthread_mutex_lock(&mutexforH264);<BR> <BR> if(*HasItemForH264==99)<BR> {<BR> deliverFrame();<BR> * HasItemForH264=0;<BR> } <BR> <BR> pthread_mutex_unlock(&mutexforH264); <BR> <BR> sleep(1);<BR> <BR> } <BR> <BR> //if (0 /* the source stops being readable */) {<BR> // handleClosure(this);<BR> // return;<BR> // }<BR> <BR> <BR>}<BR><BR><BR><BR><BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #008080 2px solid; MARGIN-RIGHT: 0px">
<HR id=EC_EC_stopSpelling>
From: zjuchenjun@hotmail.com<BR>To: live-devel@ns.live555.com<BR>Date: Wed, 17 Jan 2007 10:35:24 +0800<BR>Subject: Re: [Live-devel] "createNewStreamSource()" member function<BR><BR>
<STYLE>
.ExternalClass P
{padding:0px;}
.ExternalClass
{font-size:9pt;font-family:Tahoma;}
</STYLE>
<FONT size=2>Hi ROSS,</FONT><BR><FONT size=2>Thanks for your reply!</FONT><BR><FONT size=2>I had defined "H264VideoStreamDiscreteFramer" to be a subclass of ""H264VideoStreamFramer".And the class "H264VideoStreamDiscreteFramer" included </FONT><BR><FONT size=2>two member function(I read your reply in maillist):void H264VideoStreamDiscreteFramer::doGetNextFrame(),</FONT><BR><FONT size=2> </FONT><FONT size=2> Boolean H264VideoStreamDiscreteFramer::currentNALUnitEndsAccessUnit().</FONT><BR><FONT size=2>Is it right ?</FONT><BR><FONT size=2> </FONT><BR><FONT size=2>According to your reply, I rewrite my code like this :</FONT><BR><FONT size=2></FONT> <BR><FONT size=2>//***********************************************************************************************! *************************************//<BR>FramedSource* H264VideoLiveServerMediaSubsession<BR>::createNewStreamSource(unsigned /*clientSessionId*/, unsigned& estBitrate) {</FONT><BR><FONT size=2> estBitrate = 320; // kbps, estimate ; see my notebook</FONT><BR><FONT size=2></FONT> <BR><BR><FONT size=2> // Create the video source:<BR>H264VideoStreamDiscreteFramer *liveSource<BR> =H264VideoStreamDiscreteFramer::createNew(*env_H264, NULL, buffers_H264, length_H264, bufferhasitem_H264, mutex_H264);<BR> if (liveSource == NULL) return NULL;<BR> <BR> return liveSource;<BR> <BR>}<BR><BR>//***********************************************************************************************************************************//</FONT><BR><FONT size=2></FONT> <BR><FONT size=2>Is it right?</FONT><BR><FONT size=3></FONT> <BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #008080 2px solid; MARGIN-RIGHT: 0px">
<HR id=EC_EC_EC_stopSpelling>
Date: Tue, 16 Jan 2007 06:13:07 -0800<BR>To: live-devel@ns.live555.com<BR>From: finlayson@live555.com<BR>Subject: Re: [Live-devel] "createNewStreamSource()" member function<BR><BR>
<STYLE>
.ExternalClass blockquote, .ExternalClass dl, .ExternalClass ul, .ExternalClass ol, .ExternalClass li
{padding-top:0;padding-bottom:0;}
</STYLE>
<BLOCKQUOTE><FONT face="Times New Roman"> return H264VideoStreamFramer::createNew(envir(),liveSource); </FONT></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>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()".</DIV><PRE>--
</PRE>
<DIV><BR>Ross Finlayson<BR>Live Networks, Inc.<BR>http://www.live555.com/</DIV></BLOCKQUOTE><BR>
<HR>
率先尝试 Windows Live Mail。 <A href="http://http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d" target=_blank>Windows Live Mail</A> </BLOCKQUOTE><BR>
<HR>
率先尝试 Windows Live Mail。 <A href="http://http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d" target=_blank>Windows Live Mail</A> </BLOCKQUOTE><br /><hr />率先尝试 Windows Live Mail。 <a href='http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d' target='_new'>Windows Live Mail</a></body>
</html>