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

Side by Side Diff: content/renderer/media/media_stream_source_extra_data.h

Issue 11783059: Ensures that WebRTC works for device selection using a different sample rate than default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix after review from Chris Created 7 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 | Annotate | Revision Log
OLDNEW
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_SOURCE_EXTRA_DATA_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/common/media/media_stream_options.h" 10 #include "content/common/media/media_stream_options.h"
11 #include "media/base/audio_capturer_source.h"
11 #include "third_party/libjingle/source/talk/app/webrtc/videosourceinterface.h" 12 #include "third_party/libjingle/source/talk/app/webrtc/videosourceinterface.h"
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamSourc e.h" 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamSourc e.h"
13 14
14 namespace content { 15 namespace content {
15 16
16 class CONTENT_EXPORT MediaStreamSourceExtraData 17 class CONTENT_EXPORT MediaStreamSourceExtraData
17 : NON_EXPORTED_BASE(public WebKit::WebMediaStreamSource::ExtraData) { 18 : NON_EXPORTED_BASE(public WebKit::WebMediaStreamSource::ExtraData) {
18 public: 19 public:
20
19 explicit MediaStreamSourceExtraData( 21 explicit MediaStreamSourceExtraData(
20 const StreamDeviceInfo& device_info); 22 const StreamDeviceInfo& device_info);
23 explicit MediaStreamSourceExtraData(
24 media::AudioCapturerSource* source);
21 virtual ~MediaStreamSourceExtraData(); 25 virtual ~MediaStreamSourceExtraData();
22 26
23 // Return device information about the camera or microphone. 27 // Return device information about the camera or microphone.
24 const StreamDeviceInfo& device_info() const { 28 const StreamDeviceInfo& device_info() const {
25 return device_info_; 29 return device_info_;
26 } 30 }
27 31
28 void SetVideoSource(webrtc::VideoSourceInterface* source) { 32 void SetVideoSource(webrtc::VideoSourceInterface* source) {
29 video_source_ = source; 33 video_source_ = source;
30 } 34 }
31 35
32 webrtc::VideoSourceInterface* video_source() { return video_source_; } 36 webrtc::VideoSourceInterface* video_source() { return video_source_; }
37 media::AudioCapturerSource* audio_source() { return audio_source_; }
33 38
34 private: 39 private:
35 StreamDeviceInfo device_info_; 40 StreamDeviceInfo device_info_;
36 scoped_refptr<webrtc::VideoSourceInterface> video_source_; 41 scoped_refptr<webrtc::VideoSourceInterface> video_source_;
42 scoped_refptr<media::AudioCapturerSource> audio_source_;
37 43
38 DISALLOW_COPY_AND_ASSIGN(MediaStreamSourceExtraData); 44 DISALLOW_COPY_AND_ASSIGN(MediaStreamSourceExtraData);
39 }; 45 };
40 46
41 } // namespace content 47 } // namespace content
42 48
43 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_ 49 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_impl.cc ('k') | content/renderer/media/mock_media_stream_dependency_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698