[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ccrtp-devel] Forward RTP Packets using ccRTP
From: |
magtec80 |
Subject: |
[Ccrtp-devel] Forward RTP Packets using ccRTP |
Date: |
Sun, 17 Dec 2006 01:39:53 -0000 |
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,
--
View this message in context:
http://www.nabble.com/Forward-RTP-Packets-using-ccRTP-tf2834130.html#a7912432
Sent from the Gnu - ccRTP - Dev mailing list archive at Nabble.com.
- [Ccrtp-devel] Forward RTP Packets using ccRTP,
magtec80 <=