Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Issue 2634263002: Pass camera facing info to audio client (Closed)

Created:
3 years, 11 months ago by shenghao
Modified:
3 years, 10 months ago
CC:
chfremer+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, hashimoto+watch_chromium.org, jam, mcasas+watch+vc_chromium.org, miu+watch_chromium.org, oshima+watch_chromium.org, posciak+watch_chromium.org, wuchengli, xjz+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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} Committed: https://chromium.googlesource.com/chromium/src/+/77ec80cbdc1be45775bffd27605bfd9549f8a9a6

Patch Set 1 #

Total comments: 9

Patch Set 2 : addressed review comments #

Patch Set 3 : Pass VideoCaptureObserver as ctor parameter #

Total comments: 12

Patch Set 4 : refactor to pass VideoCaptureObserver in setters, not in ctor #

Total comments: 22

Patch Set 5 : Address comments #

Total comments: 20

Patch Set 6 : separate out video_capture_observer_chromeos #

Total comments: 2

Patch Set 7 : add //media/base:video_facing dependency to //content/browser #

Total comments: 6

Patch Set 8 : fix trybot errors #

Total comments: 2

Patch Set 9 : Change to use ObserverList #

Total comments: 5

Patch Set 10 : move DEPS #

Total comments: 14

Patch Set 11 : rebase #

Total comments: 12

Patch Set 12 : addressed comments #

Total comments: 4

Patch Set 13 : trybot #

Total comments: 3

