Pjsip Android Video Call: Inverted Video Preview

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

 



Hello,

I am using Pjsip library for SIP Video call. I am facing issue displaying my own view in a SurfaceView.

Here is the code I am using to display my own preview in SurfaceView:

fun updateVideoPreview(holder: SurfaceHolder) {
    if (SipManager.currentCall != null &&
            SipManager.currentCall?.mVideoPreview != null) {
        if (videoPreviewActive) {
            val vidWH = VideoWindowHandle()
            vidWH.handle?.setWindow(holder.surface)
            val vidPrevParam = VideoPreviewOpParam()
            vidPrevParam.window = vidWH
            try {
                SipManager.currentCall?.mVideoPreview?.start(vidPrevParam)
            } catch (e: Exception) {
                println(e)
            }
        } else {
            try {
                SipManager.currentCall?.mVideoPreview?.stop()
            } catch (e: Exception) {
                println(e)
            }
        }
    }
}

Here is the inverted view I am getting:

Expected View:

I know that the person on other side will always receive mirror view of my video. But in case of my own view, this should not happen. What I feel is I am displaying the preview which is sent to the other person. I am not getting a single hint about how to display my own view(without mirror effect) using Pjsip library.

Can you please help me with this?


Thank you in advance!!

_______________________________________________
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