[Android] Switching video source for video stream is not stable

Open
#371 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android

Research direction

Start by reproducing the issue during a call with videoStream.switchSource(desiredCamera), using the Nokia 2.4/Android 11 details and the supplied Archive.zip logs. Compare the TextureView getHardwareLayer messages when switching succeeds or leaves the previous frame frozen; done means the camera switches reliably and the returned completion reflects the visible result.

Written by the indexing model from the issue text.

Description

ADO Linked Bug

Describe the bug
Switching video source for video stream is not always works.
After calling videoStream.switchSource(desiredCamera) completable feature is completed successfully, but video is not switched and picture is frozen with last frame from the previous camera.

This behaviour is not always reproducible. In most cases it works as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Start a call
  2. Execute videoStream.switchSource(desiredCamera)
  3. Observe camera is not switched

Issues can be reproduced only in call and in about 25% calls to switchSource().

Smartphone (please complete the following information):

  • Device: Nokia 2.4
  • OS: Android 11

Logs

I have noticed that when I see this log:
2021-09-13 17:49:14.908 8688-8688/com.azure.android.communication.ui D/TextureView: getHardwareLayer, createNewSurface:false
2021-09-13 17:49:14.941 8688-8688/com.azure.android.communication.ui D/TextureView: getHardwareLayer, createNewSurface:false

issue is reproduced, but when I see this, everything works as expected:
2021-09-13 17:50:49.162 8688-8688/com.azure.android.communication.ui D/TextureView: getHardwareLayer, createNewSurface:false
2021-09-13 17:50:49.190 8688-8688/com.azure.android.communication.ui D/TextureView: getHardwareLayer, createNewSurface:true

call id a43ce379-4455-42ad-854a-ad40b91684d7
Archive.zip

Dominant language
No language data
Stars
340
Forks
113
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/Communication

All issues in Azure/Communication

Similar issues

More Audio/Video & RTC issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.