[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ccrtp-devel] Forward RTP Packets using ccRTP

From: David Sugar
Subject: Re: [Ccrtp-devel] Forward RTP Packets using ccRTP
Date: Tue, 30 Jan 2007 19:18:55 -0500
User-agent: Thunderbird (X11/20061219)

Actually I had thought about doing a proxying method in the stack.
Basically you have to do things like figure out the relative timestamp
difference and sequence numbering correctly to paste packets directly
from one stream into another.  There are a few other things which
probably should be done to make the headers correct on the new
destination, especially if proxy gluing a new source mid-session.

magtec80 wrote:
> HI everybody,
> This is what I am trying to do:
> agent A sends RTP packets to agent B, Agent B will need play this stream,
> but will forward the packets to agent C that will play the stream.
> Here are two ways that I used, both compiled and ran, but the it seems that
> the forwarded packets were not in the right format, so that I hear nothing
> or cracks.
> first way:
> for( int i=0 ; true ; i++ ){
>               const AppDataUnit* adu;
>               do{
>                       adu = 
> socket_rec->getData(socket_rec->getFirstTimestamp());
>                       if ( NULL == adu )
>                               Thread::sleep(5);
>               }while ( (NULL == adu) || (adu->getSize() <= 0) );
>               socket_trans->putData( (adu->getSize())*i, adu->getData(),
> adu->getSize());
>               Thread::sleep(TimerPort::getTimer());
>               TimerPort::incTimer(PERIOD);
> }
> adu->getData() gives the data in "const uint8 *const" which is suitable for
> playing on speakers, but not to be sent on the network.
> To get the raw packets that can be sent on the network, I created a subclass
> of RTPSession, and implmented the virtual method 
> onRTPPacketRecv(IncomingRTPPkt & pkt) {
> RTPSEssion::onRTPPacketRecv(pkt);
> socket_trans->putData( pktSize*i, pkt->getRawPacketData(), pktSize);
> cout<<"t";
> }
> this method will be called once a packet is received, and it worked, but the
> forwared packets were not playing.
> Can someone help with that? is that there a way you might know to do this
> task.
> Thanks,

Attachment: dyfet.vcf
Description: Vcard

reply via email to

[Prev in Thread] Current Thread [Next in Thread]