OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_IMPL_H_ |
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 webrtc::MediaStreamInterface* stream, | 148 webrtc::MediaStreamInterface* stream, |
149 const base::Closure& error_cb, | 149 const base::Closure& error_cb, |
150 const VideoFrameProvider::RepaintCB& repaint_cb); | 150 const VideoFrameProvider::RepaintCB& repaint_cb); |
151 scoped_refptr<WebRtcAudioRenderer> CreateRemoteAudioRenderer( | 151 scoped_refptr<WebRtcAudioRenderer> CreateRemoteAudioRenderer( |
152 webrtc::MediaStreamInterface* stream); | 152 webrtc::MediaStreamInterface* stream); |
153 scoped_refptr<WebRtcLocalAudioRenderer> CreateLocalAudioRenderer( | 153 scoped_refptr<WebRtcLocalAudioRenderer> CreateLocalAudioRenderer( |
154 webrtc::MediaStreamInterface* stream); | 154 webrtc::MediaStreamInterface* stream); |
155 | 155 |
156 void StopLocalAudioTrack(const WebKit::WebMediaStream& web_stream); | 156 void StopLocalAudioTrack(const WebKit::WebMediaStream& web_stream); |
157 | 157 |
| 158 // Returns a valid session id if a single capture device is currently open |
| 159 // (and then the matching session_id), otherwise -1. |
| 160 // This is used to pass on a session id to a webrtc audio renderer (either |
| 161 // local or remote), so that audio will be rendered to a matching output |
| 162 // device, should one exist. |
| 163 // Note that if there are more than one open capture devices the function |
| 164 // will not be able to pick an appropriate device and return false. |
| 165 bool GetAuthorizedDeviceInfoForAudioRenderer( |
| 166 int* session_id, int* output_sample_rate, int* output_buffer_size); |
| 167 |
158 // Weak ref to a MediaStreamDependencyFactory, owned by the RenderThread. | 168 // Weak ref to a MediaStreamDependencyFactory, owned by the RenderThread. |
159 // It's valid for the lifetime of RenderThread. | 169 // It's valid for the lifetime of RenderThread. |
160 MediaStreamDependencyFactory* dependency_factory_; | 170 MediaStreamDependencyFactory* dependency_factory_; |
161 | 171 |
162 // media_stream_dispatcher_ is a weak reference, owned by RenderView. It's | 172 // media_stream_dispatcher_ is a weak reference, owned by RenderView. It's |
163 // valid for the lifetime of RenderView. | 173 // valid for the lifetime of RenderView. |
164 MediaStreamDispatcher* media_stream_dispatcher_; | 174 MediaStreamDispatcher* media_stream_dispatcher_; |
165 | 175 |
166 UserMediaRequests user_media_requests_; | 176 UserMediaRequests user_media_requests_; |
167 | 177 |
168 DISALLOW_COPY_AND_ASSIGN(MediaStreamImpl); | 178 DISALLOW_COPY_AND_ASSIGN(MediaStreamImpl); |
169 }; | 179 }; |
170 | 180 |
171 } // namespace content | 181 } // namespace content |
172 | 182 |
173 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_IMPL_H_ | 183 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_IMPL_H_ |
OLD | NEW |