[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ccrtp-devel] RTPDuplex & RTPSessions
From: |
j.s.bach |
Subject: |
[Ccrtp-devel] RTPDuplex & RTPSessions |
Date: |
Tue, 13 May 2008 10:42:18 +0200 (CEST) |
Hello,
i just tried to use the RTPDuplex Class for my implementation as i am merging a
sender and a receiver.
Mainly it looks like:
// first send stream
if(this->anno_fstream != NULL){
while(!this->anno_fstream->eof()){
this->anno_fstream->read(reinterpret_cast<char *>(buffer),
PACKET_SIZE) ;
rtp_socket->putData(PACKET_SIZE*i, buffer, PACKET_SIZE) ;
Thread::sleep(TimerPort::getTimer()) ;
TimerPort::incTimer(PERIOD) ;
i++ ;
}
}
// then receive stream
for(i=0 ; true ; i++){
const AppDataUnit* adu;
do{
adu = rtp_socket->getData(rtp_socket->getFirstTimestamp()) ;
if(adu == NULL){
Thread::sleep(5) ;
}
else cout << "." ;
} while( (adu == NULL) || (adu->getSize() <=0)) ;
dump_file->write((char *)adu->getData(), adu->getSize()) ;
Thread::sleep(TimerPort::getTimer()) ;
TimerPort::incTimer(PERIOD);
}
To my surprise RTPDuplex doesn't send and receive any rtp packets even if the
connect method doesn't
deliver any errors.. I've read in couple of previous threads which are telling
the RTPDuplex is not supported/maintained anymore.
What i wonder is, what is the difference of RTPDuplex from RTPSession? Does it
mean that normal
RTPSession classes are one-directional sockets? Isn't it possible to use a
normal RTPSession object to
send and receive rtp packets at the same time? What does RTPDuplex offers that
other not do?
Thanx in advance,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ccrtp-devel] RTPDuplex & RTPSessions,
j.s.bach <=