linphone-users
[Top][All Lists]
Advanced

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

[Linphone-users] linphone-android: Uninitialized mZoomCenterX and mZoomC


From: Jörg Hänsel
Subject: [Linphone-users] linphone-android: Uninitialized mZoomCenterX and mZoomCenterX on first call of onDoubleTap
Date: Thu, 5 Feb 2015 18:15:23 +0100

Hi,

when tapping on the video during a video sip call, the video zooms to the lower left corner of the screen and not into the middle.

The reason is, that "mZoomCenterX" and "mZoomCenterX" are still 0.

Only when tapping twice, the resetZoom() is invoced and sets the correct values.

adding a " resetZoom();" in the beginning of the "then" case will fix this:


linphone-android/src/org/linphone/VideoCallFragment.java:

[...]
        public boolean onDoubleTap(MotionEvent e) {
                if (LinphoneUtils.isCallEstablished(LinphoneManager.getLc().getCurrentCall())) {
                        if (mZoomFactor == 1.f) {

                                //fix:
                                resetZoom();

                                // Zoom to make the video fill the screen vertically
                                float portraitZoomFactor = ((float) mVideoView.getHeight()) / (float) ((3 * mVideoView.getWidth()) / 4);
                                // Zoom to make the video fill the screen horizontally
                                float landscapeZoomFactor = ((float) mVideoView.getWidth()) / (float) ((3 * mVideoView.getHeight()) / 4);

                                mZoomFactor = Math.max(portraitZoomFactor, landscapeZoomFactor);

[...]


Cheers
Jörg

reply via email to

[Prev in Thread] Current Thread [Next in Thread]