RTP Streaming performance test program ..

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

 



On Tue, Jul 8, 2008 at 8:05 AM, Thomas Raschbacher <
thomas.raschbacher at itctec.com> wrote:

> Hi.
>
> I sort of figured out why it wasn't sending .. I forgot to let it
> wait/sleep before destroying the stream again ^_^
>
> Anyway my other question still stands .. is there a better/easier way to
> just stream rtp? (preferably I'd like to manually trigger the sending of
> packages and not use mem_player or one of the others) as we'll be just
> reading it from a driver .. or would it be easiest to just read the data
> from a driver by making my own driver_player?
>
>
You can always replace the master port with your own loop, something like
this:

while (1) {
   pjmedia_port_get_frame(mem_player, ..., frame);
   pjmedia_port_put_frame(stream_port, ..., frame);
   usleep(...);
}

And it should be easy to replace the mem_player with your driver:

while (1) {
   read_from_driver(pcm);

   frame.data = pcm;
   frame.size = ..;
   pjmedia_port_put_frame(stream_port, ..., frame);

   usleep(...);
}

If your driver provides blocking interface then the usleep() above probably
is not necessary.

The recommended way to do this is to make pjmedia_port abstraction for your
driver, so then you can integrate it nicely with the rest of pjmedia
framework. You still have the option on whether to use the master port or to
do the loop manually as above.

Cheers
 Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080708/d0ca9f5b/attachment.html 


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux