Fwd: How to block on incoming queue?
"Yaniv Levy" <[email protected]>
| Newsgroups | gmane.comp.gnu.ccrtp.devel |
|---|---|
| Message-ID | <[email protected]> |
I understand now. This is the way to have a jitter and reorder buffer? draw packets from the incoming queue just after it has been accumulating data for some time? OK, but this says that I should wait X msec at the application start, and draw only one packet each time, at a fixed rate (use an external timer), to avoid emptying the queue. Am I correct? (for some reason i thought that the jitter buffer and reorder was internal to the queue, and that it will not give you packets unless its over the jitter buffer designated delay/accumulation level). Thank you, Yaniv On 5/23/06, David Sugar <[email protected]> wrote: > > The common reason for not getting data right at arrival is that rtp udp > packets can arrive out of order. The receive queue is used to assure > packets can be returned properly ordered to the application, as well as > to account for late arrival and jitter. > > Yaniv Levy wrote: > > Thank you for your swift answer. > > > > I'm not looking to block on the socket. This is internal to the > RTPSession > > class and wisely hidden from the application. > > I'm looking to block on the incoming queue, since my application draws > data > > from the queue and not from the socket. > > > > Indeed, The only way I thought about to accomplish it was like you were > > saying: redefine RTPSession::run() method. it will do exactly what it > does > > in RTPSession, and signal my application using a function call or > condition > > variable. > > > > I find it interesting that this issue was not asked previously. i want > to > > get the packet as fast as it gets into the incoming queue. maybe most > > application don't. > > > > Thank you very much. > > Yaniv > > > > On 5/23/06, Federico Montesino Pouzols < [email protected]> wrote: > >> > >> > >> Hi, I guess isPendingData and isPendingControl are the methods you are > >> looking for. These methods block waiting for available packets on the > >> data/control reception socket (you can specify a max. timeout). If you > >> want to somehow modify the service thread behavior, you can inherit > >> from RTPSession and redefine the run method in rtp.h. > >> > >> Also, if there are no packet in the incoming queue, getFirstTimestamp > >> will return 0. > >> > >> HTH. > >> > > > > > > ------------------------------------------------------------------------ > > > > > _______________________________________________ > > Ccrtp-devel mailing list > > [email protected] > > http://lists.gnu.org/mailman/listinfo/ccrtp-devel > > > _______________________________________________ Ccrtp-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/ccrtp-devel