List Info

Thread: PlugInManager customCodecs missing




PlugInManager customCodecs missing
user name
2007-07-10 10:05:02
Hello all,

I am trying to build simple SIP UA based on
sip-communicator. To do this, I have removed some
featuers like the felix, and created custom
MediaControl object in package: impl.media;

Now, it seems that the registration of the custom
codecs: 

"net.java.sip.communicator.impl.media.codec.audio.alaw.
JavaEncoder",
       
"net.java.sip.communicator.impl.media.codec.audio.alaw.
DePacketizer",
       
"net.java.sip.communicator.impl.media.codec.audio.alaw.
Packetizer",
       
"net.java.sip.communicator.impl.media.codec.audio.speex
.JavaEncoder",
       
"net.java.sip.communicator.impl.media.codec.audio.speex
.JavaDecoder",
       
"net.java.sip.communicator.impl.media.codec.audio.ilbc.
JavaEncoder",
       
"net.java.sip.communicator.impl.media.codec.audio.ilbc.
JavaDecoder"

is OK. But the datasource processor created does not
have those codec inside.

What am I doing wrong? (Please help - I am quite
desperate here).

Thanks,

Michael

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


Re: PlugInManager customCodecs missing
user name
2007-07-10 10:17:59
 From what I can tell, SC does not properly register the
formats with 
the RTPManager.  Here is some info that is similar to what I
recently 
sent to Chris, who is working on RTP in SC.

Every time RTPManager.newInstance() is called, the
nonstandard formats 
need to be resistered.   ALAW/RTP, Speex/RTP, and ILBC/rtp
are all 
nonstandard.

FMJ uses the class
net.sf.fmj.media.datasink.rtp.RTPBonusFormatsMgr to 
register these additional formats, see its source code. If
you choose to 
use a custom format, both the sender and the receiver must
register it 
with the RTPManager.

For example, FMJ does this on the sending end:

rtpManager = RTPManager.newInstance();
rtpManager.initialize(new SessionAddress());
RTPBonusFormatsMgr.addBonusFormats(rtpManager);

....

and on the receiving end;

rtpManager = (RTPManager) RTPManager.newInstance();
RTPBonusFormatsMgr.addBonusFormats(rtpManager);
rtpManager.addReceiveStreamListener(new
MyReceiveStreamListener());
....

You'll want to look and see where SC calls
RTPManager.newInstance(), and 
add the formats there. You do not have to use 
net.sf.fmj.media.datasink.rtp.RTPBonusFormatsMgr of course,
you may 
simply look at its code and do something similar.

The numbers that
net.sf.fmj.media.datasink.rtp.RTPBonusFormatsMgr 
assigns to formats are totally arbitrary. The only important
thing is 
that the numbers match on the sending and receiving side.

Hope this helps,

Ken.

PS here is FMJ's source to add these formats:

public class RTPBonusFormatsMgr
{
    public static final int FIRST_BONUS_FORMAT = 100;
    public static final int ALAW_RTP_INDEX = 100;
    public static final int SPEEX_RTP_INDEX = 101;
    public static final int ILBC_RTP_INDEX = 102;
   
   
    public static void addBonusFormats(RTPManager mgr)
    {
        mgr.addFormat(new AudioFormat(
                BonusAudioFormatEncodings.ALAW_RTP,
                8000,
                8,
                1,
                -1,
                AudioFormat.SIGNED
            ), ALAW_RTP_INDEX);
       
        // see 
net.java.sip.communicator.impl.media.codec.audio.speex.JavaD
ecoder.
        // only relevant if this encoder/decoder pair is
available.
        mgr.addFormat(new AudioFormat(
                BonusAudioFormatEncodings.SPEEX_RTP,
                8000,
                8,
                1,
                -1,
                AudioFormat.SIGNED //isSigned());
            ), SPEEX_RTP_INDEX);
       
        // ditto, for 
net.java.sip.communicator.impl.media.codec.audio.ilbc.JavaDe
coder:
        mgr.addFormat(new AudioFormat(
                BonusAudioFormatEncodings.ILBC_RTP,
                8000.0,
                16,
                1,
                AudioFormat.LITTLE_ENDIAN,
                AudioFormat.SIGNED
        ), ILBC_RTP_INDEX);
       
       
    }
}



