[jitsi-dev] How to set priority to the list of supported formats


#1

Hi,

I am developing an application that needs to register on my SIP server
and establish a call. This application has its own GUI. So far I
succeeded to register and make a call.

I would like now to set the priority of the codecs in the media
description sent during the invite request. I noticed that Jitsi GUI
has an "Options" menu that lets the user reorder the audio codec list.

I do not see where that information is stored and if this is the list
that is returned by the method:
getDefaultDevice(mediaType).getSupportedFormats(...) which is used by
net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl
.createMediaDescriptions().

By the way, is there any Javadoc about the packages org.jitsi.* ? I
could not find any.

Thank you in advance for your help,
Gilles


#2

Hey Gilles,

Hi,

I am developing an application that needs to register on my SIP server
and establish a call. This application has its own GUI. So far I
succeeded to register and make a call.

Using libjitsi I suppose?

I would like now to set the priority of the codecs in the media
description sent during the invite request. I noticed that Jitsi GUI
has an "Options" menu that lets the user reorder the audio codec list.

I do not see where that information is stored and if this is the list
that is returned by the method:
getDefaultDevice(mediaType).getSupportedFormats(...) which is used by
net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl
.createMediaDescriptions().

They set a number of properties in the ConfigurationService. You can do
the same with libjitsi

By the way, is there any Javadoc about the packages org.jitsi.* ? I
could not find any.

There is but we haven't automated the upload yet. We'll do so in the
near future.

Cheers,
Emil

···

On 08.09.12, 08:58, gilles.gerlinger@avansonic.com wrote:


#3

Hi,

···

On Sat, Sep 8, 2012 at 8:58 AM, <gilles.gerlinger@avansonic.com> wrote:

I would like now to set the priority of the codecs in the media
description sent during the invite request. I noticed that Jitsi GUI
has an "Options" menu that lets the user reorder the audio codec list.

I do not see where that information is stored and if this is the list
that is returned by the method:
getDefaultDevice(mediaType).getSupportedFormats(...) which is used by
net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl
.createMediaDescriptions().

Yep, that returns the list of formats enabled in 'Options'. Default
priorities are set (and immediately overridden with ones from the
ConfigurationService) in
org.jitsi.impl.neomedia.codec.EncodingConfiguration#initializeFormatPreferences

Boris


#4

Hi Emil,

Thanks for your prompt answer. I am glad to see that the
project is very active and that emails are answered.

As you guessed, I
am using libjitsi. Is there any code example available so that I can
check that I am using it the proper way?

My application works fine so
far. I still have some warnings and errors I am not sure about.

1)
Sometimes I see the following when establishing a call:

warning: The
VAD has been replaced by a hack pending a complete rewrite

2) More
frequently I have an error in the ZRTP thread:

Exception in thread
"ZRTP" java.lang.ArrayIndexOutOfBoundsException: 104
at
org.jitsi.impl.neomedia.RawPacket.writeByte(Unknown Source)
at
org.jitsi.impl.neomedia.transform.dtmf.DtmfRawPacket.setDtmfPayload(Unknown
Source)
at
org.jitsi.impl.neomedia.transform.dtmf.DtmfRawPacket.init(Unknown
Source)
at
org.jitsi.impl.neomedia.transform.dtmf.DtmfTransformEngine.transform(Unknown
Source)
at
org.jitsi.impl.neomedia.transform.TransformEngineChain$PacketTransformerChain.transform(Unknown
Source)
at
org.jitsi.impl.neomedia.transform.TransformUDPOutputStream.createRawPacket(Unknown
Source)
at
org.jitsi.impl.neomedia.RTPConnectorOutputStream.write(Unknown Source)

at
org.jitsi.impl.neomedia.transform.zrtp.ZRTPTransformEngine.sendDataZRTP(Unknown
Source)
at gnu.java.zrtp.ZRtp.sendPacketZRTP(ZRtp.java:1042)
at
gnu.java.zrtp.ZrtpStateClass.evDetect(ZrtpStateClass.java:491)
at
gnu.java.zrtp.ZrtpStateClass.dispatchEvent(ZrtpStateClass.java:304)
at
gnu.java.zrtp.ZrtpStateClass.processEvent(ZrtpStateClass.java:280)
at
gnu.java.zrtp.ZRtp.processTimeout(ZRtp.java:542)
at
org.jitsi.impl.neomedia.transform.zrtp.ZRTPTransformEngine.handleTimeout(Unknown
Source)
at
org.jitsi.impl.neomedia.transform.zrtp.ZRTPTransformEngine$TimeoutProvider.run(Unknown
Source)

I would appreciate if you could comment those messages.

Regards, Gilles

Hey

Gilles,

Hi, I am developing an application that needs to register on my SIP

server and establish a call. This application has its own GUI. So far I
succeeded to register and make a call.

Using libjitsi I suppose?

I would like now to set the priority of the codecs in the media

description sent during the invite request. I noticed that Jitsi GUI has
an "Options" menu that lets the user reorder the audio codec list. I do
not see where that information is stored and if this is the list that is
returned by the method:
getDefaultDevice(mediaType).getSupportedFormats(...) which is used by
net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl
.createMediaDescriptions().

They set a number of properties in the

ConfigurationService. You can do

···

On 08.09.2012 18:13, Emil Ivov wrote:

On 08.09.12, 08:58, gilles.gerlinger@avansonic.comwrote:
the same with libjitsi


#5

Hi,

What I said is no longer true since r9847. Defaults are not overridden
anymore.

Boris

···

On Sun, Sep 9, 2012 at 5:07 PM, Boris Grozev <boris@mustelinae.net> wrote:

Hi,

On Sat, Sep 8, 2012 at 8:58 AM, <gilles.gerlinger@avansonic.com> wrote:

I would like now to set the priority of the codecs in the media
description sent during the invite request. I noticed that Jitsi GUI
has an "Options" menu that lets the user reorder the audio codec list.

I do not see where that information is stored and if this is the list
that is returned by the method:
getDefaultDevice(mediaType).getSupportedFormats(...) which is used by
net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl
.createMediaDescriptions().

Yep, that returns the list of formats enabled in 'Options'. Default
priorities are set (and immediately overridden with ones from the
ConfigurationService) in
org.jitsi.impl.neomedia.codec.EncodingConfiguration#initializeFormatPreferences