ccrtp-devel
[Top][All Lists]
Advanced

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

[Ccrtp-devel] Video streaming with ccRTP


From: victor cionca
Subject: [Ccrtp-devel] Video streaming with ccRTP
Date: Thu, 22 Mar 2007 06:50:20 -0700 (PDT)

Hello!

I am trying to do some mpeg streaming using the ccRTP
library and a mpeg decoder. 

I have two applications, a sender and receiver, based
on the rtpsend and listen programs, which I test on
the same machine, different ports. 

I figured out a sampling rate for the streaming, but
it is too slow and even if the Transmitter sends
everything fast enough (way faster then the receiver
processes), the receiver is left behind. 

This is the receiver loop

----------------------------------------------
while (true) {
const AppDataUnit *data;
while (data = getData(getFirstTimestamp())){
        
  uint8_t *buffer = (uint8_t*)data->getData();

  decode_mpeg2(buffer, buffer+BS);
  data = NULL;
  }
  delete data;
                
  //Thread::sleep(2);
}
}
----------------------------------------------

This is the transmitter loop:
----------------------------------------------
while (fread(buffer, 1, BS, this->in_file)){
if (timestamp == 0)
timestamp = getCurrentTimestamp();
else
timestamp += getCurrentRTPClockRate();
                                
putData(timestamp, buffer, BS);

Thread::sleep(TimerPort::getTimer());
TimerPort::incTimer(10);
}
----------------------------------------------

The decoder isn't the problem because it works fine by
itself, so only the receiving loop could be the issue.
Do I have to manipulate the queues in any way, or is
it just a matter of synchronization?

Could anyone give me some hints, please?

Victor Cionca



 
____________________________________________________________________________________
Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/




reply via email to

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