Michael kr wrote:
> Hello all,
>
> I am trying to build simple SIP UA based on
> sip-communicator. To do this, I have removed some
> featuers like the felix, and created custom
> MediaControl object in package: impl.media;
>
> Now, it seems that the registration of the custom
> codecs: 
>
>
"net.java.sip.communicator.impl.media.codec.audio.alaw.
JavaEncoder",
>        
>
"net.java.sip.communicator.impl.media.codec.audio.alaw.
DePacketizer",
>        
>
"net.java.sip.communicator.impl.media.codec.audio.alaw.
Packetizer",
>        
>
"net.java.sip.communicator.impl.media.codec.audio.speex
.JavaEncoder",
>        
>
"net.java.sip.communicator.impl.media.codec.audio.speex
.JavaDecoder",
>        
>
"net.java.sip.communicator.impl.media.codec.audio.ilbc.
JavaEncoder",
>        
>
"net.java.sip.communicator.impl.media.codec.audio.ilbc.
JavaDecoder"
>
> is OK. But the datasource processor created does not
> have those codec inside.
>
> What am I doing wrong? (Please help - I am quite
> desperate here).
>
> Thanks,
>
> Michael
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
>
>
>   

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


Re: PlugInManager customCodecs missing
user name
2007-07-10 23:52:41
Hi Ken,

Ken Larson wrote:
> From what I can tell, SC does not properly register the
formats with 
> the RTPManager.  Here is some info that is similar to
what I recently 
> sent to Chris, who is working on RTP in SC.
>
> Every time RTPManager.newInstance() is called, the
nonstandard formats 
> need to be resistered.   ALAW/RTP, Speex/RTP, and
ILBC/rtp are all 
> nonstandard.
>
I agree that ALAW/RTP, Speex/RTP, and ILBC/rtp are
nonstandard and 
missing in jmf. But I have changed
com.sun.media.rtp.FormatInfo and have 
added them there - for example :
formatList[110] = new AudioFormat("speex/rtp",
8000D, -1, 1);

In answer to Michael maybe: he is not using our jmf libs
(which have 
little changes  ).
But this is a good idea to register the formats in the newly
created 
RTPManager I will change to that approach in
sip-communicator.
Thanks for the hint.

damencho

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


Re: PlugInManager customCodecs missing
user name
2007-07-11 03:42:39
Ah, thanks, that explains why it works in SC, and that I did
not find 
the code.

Agreed, the best way to do this is outside of the sun
classes - that way 
it will work better with FMJ out of the box, as well.

Ken

Damian Minkov wrote:
> Hi Ken,
>
> Ken Larson wrote:
>> From what I can tell, SC does not properly register
the formats with 
>> the RTPManager.  Here is some info that is similar
to what I recently 
>> sent to Chris, who is working on RTP in SC.
>>
>> Every time RTPManager.newInstance() is called, the
nonstandard 
>> formats need to be resistered.   ALAW/RTP,
Speex/RTP, and ILBC/rtp 
>> are all nonstandard.
>>
> I agree that ALAW/RTP, Speex/RTP, and ILBC/rtp are
nonstandard and 
> missing in jmf. But I have changed
com.sun.media.rtp.FormatInfo and 
> have added them there - for example :
> formatList[110] = new
AudioFormat("speex/rtp", 8000D, -1, 1);
>
> In answer to Michael maybe: he is not using our jmf
libs (which have 
> little changes  ).
> But this is a good idea to register the formats in the
newly created 
> RTPManager I will change to that approach in
sip-communicator.
> Thanks for the hint.
>
> damencho
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
>
>

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )