PJSIP Performance

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

 



On Thu, Feb 18, 2010 at 8:51 PM, Governa <affqlixo at gmail.com> wrote:
> Hi,
>
> First of all, english is not my main language, so take care!?=)

Don't worry, your English is perfect! :)

> I'm having problems with PJMEDIA performance in my aplication while?running
> it in a OMAP35xx processor (ARM / ~600MHz).
> The aplication send an RTP stream over the network whenever someone push a
> button. The stream will be received in many devices(including the one that
> is generating it) throught Multicast.
> In the sender side:
> I've created some (3) streams that should be avaible all the time the
> program is running, so that the push button -> sound sequence is the fastest
> possible. Each one send the RTP stream to a different multicast address.
> In the receiver side:
> There are at most 3 streams listening to one multicast address each.
> The?sender?signals the receiver each time the button is pushed, so I can
> open/resume the stream processing.
> But running 6 streams is a bit too much for the processor.

How is your interconnection in the bridge? I assume the streams would
be connected to the sound device, but are they connected to the sound
device all the time? By connected/disconnected I mean the
conf_connect/disconnect_port functions.

You should optimize the interconnection in the bridge by connecting
the streams to/from the sound device as needed. For example, you
definitely don't need to connect the microphone to the receiver
streams, nor the transmitter stream to the speaker, and you also
should disconnect the microphone from the stream when the button is
not pressed.

> When I run the application with gprof enabled, I see get_frame and put_frame
> as the great consumers of CPU power.

No surprise here, since that's where most of the works are done,
including encoding/decoding audio. So as I said above, it's important
to disconnect the mic from the streams when you're not transmitting,
to prevent unnecessary get/put_frame calls.

What codec are you using?

> I have one conference brigde, so that I can connect wav_players and
> recorders, so my first solution was to try to disconnect everything from the
> conference brigde.
> I tried disconnecting the snd_port also, but no difference in performance
> with this step. I've searched a bit and found?pjmedia_aud_stream_stop

What do you mean by disconnecting the snd_port? Did you mean
snd_port_disconnect or conf_disconnect_port?

Disconnecting the sound port with snd_port_disconnect should
definitely make a difference, since this would prevent the conference
bridge from running. If you don't see any different, then either the
CPU hog is not in the bridge, or there's some mistake in your
procedure.

> and?pjmedia_aud_stream_start, but stopping and starting when needed don't
> make the sound come back.
> (How) am I supposed to start/stop an pjmedia_aud_stream? Am I missing
> something?

I guess it depends on the audio backend being, some backends don't
like to be stopped and restarted. But since stopping and restarting
are expensive operations anyway, you should use
conf_connect/disconnect instead.


Cheers
Benny



[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