A newbie question about receiver report

陳 祐凡 <[email protected]>
Newsgroups gmane.comp.gnu.ccrtp.devel
Message-ID <[email protected]>
Hi:
 I write a simple program to receive rtp packets from
a ip cam(SNC-DF40N).  However, my program can't
receive
 packets continually.  Do I forget anythine esle?

Thanks for help.

Jeff


my source: (If I use JRTPLIB, it can work fine)
--------------------------------------------------------------------------
#include <iostream>
#include <cstdlib>     
#include <ccrtp/rtp.h>

using namespace std;
using namespace ost;

void receive(RTPSession *socket)
{
        int ts = socket->getFirstTimestamp();
        const AppDataUnit* adu;
        adu = socket->getData(ts);
        if ( adu != NULL ) {
                cout<<"packet type:
"<<adu->getType()<<endl;
        }
        delete adu;
}
int main()
{
        RTPSession *socket = new
RTPSession(InetHostAddress("0.0.0.0"), 30000);
       
socket->addDestination(InetHostAddress("192.168.4.100"),
50000);
        socket->startRunning();
            
        while(socket->isWaiting()) {
             receive(socket);
        }
        
        delete socket;
}


___________________________________________________   Yahoo!嗉餅r蝐 7.0 beta頧蝜皝  http://messenger.yahoo.com.tw/beta.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.