OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // AudioInputDeviceManager manages the audio input devices. In particular it | 5 // AudioInputDeviceManager manages the audio input devices. In particular it |
6 // communicates with MediaStreamManager and AudioInputRendererHost on the | 6 // communicates with MediaStreamManager and AudioInputRendererHost on the |
7 // browser IO thread, handles queries like enumerate/open/close from | 7 // browser IO thread, handles queries like enumerate/open/close from |
8 // MediaStreamManager and start/stop from AudioInputRendererHost. | 8 // MediaStreamManager and start/stop from AudioInputRendererHost. |
9 | 9 |
10 // All the queries come from the IO thread, while the work to enumerate devices | 10 // All the queries come from the IO thread, while the work to enumerate devices |
(...skipping 21 matching lines...) Expand all Loading... |
32 // AudioInputDeviceManager before MediaStream is implemented. | 32 // AudioInputDeviceManager before MediaStream is implemented. |
33 static const int kFakeOpenSessionId; | 33 static const int kFakeOpenSessionId; |
34 static const int kInvalidSessionId; | 34 static const int kInvalidSessionId; |
35 static const int kInvalidDevice; | 35 static const int kInvalidDevice; |
36 static const int kDefaultDeviceIndex; | 36 static const int kDefaultDeviceIndex; |
37 | 37 |
38 AudioInputDeviceManager(); | 38 AudioInputDeviceManager(); |
39 virtual ~AudioInputDeviceManager(); | 39 virtual ~AudioInputDeviceManager(); |
40 | 40 |
41 // MediaStreamProvider implementation, called on IO thread. | 41 // MediaStreamProvider implementation, called on IO thread. |
42 virtual void Register(MediaStreamProviderListener* listener); | 42 virtual void Register(MediaStreamProviderListener* listener) OVERRIDE; |
43 virtual void Unregister(); | 43 virtual void Unregister() OVERRIDE; |
44 virtual void EnumerateDevices(); | 44 virtual void EnumerateDevices() OVERRIDE; |
45 virtual int Open(const StreamDeviceInfo& device); | 45 virtual int Open(const StreamDeviceInfo& device) OVERRIDE; |
46 virtual void Close(int session_id); | 46 virtual void Close(int session_id) OVERRIDE; |
47 | 47 |
48 // Functions used by AudioInputRenderHost, called on IO thread. | 48 // Functions used by AudioInputRenderHost, called on IO thread. |
49 // Start the device referenced by the session id. | 49 // Start the device referenced by the session id. |
50 void Start(int session_id, | 50 void Start(int session_id, |
51 AudioInputDeviceManagerEventHandler* event_handler); | 51 AudioInputDeviceManagerEventHandler* event_handler); |
52 // Stop the device referenced by the session id. | 52 // Stop the device referenced by the session id. |
53 void Stop(int session_id); | 53 void Stop(int session_id); |
54 | 54 |
55 // Function used for testing to mock platform dependent device code. | 55 // Function used for testing to mock platform dependent device code. |
56 MessageLoop* message_loop(); | 56 MessageLoop* message_loop(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 AudioInputDeviceMap devices_; | 96 AudioInputDeviceMap devices_; |
97 | 97 |
98 DISALLOW_COPY_AND_ASSIGN(AudioInputDeviceManager); | 98 DISALLOW_COPY_AND_ASSIGN(AudioInputDeviceManager); |
99 }; | 99 }; |
100 | 100 |
101 } // namespace media_stream | 101 } // namespace media_stream |
102 | 102 |
103 DISABLE_RUNNABLE_METHOD_REFCOUNT(media_stream::AudioInputDeviceManager); | 103 DISABLE_RUNNABLE_METHOD_REFCOUNT(media_stream::AudioInputDeviceManager); |
104 | 104 |
105 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_DEVICE_MANAGER_H_ | 105 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_DEVICE_MANAGER_H_ |
OLD | NEW |