PJSUA Java API unwanted video conference colorbar

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

 



Hello everyone,

I'm trying to use the PJSUA API with the Java bindings for an Android
application to establish a video conference, based on the code from
the following ticket:
https://trac.pjsip.org/repos/ticket/2181

(Note: I' running this code in the callback onCallMediaEvent, when the
event is PJMEDIA_EVENT_FMT_CHANGED, to avoid the issues caused by this
other ticket https://trac.pjsip.org/repos/ticket/2245 which was
brought up in this mailing list a couple of months ago. I've tried
using the code in that changeset and the issue persists so I went back
to release 2.9)

  AudioMedia oneAudio = callOne.getAudioMedia(-1);
  VideoMedia oneVideoDec = callOne.getDecodingVideoMedia(-1);

  AudioMedia twoAudio = callTwo.getAudioMedia(-1);
  VideoMedia twoVideoEnc = callTwo.getEncodingVideoMedia(-1);

  // Transmit audio in both directions
  oneAudio.startTransmit(twoAudio);
  oneAudio.startTransmit(twoAudio);

  // Send internal video to external call
  oneVideoDec.startTransmit(twoVideoEnc, new VideoMediaTransmitParam());

Now, the current device using PJSIP doesn't have a video device
itself, so I'm just interested in transmitting it's audio, the problem
is that the callTwo doesn't just receive the video from One, it also
receives a colorbar pattern which occupies half the screen. I've tried
disabling the colorbar device by using the
PJMEDIA_VIDEO_DEV_HAS_CBAR_SRC compile time flag, but then
getEncodingVideoMedia fails mentioning that there is no media
available.

I've tried different combinations of:
  callTwo.vidSetStream(pjsua_call_vid_strm_op.PJSUA_CALL_VID_STRM_ADD,
new CallVidSetStreamParam());

and:
  VideoMediaVector vids = endpoint.mediaEnumVidPorts();
  long vidsSize = vids.size();
  for (int i = 0; i < vidsSize; i++) {
    VideoMedia vid = vids.get(i);
    VidConfPortInfo info = vid.getPortInfo();
    if (info.getName().toLowerCase().contains("colorbar")) {
      vid.stopTransmit(twoVideoEnc);
    }
  }

But they don't seem to work, so I'm not sure if I'm making the correct
changes or if I'm not making them at the correct time. Can anyone help
me with this issue?

Thanks for your help!
Regards,
Daniel

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org



[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