[Live-devel] call doGetNextFrame() problem!

chenjun zjuchenjun at hotmail.com
Sun Feb 4 00:07:19 PST 2007


Hi Ross,
 
I am sorry to trouble you again! I hope this will be the last question.
 
I think I have solved the doEventLoop "delay" problem with your helps,thanks.
 
But another problem came out:
 
The program runs fine at the beginning. However, a few minutes later, the doGetNextFrame()
 
function is called abnormal: After delivering the data, it delays a few seconds, and then call
 
doGetNextFrame(). In a normal way, I think it should be called immediately after delivering the 
 
data.This lead to my client's playing speed slow down. I have tried both mplayer and openrtsp
 
in the client, and got the same result. Can you give me some hints?
 
Thanks
 
 
My code:
 
void H264VideoStreamDiscreteFramer::doGetNextFrame() { 
  dummyTask(Null);
  envforH264->taskScheduler().doEventLoop(HasItemForH264);         deliverFrame();               }
 
void  H264VideoStreamDiscreteFramer::deliverFrame(){    if (!isCurrentlyAwaitingData()) return; // we're not ready for the data yet
pthread_mutex_lock(mutexforH264);
  if(*HasItemForH264==99){
        fFrameSize=*LengthForH264;         //LengthForH264 is defined in another thread             if (fFrameSize > fMaxSize) {   fNumTruncatedBytes = fFrameSize - fMaxSize;   fFrameSize = fMaxSize;  }                    memcpy(fTo, BufferForH264, fFrameSize);     //BufferForH264 is defined in another thread        * HasItemForH264=0;
   } pthread_mutex_unlock(mutexforH264);          // After delivering the data, inform the reader that it is now available:  FramedSource::afterGetting(this);  }
_________________________________________________________________
通过 Windows Live Messenger 表达您自己!
http://get.live.com/messenger/overview
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20070204/f42acf0e/attachment.html 


More information about the live-devel mailing list