[sip-comm-dev] [patch] RE: [sip-comm-dev] PlugInManager customCodecs missing


#1

Hi Mik!

Attached is a patch against the current cvs version of SIP Communicator
which works around some problems with the unmodified SUN JMF (which are
currently worked around by modifying the JMF code itself). With these
changes, I was able to get the SIP Communicator running with the unchanged
JMF.

The patch doesn't actually change the build file, it still includes the
modified JMF. The changes are transparent, they should do no harm if used
with the sip communicator modified JMF. They use only the JMF public API
(though exploit some SUN JMF implementation weirdnesses).

Since there seems to be so much progress on including FMJ, the changes
should soon be moot (I hope).

Details on the changes:

* Suns JMF implementation does not support a SessionAddress of 0.0.0.0,
therefore I only bind to the public address determined for the caller.

* The custom codec formats are registered once at MediaControl
initialization, which makes them available at the time the supported
encodings array is created.

* The custom codec formats are registered with every created RtpManager
(which is technically not needed with the Sun JMF implementation, but
follows the API documentation).

* For some reason unknown to me, Suns rtpManager.getSendStreams() always
returns null. Therefore I maintain my own list of send streams by
registering a sennd stream listener on the created rtp managers.

* When the codecs and packages are added with the JMF registry, it is
checked if they were already registered in a previous run. This gives a more
informative log output.

I hope this patch is useful to you.

Regards
Michael Koch

sip-com-sun-jmf.patch (13.5 KB)

···

________________________________

  Von: mik [mailto:rivael_il@yahoo.com]
  Gesendet: Freitag, 13. Juli 2007 16:24
  An: Koch Michael
  Betreff: Re: [sip-comm-dev] PlugInManager customCodecs missing
  
  Hi Michael Koch,
   
  Please send me code snippet/patch of your change.
   
  Thanks,
   
  Mik
  
  Koch Michael <MKoch@rowa.de> wrote:

    I have finally succeeded in getting the custom codecs
working with the
    unmodified JMF. As Ken wrote, I had to register the custom
formats with the
    RTPManager instances. The trick was that, due to how the Sun
JMF handles the
    registration internally, this has to be done once before
    MediaControl.initProcessor() creates the
transmittableAudioEncodings list.
    Otherwise, the list doesn't contain the custom encodings.
    
    If you are interested, I can provide a patch.
    
    Regards
    Michael Koch


#2

Hi,

I've merged some of the changes from your pacth :

* The custom codec formats are registered once at MediaControl
initialization, which makes them available at the time the supported
encodings array is created.

* The custom codec formats are registered with every created RtpManager
(which is technically not needed with the Sun JMF implementation, but
follows the API documentation).

* When the codecs and packages are added with the JMF registry, it is
checked if they were already registered in a previous run. This gives a more
informative log output.

Your fixes will be acked.

Thanks!
damencho

Koch Michael wrote:

···

Hi Mik!
Attached is a patch against the current cvs version of SIP Communicator
which works around some problems with the unmodified SUN JMF (which are
currently worked around by modifying the JMF code itself). With these
changes, I was able to get the SIP Communicator running with the unchanged
JMF.

The patch doesn't actually change the build file, it still includes the
modified JMF. The changes are transparent, they should do no harm if used
with the sip communicator modified JMF. They use only the JMF public API
(though exploit some SUN JMF implementation weirdnesses).

Since there seems to be so much progress on including FMJ, the changes
should soon be moot (I hope).

Details on the changes:

* Suns JMF implementation does not support a SessionAddress of 0.0.0.0,
therefore I only bind to the public address determined for the caller.

* The custom codec formats are registered once at MediaControl
initialization, which makes them available at the time the supported
encodings array is created.

* The custom codec formats are registered with every created RtpManager
(which is technically not needed with the Sun JMF implementation, but
follows the API documentation).

* For some reason unknown to me, Suns rtpManager.getSendStreams() always
returns null. Therefore I maintain my own list of send streams by
registering a sennd stream listener on the created rtp managers.

* When the codecs and packages are added with the JMF registry, it is
checked if they were already registered in a previous run. This gives a more
informative log output.

I hope this patch is useful to you.

Regards
Michael Koch

________________________________

  Von: mik [mailto:rivael_il@yahoo.com] Gesendet: Freitag, 13. Juli 2007 16:24
  An: Koch Michael
  Betreff: Re: [sip-comm-dev] PlugInManager customCodecs missing
  
     Hi Michael Koch,
     Please send me code snippet/patch of your change.
     Thanks,
     Mik
  
  Koch Michael <MKoch@rowa.de> wrote:

    I have finally succeeded in getting the custom codecs
working with the
    unmodified JMF. As Ken wrote, I had to register the custom
formats with the
    RTPManager instances. The trick was that, due to how the Sun
JMF handles the
    registration internally, this has to be done once before
    MediaControl.initProcessor() creates the
transmittableAudioEncodings list.
    Otherwise, the list doesn't contain the custom encodings.
    
    If you are interested, I can provide a patch.
    
    Regards
    Michael Koch
    
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net