Patch Set 14 : Moved to chrome_browser_main_chromeos.cc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+190 lines, -7 lines) Patch
M chrome/browser/chromeos/chrome_browser_main_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +6 lines, -0 lines 0 comments Download
M chromeos/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/DEPS View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/audio/cras_audio_handler.h View 1 2 3 4 5 6 3 chunks +10 lines, -4 lines 0 comments Download
M chromeos/audio/cras_audio_handler.cc View 1 2 3 4 5 6 7 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/media_capture_devices_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/media_capture_devices_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +27 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +11 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +15 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +14 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +22 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +41 lines, -0 lines 0 comments Download
M content/common/media/media_stream_messages.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/public/browser/media_capture_devices.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -0 lines 0 comments Download
M media/base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +14 lines, -0 lines 0 comments Download
M media/base/video_facing.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +10 lines, -1 line 0 comments Download
M media/capture/video/video_capture_device_descriptor.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 163 (108 generated)
shenghao
3 years, 11 months ago (2017-01-17 09:40:08 UTC) #3
chfremer
I don't fully understand what the target use case is here. What would CrasAudioClient do ...
3 years, 11 months ago (2017-01-17 18:05:55 UTC) #5
jennyz
https://codereview.chromium.org/2634263002/diff/1/chromeos/dbus/cras_audio_client.h File chromeos/dbus/cras_audio_client.h (right): https://codereview.chromium.org/2634263002/diff/1/chromeos/dbus/cras_audio_client.h#newcode52 chromeos/dbus/cras_audio_client.h:52: enum VideoFacingMode { NONE = 0, USER, ENVIRONMENT }; ...
3 years, 11 months ago (2017-01-18 00:01:37 UTC) #6
shenghao
> I don't fully understand what the target use case is here. > What would ...
3 years, 11 months ago (2017-01-18 09:30:07 UTC) #8
shenghao
https://codereview.chromium.org/2634263002/diff/1/chromeos/dbus/cras_audio_client.h File chromeos/dbus/cras_audio_client.h (right): https://codereview.chromium.org/2634263002/diff/1/chromeos/dbus/cras_audio_client.h#newcode52 chromeos/dbus/cras_audio_client.h:52: enum VideoFacingMode { NONE = 0, USER, ENVIRONMENT }; ...
3 years, 11 months ago (2017-01-18 10:41:12 UTC) #9
chfremer
https://codereview.chromium.org/2634263002/diff/1/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/2634263002/diff/1/content/browser/renderer_host/media/video_capture_manager.cc#newcode663 content/browser/renderer_host/media/video_capture_manager.cc:663: chromeos::DBusThreadManager::Get(); On 2017/01/18 10:41:12, shenghao wrote: > On 2017/01/17 ...
3 years, 11 months ago (2017-01-18 18:36:10 UTC) #12
chfremer
On 2017/01/18 09:30:07, shenghao wrote: > > I don't fully understand what the target use ...
3 years, 11 months ago (2017-01-18 18:39:43 UTC) #13
shenghao
On 2017/01/18 18:39:43, chfremer wrote: > On 2017/01/18 09:30:07, shenghao wrote: > > > I ...
3 years, 11 months ago (2017-01-19 07:55:12 UTC) #14
shenghao
On 2017/01/18 18:36:10, chfremer wrote: > https://codereview.chromium.org/2634263002/diff/1/content/browser/renderer_host/media/video_capture_manager.cc > File content/browser/renderer_host/media/video_capture_manager.cc (right): > > https://codereview.chromium.org/2634263002/diff/1/content/browser/renderer_host/media/video_capture_manager.cc#newcode663 > ...
3 years, 11 months ago (2017-01-19 13:42:33 UTC) #15
chfremer
On 2017/01/19 07:55:12, shenghao wrote: > On 2017/01/18 18:39:43, chfremer wrote: > > On 2017/01/18 ...
3 years, 11 months ago (2017-01-19 17:57:41 UTC) #16
shenghao
> > I am not sure I follow. > Let me make an example: > ...
3 years, 11 months ago (2017-01-20 03:53:39 UTC) #17
chfremer
I sent you an e-mail regarding my questions about the overall use case. I believe ...
3 years, 11 months ago (2017-01-20 18:23:53 UTC) #18
shenghao
I did a major refactor. Please take a look. 1. Since I can't find any ...
3 years, 11 months ago (2017-01-24 12:52:01 UTC) #21
chfremer1
Thanks so much for putting in the effort to make things clean. I think we ...
3 years, 11 months ago (2017-01-25 18:13:44 UTC) #24
jennyz
https://codereview.chromium.org/2634263002/diff/120001/chromeos/audio/cras_audio_handler.cc File chromeos/audio/cras_audio_handler.cc (right): https://codereview.chromium.org/2634263002/diff/120001/chromeos/audio/cras_audio_handler.cc#newcode134 chromeos/audio/cras_audio_handler.cc:134: // TODO(jennyz): Switch active audio device according to video ...
3 years, 11 months ago (2017-01-26 00:26:12 UTC) #25
shenghao
On 2017/01/26 00:26:12, jennyz wrote: > https://codereview.chromium.org/2634263002/diff/120001/chromeos/audio/cras_audio_handler.cc > File chromeos/audio/cras_audio_handler.cc (right): > > https://codereview.chromium.org/2634263002/diff/120001/chromeos/audio/cras_audio_handler.cc#newcode134 > ...
3 years, 11 months ago (2017-01-26 15:33:35 UTC) #26
shenghao
https://codereview.chromium.org/2634263002/diff/120001/chromeos/audio/cras_audio_handler.cc File chromeos/audio/cras_audio_handler.cc (right): https://codereview.chromium.org/2634263002/diff/120001/chromeos/audio/cras_audio_handler.cc#newcode134 chromeos/audio/cras_audio_handler.cc:134: // TODO(jennyz): Switch active audio device according to video ...
3 years, 10 months ago (2017-01-29 10:21:02 UTC) #27
DaleCurtis
I think this might be happening at the wrong level. It's very hard to switch ...
3 years, 10 months ago (2017-01-30 19:22:19 UTC) #29
chfremer
A few more technical nits, see code comments. https://codereview.chromium.org/2634263002/diff/140001/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/2634263002/diff/140001/content/browser/browser_main_loop.cc#newcode1168 content/browser/browser_main_loop.cc:1168: new ...
3 years, 10 months ago (2017-01-30 19:49:28 UTC) #30
jennyz
The BUILD deps needs to be fixed, I patched the cl, it fails. But I ...
3 years, 10 months ago (2017-02-03 22:44:13 UTC) #31
jennyz
On 2017/01/30 19:22:19, DaleCurtis wrote: > I think this might be happening at the wrong ...
3 years, 10 months ago (2017-02-07 00:45:07 UTC) #32
DaleCurtis
On 2017/02/07 at 00:45:07, jennyz wrote: > On 2017/01/30 19:22:19, DaleCurtis wrote: > > I ...
3 years, 10 months ago (2017-02-07 01:18:48 UTC) #33
dgreid
On 2017/02/07 01:18:48, DaleCurtis wrote: > On 2017/02/07 at 00:45:07, jennyz wrote: > > On ...
3 years, 10 months ago (2017-02-07 01:55:10 UTC) #34
DaleCurtis
Per chat discussion I defer to the media stream owners for approval here. This seems ...
3 years, 10 months ago (2017-02-07 02:09:19 UTC) #35
shenghao
https://codereview.chromium.org/2634263002/diff/140001/chromeos/audio/cras_audio_handler.h File chromeos/audio/cras_audio_handler.h (right): https://codereview.chromium.org/2634263002/diff/140001/chromeos/audio/cras_audio_handler.h#newcode41 chromeos/audio/cras_audio_handler.h:41: }; On 2017/02/03 22:44:13, jennyz wrote: > It is ...
3 years, 10 months ago (2017-02-08 02:07:10 UTC) #36
jennyz
https://codereview.chromium.org/2634263002/diff/140001/chromeos/audio/cras_audio_handler.h File chromeos/audio/cras_audio_handler.h (right): https://codereview.chromium.org/2634263002/diff/140001/chromeos/audio/cras_audio_handler.h#newcode41 chromeos/audio/cras_audio_handler.h:41: }; On 2017/02/08 02:07:09, shenghao wrote: > On 2017/02/03 ...
3 years, 10 months ago (2017-02-08 22:21:33 UTC) #41
shenghao
https://codereview.chromium.org/2634263002/diff/140001/chromeos/audio/cras_audio_handler.h File chromeos/audio/cras_audio_handler.h (right): https://codereview.chromium.org/2634263002/diff/140001/chromeos/audio/cras_audio_handler.h#newcode41 chromeos/audio/cras_audio_handler.h:41: }; On 2017/02/08 22:21:33, jennyz wrote: > On 2017/02/08 ...
3 years, 10 months ago (2017-02-09 02:08:51 UTC) #42
jennyz
https://codereview.chromium.org/2634263002/diff/220001/content/browser/renderer_host/media/media_stream_manager.h File content/browser/renderer_host/media/media_stream_manager.h (right): https://codereview.chromium.org/2634263002/diff/220001/content/browser/renderer_host/media/media_stream_manager.h#newcode101 content/browser/renderer_host/media/media_stream_manager.h:101: // SetVideoCaptureObserver() and RemoveAllVideoCaptureObservers() should be Where is SetVideoCaptureObserver, ...
3 years, 10 months ago (2017-02-09 19:42:56 UTC) #57
shenghao
https://codereview.chromium.org/2634263002/diff/220001/content/browser/renderer_host/media/media_stream_manager.h File content/browser/renderer_host/media/media_stream_manager.h (right): https://codereview.chromium.org/2634263002/diff/220001/content/browser/renderer_host/media/media_stream_manager.h#newcode101 content/browser/renderer_host/media/media_stream_manager.h:101: // SetVideoCaptureObserver() and RemoveAllVideoCaptureObservers() should be On 2017/02/09 19:42:55, ...
3 years, 10 months ago (2017-02-09 22:32:51 UTC) #59
jennyz
https://codereview.chromium.org/2634263002/diff/290016/content/browser/renderer_host/media/video_capture_manager.h File content/browser/renderer_host/media/video_capture_manager.h (right): https://codereview.chromium.org/2634263002/diff/290016/content/browser/renderer_host/media/video_capture_manager.h#newcode350 content/browser/renderer_host/media/video_capture_manager.h:350: std::vector<media::VideoCaptureObserver*> capture_observers_; Why don't use base::ObserverList<media::VideoCaptureObserver>, then you can ...
3 years, 10 months ago (2017-02-10 18:28:28 UTC) #78
shenghao
https://codereview.chromium.org/2634263002/diff/290016/content/browser/renderer_host/media/video_capture_manager.h File content/browser/renderer_host/media/video_capture_manager.h (right): https://codereview.chromium.org/2634263002/diff/290016/content/browser/renderer_host/media/video_capture_manager.h#newcode350 content/browser/renderer_host/media/video_capture_manager.h:350: std::vector<media::VideoCaptureObserver*> capture_observers_; On 2017/02/10 18:28:28, jennyz wrote: > Why ...
3 years, 10 months ago (2017-02-11 00:54:51 UTC) #82
jennyz
https://codereview.chromium.org/2634263002/diff/330001/chromeos/audio/DEPS File chromeos/audio/DEPS (right): https://codereview.chromium.org/2634263002/diff/330001/chromeos/audio/DEPS#newcode3 chromeos/audio/DEPS:3: ] Since deps of BUILD.gn is at chromeos level, ...
3 years, 10 months ago (2017-02-13 18:33:03 UTC) #89
chfremer
Patch Set 9 lgtm % missing virtual destructor in interface VideoCaptureObserver Thanks for putting in ...
3 years, 10 months ago (2017-02-13 19:00:15 UTC) #90
shenghao
https://codereview.chromium.org/2634263002/diff/330001/chromeos/audio/DEPS File chromeos/audio/DEPS (right): https://codereview.chromium.org/2634263002/diff/330001/chromeos/audio/DEPS#newcode3 chromeos/audio/DEPS:3: ] On 2017/02/13 18:33:02, jennyz wrote: > Since deps ...
3 years, 10 months ago (2017-02-13 19:52:48 UTC) #91
jennyz
lgtm
3 years, 10 months ago (2017-02-13 21:05:11 UTC) #92
DaleCurtis
media/ rslgtm
3 years, 10 months ago (2017-02-13 22:28:20 UTC) #95
DaleCurtis
lgtm
3 years, 10 months ago (2017-02-13 22:28:28 UTC) #96
satorux1
chromeos/... lgtm https://codereview.chromium.org/2634263002/diff/370001/media/base/video_facing.h File media/base/video_facing.h (right): https://codereview.chromium.org/2634263002/diff/370001/media/base/video_facing.h#newcode14 media/base/video_facing.h:14: MEDIA_VIDEO_FACING_ENVIRONMENT, random idea: I'm not familiar with ...
3 years, 10 months ago (2017-02-14 00:58:46 UTC) #100
tommi (sloooow) - chröme
https://codereview.chromium.org/2634263002/diff/370001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): https://codereview.chromium.org/2634263002/diff/370001/content/browser/renderer_host/media/media_stream_manager.cc#newcode464 content/browser/renderer_host/media/media_stream_manager.cc:464: void MediaStreamManager::AddVideoCaptureObserver( please make sure that these to methods ...
3 years, 10 months ago (2017-02-14 09:11:19 UTC) #101
jochen (gone - plz use gerrit)
+hta
3 years, 10 months ago (2017-02-14 12:20:41 UTC) #103
shenghao
https://codereview.chromium.org/2634263002/diff/370001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): https://codereview.chromium.org/2634263002/diff/370001/content/browser/renderer_host/media/media_stream_manager.cc#newcode464 content/browser/renderer_host/media/media_stream_manager.cc:464: void MediaStreamManager::AddVideoCaptureObserver( On 2017/02/14 09:11:19, tommi (krómíum) wrote: > ...
3 years, 10 months ago (2017-02-15 03:00:38 UTC) #104
tommi (sloooow) - chröme
lgtm % one request https://codereview.chromium.org/2634263002/diff/430001/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/2634263002/diff/430001/content/browser/renderer_host/media/video_capture_manager.cc#newcode343 content/browser/renderer_host/media/video_capture_manager.cc:343: void VideoCaptureManager::AddVideoCaptureObserver( please add DCHECK_CURRENTLY_ON(BrowserThread::IO); ...
3 years, 10 months ago (2017-02-15 18:56:04 UTC) #116
nasko
https://codereview.chromium.org/2634263002/diff/430001/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/2634263002/diff/430001/content/browser/browser_main_loop.cc#newcode1169 content/browser/browser_main_loop.cc:1169: if (media_stream_manager_.get() != NULL) { Use nullptr, no more ...
3 years, 10 months ago (2017-02-15 19:13:47 UTC) #117
shenghao
https://codereview.chromium.org/2634263002/diff/430001/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/2634263002/diff/430001/content/browser/browser_main_loop.cc#newcode1169 content/browser/browser_main_loop.cc:1169: if (media_stream_manager_.get() != NULL) { On 2017/02/15 19:13:47, nasko ...
3 years, 10 months ago (2017-02-15 22:46:49 UTC) #118
jochen (gone - plz use gerrit)
instead of adding the new video_facing as a dependency everywhere, can't you make it a ...
3 years, 10 months ago (2017-02-16 15:07:15 UTC) #123
shenghao
https://codereview.chromium.org/2634263002/diff/450001/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/2634263002/diff/450001/content/browser/browser_main_loop.cc#newcode1176 content/browser/browser_main_loop.cc:1176: DLOG(ERROR) << "media_stream_manager_ is null."; On 2017/02/16 15:07:15, jochen ...
3 years, 10 months ago (2017-02-17 03:37:53 UTC) #132
hta - Chromium
High level comment: If audio devices are tied to cameras, they need to populate the ...
3 years, 10 months ago (2017-02-17 10:14:22 UTC) #138
palmer
RS LGTM https://codereview.chromium.org/2634263002/diff/550001/content/browser/renderer_host/media/media_stream_manager.h File content/browser/renderer_host/media/media_stream_manager.h (right): https://codereview.chromium.org/2634263002/diff/550001/content/browser/renderer_host/media/media_stream_manager.h#newcode101 content/browser/renderer_host/media/media_stream_manager.h:101: // AddVideoCaptureObserver() and RemoveAllVideoCaptureObservers() must be Nit: ...
3 years, 10 months ago (2017-02-17 23:11:28 UTC) #146
shenghao
On 2017/02/17 10:14:22, hta - Chromium wrote: > High level comment: > > If audio ...
3 years, 10 months ago (2017-02-20 19:53:52 UTC) #149
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2634263002/diff/550001/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/2634263002/diff/550001/content/browser/browser_main_loop.cc#newcode1168 content/browser/browser_main_loop.cc:1168: if (chromeos::CrasAudioHandler::IsInitialized()) { please move this entire logic to ...
3 years, 10 months ago (2017-02-21 11:37:24 UTC) #150
jochen (gone - plz use gerrit)
On 2017/02/21 at 11:37:24, jochen wrote: > https://codereview.chromium.org/2634263002/diff/550001/content/browser/browser_main_loop.cc > File content/browser/browser_main_loop.cc (right): > > https://codereview.chromium.org/2634263002/diff/550001/content/browser/browser_main_loop.cc#newcode1168 ...
3 years, 10 months ago (2017-02-21 11:38:19 UTC) #151
shenghao
https://codereview.chromium.org/2634263002/diff/550001/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/2634263002/diff/550001/content/browser/browser_main_loop.cc#newcode1168 content/browser/browser_main_loop.cc:1168: if (chromeos::CrasAudioHandler::IsInitialized()) { On 2017/02/21 11:37:24, jochen wrote: > ...
3 years, 10 months ago (2017-02-21 21:41:15 UTC) #154
jochen (gone - plz use gerrit)
lgtm
3 years, 10 months ago (2017-02-22 08:58:56 UTC) #157
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2634263002/570001
3 years, 10 months ago (2017-02-22 17:20:28 UTC) #160
commit-bot: I haz the power
3 years, 10 months ago (2017-02-22 20:15:10 UTC) #163
Message was sent while issue was closed.
Committed patchset #14 (id:570001) as
https://chromium.googlesource.com/chromium/src/+/77ec80cbdc1be45775bffd27605b...

Powered by Google App Engine
This is Rietveld 408576698