ccrtp-devel
[Top][All Lists]
Advanced

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

Re: [Ccrtp-devel] A newbie question about receiver report


From: Federico Montesino Pouzols
Subject: Re: [Ccrtp-devel] A newbie question about receiver report
Date: Sat, 12 Nov 2005 14:15:56 +0100
User-agent: Mutt/1.5.11

Hi, after a quick look at the code, I think the problem is your main
loop exits when there are no packets in the reception queue. Suppose
your program starts and no packet has been receive before:

>         while(socket->isWaiting()) {
>              receive(socket);
>         }

And suppose a number of packets are available, but after processing
them the queue becomes empty. I would try an infinite loop like
"for(;;)".

On Sun, Nov 06, 2005 at 09:27:26AM +0800, ?? ???Z wrote:
> 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?????M?W??????????????  
> http://messenger.yahoo.com.tw/beta.html
> 
> 
> _______________________________________________
> Ccrtp-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/ccrtp-devel




reply via email to

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