diff options
author | zachh <zachh@google.com> | 2017-07-10 14:50:37 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-07-11 08:01:05 -0700 |
commit | 6e7e1b9a79e078d7c77648b414809df79218597e (patch) | |
tree | 67f86db4c4c0144749a7190130c74df46e0f84a9 /LICENSE | |
parent | 7a4b7090da0366e02e742325a6c531c4bdaff0d0 (diff) |
Improved preview scaling in IMS video calls.
This CL attempts to improve many related issues.
The first was that the (post-greenscreen) preview was "squished" when making an outgoing IMS video call:
BEFORE: https://screenshot.googleplex.com/cRcZYmgq1rh
AFTER: https://screenshot.googleplex.com/8cWFQw7Au2U
Another issue is that the preview on the green screen sometimes appears very zoomed:
BEFORE: https://screenshot.googleplex.com/0vyq3U87xVX
AFTER: https://screenshot.googleplex.com/zyhkdATMuUj
These two issues seem to be improved by removing our manual attempts to scale the video via VideoScale. (Note that transforms to fix rotation are still needed in landscape mode and remain.)
Another issue is that when hanging up an unanswered outgoing video call, the preview becomes temporarily extremely zoomed and unblurred:
BEFORE: https://screenshot.googleplex.com/mqwSsTXhwSw
AFTER: https://screenshot.googleplex.com/uKfEpVmd8A2
Another issue is that when rotating the device, the preview would sometimes remain rotated incorrectly.
BEFORE: https://screenshot.googleplex.com/p2mVnPJ7dww
AFTER: https://screenshot.googleplex.com/S8R0FsS0Vsn
I believe that these problems (and possibly other video related flakiness I sometimes observed) happen because we update scaling and views immediately after applying layout changes. Often times, the layout changes haven't taken effect because we're in the middle of a layout pass so the updates are not working correctly. So, I moved most of those updates into specific layout listeners for the preview and remote texture views.
(Note that something similar before was attempted using a global layout listener, but that layout listener removed itself after the first invocation so didn't seem to be working as intended AFAICT.)
The last issue was that when toggling the front/rear camera, when returning to the front camera, the video would appear zoomed. This was fixed by removing the call to setDefaultBufferSize in VideoSurfaceTextureImpl. From the javadoc of that method, it doesn't sound like something that we should need to be doing and it reliably fixes the problem.
BEFORE: https://screenshot.googleplex.com/6j0XDfLGAzk
AFTER: https://screenshot.googleplex.com/Hs7zsbtyjwc
Bug: 62437862
Test: manually placed and received IMS calls and observed improved preview scaling on multiple devices when calling from O to N, O to O, and N to O. Observed that basic features (mute/umute video, swapping cameras, greenscreens, answer screens, hanging up, etc) still behave reasonably. Open to suggestions for automated tests.
PiperOrigin-RevId: 161444534
Change-Id: I4be348875de11b8517feba86da07fe41a3e5351d
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions