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

Side by Side Diff: content/browser/renderer_host/media/audio_output_service_impl.cc

Issue 2319493002: Add mojo interface for audio rendering. (Closed)
Patch Set: format Created 4 years, 2 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 2016 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 "content/browser/renderer_host/media/audio_output_service_impl.h"
6
7 namespace content {
8
9 void GetOutputControllers(
10 const RenderProcessHost::GetAudioOutputControllersCallback& callback) {
11 task_runner_->PostTask(DoGetOutputControllers, this, callback);
12 }
13
14 bool AudioOutputServiceImpl::HasActiveAudio() {
15 return base::AtomicRefCountIsZero(&num_playing_streams);
16 }
17
18 void AudioOutputServiceImpl::NotifyStreamCreated(BindingId binding) {
19 task_runner_->PostTask(Base::Bind(DoNotifyStreamCreated, this, binding));
20 }
21
22 void AudioOutputServiceImpl::NotifyStreamStateChanged(BindingId binding) {
23 task_runner_->PostTask(
24 Base::Bind(DoNotifyStreamStateChanged, this, binding, render_frame_id));
25 }
26
27 void DoGetOutputControllers(
28 const RenderProcessHost::GetAudioOutputControllersCallback& callback) {
29 RenderProcessHost::AudioOutputControllerList list;
30 }
31
32 void AudioOutputServiceImpl::DoNotifyStreamCreated(BindingId binding) {
33 g_audio_streams_tracker.Get().IncreaseStreamCount();
34 max_simultaneous_streams_ =
35 std::max(bindings_.size(), max_simultaneous_streams_);
36 }
37
38 void AudioOutputServiceImpl::RegisterStartedStream(BindingId binding);
39 {
40 g_audio_streams_tracker.Get().IncreaseStreamCount();
41 if (audio_entries_.size() > max_simultaneous_streams_)
42 max_simultaneous_streams_ = audio_entries_.size();
43 }
44
45 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698