ccrtp-devel
[Top][All Lists]
Advanced

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

[Ccrtp-devel] A newbie question about receiver report


From: 陳 祐凡
Subject: [Ccrtp-devel] A newbie question about receiver report
Date: Sun, 6 Nov 2005 09:27:26 +0800 (CST)

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




reply via email to

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