[jitsi-dev] ask how to make preview while transmiting video with libjitsi


#1

Dear team,

I am using libjitsi for my video call project, based on the example
(AVReceive2, AVTransmit2) video call worked.

Now I want to add a small video window (like preview) that shows what
transmitting user look like to know what the other person is seeing on
receiver side.

Pls give me an advice . thank you so much.

Regards,

Hong Nguyen


#2

You likely want to look into libjitsi's method
org.jitsi.service.neomedia.MediaService.getVideoPreviewComponent(MediaDevice,
int, int) and how Jitsi employs it.

···

2013/8/26 Hong <nguyenmanhhong@gmail.com>:

Now I want to add a small video window (like preview) that shows what
transmitting user look like to know what the other person is seeing on
receiver side.


#3

Thank Lyubomir for suggestion, but It seems that way we can't see our video and transmitting video concurrently.

With UDP transport, I just found a way and made a demo successfully with the sample (AVreceiver2, AVtransmit2):
                   Step1: add one line on org.jitsi.examples. AVTransmit2.start()
                        
                           // original of libjitsi code
                            mediaStream.setTarget(
                    new MediaStreamTarget(
                            new InetSocketAddress(remoteAddr, remoteRTPPort),
                            new InetSocketAddress(remoteAddr, remoteRTCPPort)));

                           // one line add more
                             mediaStream.setTarget(new MediaStreamTarget(new InetSocketAddress(
          "localhost", 6666), new InetSocketAddress(
              "localhost", 6668)));

                   Step2: comment this block on the method: org.jitsi.impl.neomedia.MediaStreamImpl .doSetTarget()
  /*
                  if (removeTargets )
              {
                  rtpConnector.removeTargets();
                  rtpConnectorTarget = null;
                }
              */

                 Step3: on both transmitting side and receiver side run AVReceiver2 .

But with TCP transport, that way did not work. Do you have any idea for this, pls give me suggestion. Thanks

···

-----Original Message-----
From: lubo@sip-communicator.org [mailto:lubo@sip-communicator.org] On Behalf Of Lyubomir Marinov
Sent: Monday, August 26, 2013 3:10 PM
To: Jitsi Developers
Cc: nguyenmanhhong@gmail.com
Subject: Re: [jitsi-dev] ask how to make preview while transmiting video with libjitsi

2013/8/26 Hong <nguyenmanhhong@gmail.com>:

Now I want to add a small video window (like preview) that shows what
transmitting user look like to know what the other person is seeing on
receiver side.

You likely want to look into libjitsi's method org.jitsi.service.neomedia.MediaService.getVideoPreviewComponent(MediaDevice,
int, int) and how Jitsi employs it.