[Live-devel] 答复: regardint every rtp packet's timestamp is same

梦幻工作室 fantasyvideo at 126.com
Thu Sep 13 03:34:39 PDT 2012


My createNewStreamSource code is like this:

{

estBitrate = 64;

return new AudioFramedSource(envir(),”test”);

}

 

And the AudioFrameSource main code is like this:

void AudioFrameSource::doGetNextFrame()

{

 
CamerManager::GetInstance()->GetAudioFrame(“test”,(char*)fTo,fMaxSize,&fFr
ameSize,&fNumTruncatedBytes);

fPresentationTime.tv_sec=usec/1000;

fPresentationTime.tv_usec = usec%1000;

usec+=200;

 
nextTask()=envir().taskScheduler().scheduleDelayedTask(0,(TaskFunc*)FramedSo
urce::afterGetting,this);

 

}

But even if I add the fPresentationTime, vlc still can’t play it. But the
mplayer can play.

发件人: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] 代表 Ross Finlayson
发送时间: 2012年9月13日 17:34
收件人: LIVE555 Streaming Media - development & use
主题: Re: [Live-devel] regardint every rtp packet's timestamp is same

 

I used live555 to stream g711, My code is like this:

RTPSink* AudioOnDemandMediaSubsession::createNewRTPSink(Groupsock*
rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource*
inputSource)

{

   char const* mimeType=”PCMU”;

         unsigned char payloadFormatCode=0;

int sampleFrequency = 8000;

unsigned int numChannels = 1;

return
SimpleRTPSink::Create(envir(),rtpGroupsock,payloadFormatCode,sampleFrequency
,”audio”,mimeType,numChannels);

}

 

This looks OK.  But what about your "createNewStreamSource()"
implementation??

 





In another side, I use VLC to access, but I found that every rtp packet’s
timestamp is same.

 

That's probably because you are not setting "fPresentationTime" correctly in
your input source class - i.e., the class that encapsulates your G.711 audio
source.  You haven't said anything about this...

Ross Finlayson
Live Networks, Inc.
 <http://www.live555.com/> http://www.live555.com/ 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120913/4b0021bd/attachment-0001.html>


More information about the live-devel mailing list