[jitsi-dev] MediaStream.getRemoteDataAddress() returns null after MediaStream.start()


#1

What would cause this to be null after a successful start?

Here are the steps leading up to the method call:

   - get MediaService instance
   - get MediaFormatFactory via MediaService instance
   - get Audio and Video device instances
   - create MediaFormat for audio and video using MediaFormatFactory
   - create SrtpControl via MediaService
   - create MediaStream for audio and video using MediaService with Device
   and SrtpControl parameters
   - add dynamic payload type to MediaStream instances
   - set direction to SENDONLY on MediaStream instances
   - set format on MediaStream instances
   - create a DatagramSocket for both rtp and rtcp
   - create InetSocketAddress for both ports on my public IP
   - create a StreamConnector for both audio and video
   - set StreamConnector on each MediaStream instance using DatagramSocket
   instances
   - create a single MediaStreamTarget using the InetSocketAddress
   - set MediaStreamTarget on both MediaStream instances
   - set names on MediaStream instances ("audio" / "video")
   - start SrtpControl with MediaType.AUDIO
   - start the audio MediaStream instance
   - start the video MediaStream instance

All of these actions complete without an exception and the following is
output into my log:

2014-09-17 16:46:53,176 [pool-9-thread-2] TRACE MyStream - MediaFormats
audio: rtpmap:-1 opus/48000/2
video: rtpmap:-1 VP8/90000
2014-09-17 16:46:53,512 [pool-9-thread-2] TRACE MyStream - Using ports -
rtp/rtcp: [5000, 5001]
2014-09-17 16:46:53,610 [pool-9-thread-2] TRACE MyStream - Using IP:
xx.xx.xx.xx
2014-09-17 16:46:53,625 [pool-9-thread-2] TRACE MyStream - Addresses - rtp:
/xx.xx.xx.xx:5000 rtcp: /xx.xx.xx.xx:5001
2014-09-17 16:46:53,626 [pool-9-thread-2] TRACE MyStream - Stream target:
MediaStreamTarget with dataAddress /xx.xx.xx.xx:5000 and controlAddress
/xx.xx.xx.xx:5001
2014-09-17 16:46:53,639 [pool-9-thread-2] TRACE MyStream - Starting audio
stream
2014-09-17 16:46:54,241 [pool-9-thread-2] INFO
o.j.impl.neomedia.MediaStreamImpl - audio codec/freq: opus/48000 Hz
2014-09-17 16:46:54,242 [pool-9-thread-2] INFO
o.j.impl.neomedia.MediaStreamImpl - audio remote IP/port: 50.7.33.5/5000
2014-09-17 16:46:54,242 [pool-9-thread-2] TRACE MyStream - Starting video
stream
2014-09-17 16:46:56,786 [RTP Forwarder:
org.jitsi.impl.neomedia.MediaStreamImpl$2@23d6dee] ERROR
net.sf.fmj.media.Log - No format has been registered for RTP payload type
111
2014-09-17 16:46:56,796 [pool-9-thread-2] INFO
o.j.i.n.d.VideoMediaDeviceSession - video send resolution: 320x240
2014-09-17 16:46:56,797 [pool-9-thread-2] INFO
o.j.i.n.d.VideoMediaDeviceSession - video send FPS: default(no restriction)
2014-09-17 16:46:56,945 [pool-9-thread-2] INFO
o.j.impl.neomedia.MediaStreamImpl - video codec/freq: VP8/90000 Hz
2014-09-17 16:46:56,945 [pool-9-thread-2] INFO
o.j.impl.neomedia.MediaStreamImpl - video remote IP/port: 50.7.33.5/5000
2014-09-17 16:46:56,986 [Loop thread:
net.sf.fmj.media.parser.RawPullBufferParser$FrameTrack@686ab109] INFO
o.j.i.n.codec.video.vp8.VPXEncoder - Setting new width/height: 320/240
2014-09-17 16:46:57,015 [RTP Forwarder:
org.jitsi.impl.neomedia.MediaStreamImpl$2@2c5993e3] ERROR
net.sf.fmj.media.Log - No format has been registered for RTP payload type
100

After all this completes, I call
InetSocketAddress audioAddr = audioMediaStream.getRemoteDataAddress();
and it always returns null; same for my video MediaStream.

Thanks,
Paul

···

--
http://gregoire.org/
http://code.google.com/p/red5/