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

Side by Side Diff: chrome/renderer/media/cast_receiver_audio_valve.cc

Issue 883293005: Cast: Basic cast_receiver API for chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merged Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/renderer/media/cast_receiver_audio_valve.h"
6
7 CastReceiverAudioValve::CastReceiverAudioValve(
8 media::AudioCapturerSource::CaptureCallback* cb)
9 : cb_(cb) {
10 }
11 CastReceiverAudioValve::~CastReceiverAudioValve() {}
12
13 void CastReceiverAudioValve::Capture(const media::AudioBus* audio_source,
14 int audio_delay_milliseconds,
15 double volume,
16 bool key_pressed) {
17 base::AutoLock lock(lock_);
18 if (cb_) {
19 cb_->Capture(audio_source, audio_delay_milliseconds, volume, key_pressed);
20 }
21 }
22
23 void CastReceiverAudioValve::OnCaptureError() {
24 base::AutoLock lock(lock_);
25 if (cb_) {
26 cb_->OnCaptureError();
27 }
28 }
29
30 void CastReceiverAudioValve::Stop() {
31 base::AutoLock lock(lock_);
32 cb_ = NULL;
miu 2015/02/11 02:52:49 nit: nullptr
hubbe 2015/02/11 22:38:16 Done.
33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698