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

Side by Side Diff: content/public/renderer/media_stream_api.h

Issue 1505013002: Create CanvasCaptureMediaStreamTrack in a regular MediaStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
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
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_
OLDNEW
« no previous file with comments | « no previous file | content/public/renderer/media_stream_api.cc » ('j') | content/public/renderer/media_stream_api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698