OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PUBLIC_RENDERER_MEDIA_STREAM_API_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_API_H_ |
6 #define CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_API_H_ | 6 #define CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_API_H_ |
7 | 7 |
8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
9 #include "media/base/audio_capturer_source.h" | 9 #include "media/base/audio_capturer_source.h" |
10 #include "media/base/video_capturer_source.h" | 10 #include "media/base/video_capturer_source.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 class WebMediaStream; | 13 class WebMediaStream; |
| 14 class WebMediaStreamTrack; |
14 } | 15 } |
15 | 16 |
16 namespace media { | 17 namespace media { |
17 class AudioParameters; | 18 class AudioParameters; |
18 } | 19 } |
19 | 20 |
20 namespace content { | 21 namespace content { |
21 // These methods create a WebMediaStreamSource + MediaStreamSource pair with the | 22 // These methods create a WebMediaStreamSource + MediaStreamSource pair with the |
22 // provided audio or video capturer source. A new WebMediaStreamTrack + | 23 // provided audio or video capturer source. A new WebMediaStreamTrack + |
23 // MediaStreamTrack pair is created, holding the previous MediaStreamSource, and | 24 // MediaStreamTrack pair is created, holding the previous MediaStreamSource, and |
(...skipping 18 matching lines...) Expand all Loading... |
42 const media::AudioParameters& params, | 43 const media::AudioParameters& params, |
43 bool is_remote, | 44 bool is_remote, |
44 bool is_readonly, | 45 bool is_readonly, |
45 const std::string& media_stream_url); | 46 const std::string& media_stream_url); |
46 CONTENT_EXPORT bool AddAudioTrackToMediaStream( | 47 CONTENT_EXPORT bool AddAudioTrackToMediaStream( |
47 const scoped_refptr<media::AudioCapturerSource>& source, | 48 const scoped_refptr<media::AudioCapturerSource>& source, |
48 bool is_remote, | 49 bool is_remote, |
49 bool is_readonly, | 50 bool is_readonly, |
50 blink::WebMediaStream* web_stream); | 51 blink::WebMediaStream* web_stream); |
51 | 52 |
| 53 // This method creates a WebMediaStreamSource + MediaStreamSource pair with the |
| 54 // provided VideoCapturerSource. A new MediaStreamTrack is created, holding the |
| 55 // previous MediaStreamSource, and is plugged into the track passed as |
| 56 // |web_track|. |
| 57 // |is_remote| should be true if the source of the data is not a local device. |
| 58 // |is_readonly| should be true if the format of the data cannot be changed by |
| 59 // MediaTrackConstraints. |
| 60 CONTENT_EXPORT bool AddVideoCapturerSourceToVideoTrack( |
| 61 scoped_ptr<media::VideoCapturerSource> source, |
| 62 bool is_remote, |
| 63 bool is_readonly, |
| 64 blink::WebMediaStreamTrack* web_track); |
52 } // namespace content | 65 } // namespace content |
53 | 66 |
54 #endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_API_H_ | 67 #endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_API_H_ |
OLD | NEW |