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

Side by Side Diff: content/browser/renderer_host/media/audio_stream_registry.h

Issue 2578983003: Add AudioStreamRegistry. Move stream counting logic (Closed)
Patch Set: Thread checks. Created 3 years, 11 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_STREAM_REGISTRY_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_STREAM_REGISTRY_H_
7
8 #include "media/media_features.h"
9
10 namespace base {
11 class FilePath;
12 }
13
14 namespace content {
15
16 // This class tracks all the input and output streams and enables stream
17 // counting and debug recording controll for the RenderProcessHost. Methods
18 // may only be called on the IO thread.
19 class AudioStreamRegistry {
20 public:
21 class Stream {
22 public:
23 virtual ~Stream() {}
24
25 #if BUILDFLAG(ENABLE_WEBRTC)
26 // The stream is expected to add a suffix to this file name, making it
27 // unique.
28 virtual void EnableDebugRecording(const base::FilePath& base_file_name) = 0;
29 virtual void DisableDebugRecording() = 0;
30 #endif // BUILDFLAG(ENABLE_WEBRTC)
31 };
32
33 virtual ~AudioStreamRegistry() {}
o1ka 2017/01/10 11:47:40 protected?
34
35 // Streams must be removed before destruction.
36 // virtual void RegisterInputStream(Stream* stream) = 0;
37 virtual void RegisterOutputStream(Stream* stream) = 0;
38 // virtual void DeregisterInputStream(Stream* stream) = 0;
39 virtual void DeregisterOutputStream(Stream* stream) = 0;
40
41 virtual void OutputStreamStateChanged(Stream* stream, bool playing) = 0;
42 };
43
44 } // namespace content
45
46 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_STREAM_REGISTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698