New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 672695 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Feature

Blocking:
issue 672537
issue 679061



Sign in to add a comment

Pass camera facing information to audio

Project Member Reported by shenghao@chromium.org, Dec 9 2016

Issue description

From hychao@:

CrasAudioHandler::NodesChanged()  is the callback when audio server (on system) tells UI that something us plugged/unplugged
and it'll trigger  HandleGetNodes() --> UpdateDevicesAndSwitchActive()   
this is the normal path where UI responses to system audio devices change
I suppose it should do similar reaction to camera events
From the header file, this class implements ""public CrasAudioClient::Observer""  so it can listen for system audio change events
You probably want to use similar pattern to pass camera info/events

Cc: hychao@chromium.org wuchengli@chromium.org
Cc: jen...@chromium.org hennessywill@chromium.org
+Jenny and Will
Blocking: 672537
Labels: -Type-Bug -Pri-3 Pri-1 Type-Feature
Shenghao will start this on Monday to unblock Jenny
Blocking: 679061
Blocking: -672537
Labels: videoshortlist

Comment 9 by jen...@chromium.org, Jan 12 2017

What is the status of this task? When will we have the code for the notification that audio code can tell the activation of the camera front vs. back?
I will start work on it today. Will update this bug when I have progress.
After looking into it a bit, I can't find any good ways to pass camera facing information in VideoCaptureManager ( https://cs.chromium.org/chromium/src/content/browser/renderer_host/media/video_capture_manager.cc?cl=GROK&gsn=StartCaptureForClient&rcl=1484540488&l=640)
to CrasAudioHandler.

I propose the following:
Add a callback registration API in VideoCaptureManager, and CrasAudioHandler would register callback which is called when a video device is ready to start capturing. The callback parameter would contain facing info.

Any suggestions?


Cc: dgreid@chromium.org
+dylan who may have some ideas on how to architect this
Ok. I discovered that my proposal is not feasible.
//chromeos:chromeos can't depend on //content/browser:browser due to cyclic dependency:
  //ui/ozone:ozone ->
  //ui/ozone:platform ->
  //ui/platform_window:platform_window ->
  //ui/base:base ->
  //chromeos:chromeos ->
  //content/browser:browser ->
  //ui/ozone:ozone

I need some advice from people who are familiar with this matter.
Never mind. I kind of figured it out. Uploaded CL:
https://codereview.chromium.org/2634263002/
Blocking: 672537
The CL is in review.
CL still in review
Project Member

Comment 18 by bugdroid1@chromium.org, Feb 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/77ec80cbdc1be45775bffd27605bfd9549f8a9a6

commit 77ec80cbdc1be45775bffd27605bfd9549f8a9a6
Author: shenghao <shenghao@chromium.org>
Date: Wed Feb 22 20:14:18 2017

Pass camera facing info to audio client

Pass camera facing info when camera is started to audio client
so that active audio device can be switched according to camera
facing.

BUG= 672695 
TEST=Print log in CrasAudioClientImpl::OnVideoCaptureStarted()
and verify that facing info is correctly passed.

Review-Url: https://codereview.chromium.org/2634263002
Cr-Commit-Position: refs/heads/master@{#452180}

[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/chromeos/BUILD.gn
[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/chromeos/DEPS
[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/chromeos/audio/cras_audio_handler.cc
[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/chromeos/audio/cras_audio_handler.h
[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/content/browser/renderer_host/media/media_capture_devices_impl.cc
[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/content/browser/renderer_host/media/media_capture_devices_impl.h
[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/content/browser/renderer_host/media/media_stream_manager.cc
[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/content/browser/renderer_host/media/media_stream_manager.h
[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/content/browser/renderer_host/media/video_capture_manager.cc
[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/content/browser/renderer_host/media/video_capture_manager.h
[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/content/browser/renderer_host/media/video_capture_manager_unittest.cc
[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/content/common/media/media_stream_messages.h
[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/content/public/browser/media_capture_devices.h
[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/media/base/BUILD.gn
[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/media/base/video_facing.h
[modify] https://crrev.com/77ec80cbdc1be45775bffd27605bfd9549f8a9a6/media/capture/video/video_capture_device_descriptor.cc

Status: Fixed (was: Assigned)

Sign in to add a comment