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

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

Issue 1773273007: Cleanup: media_stream_api.* ==> media_stream_utils.* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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_UTILS_H_
6 #define CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_API_H_ 6 #define CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_UTILS_H_
7 7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
8 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
9 #include "media/base/audio_capturer_source.h"
10 #include "media/base/channel_layout.h" 11 #include "media/base/channel_layout.h"
11 #include "media/base/video_capturer_source.h"
12 12
13 namespace blink { 13 namespace blink {
14 class WebMediaStream; 14 class WebMediaStream;
15 } 15 }
16 16
17 namespace media {
18 class AudioCapturerSource;
19 class VideoCapturerSource;
20 }
21
17 namespace content { 22 namespace content {
18 // These methods create a WebMediaStreamSource + MediaStreamSource pair with the 23 // These methods create a WebMediaStreamSource + MediaStreamSource pair with the
19 // provided audio or video capturer source. A new WebMediaStreamTrack + 24 // provided audio or video capturer source. A new WebMediaStreamTrack +
20 // MediaStreamTrack pair is created, connected to the source and is plugged into 25 // MediaStreamTrack pair is created, connected to the source and is plugged into
21 // the WebMediaStream (|web_media_stream|). 26 // the WebMediaStream (|web_media_stream|).
22 // |is_remote| should be true if the source of the data is not a local device. 27 // |is_remote| should be true if the source of the data is not a local device.
23 // |is_readonly| should be true if the format of the data cannot be changed by 28 // |is_readonly| should be true if the format of the data cannot be changed by
24 // MediaTrackConstraints. 29 // MediaTrackConstraints.
25 CONTENT_EXPORT bool AddVideoTrackToMediaStream( 30 CONTENT_EXPORT bool AddVideoTrackToMediaStream(
26 scoped_ptr<media::VideoCapturerSource> video_source, 31 scoped_ptr<media::VideoCapturerSource> video_source,
27 bool is_remote, 32 bool is_remote,
28 bool is_readonly, 33 bool is_readonly,
29 blink::WebMediaStream* web_media_stream); 34 blink::WebMediaStream* web_media_stream);
30 35
31 // |sample_rate|, |channel_layout|, and |frames_per_buffer| specify the audio 36 // |sample_rate|, |channel_layout|, and |frames_per_buffer| specify the audio
32 // parameters of the track. Generally, these should match the |audio_source| so 37 // parameters of the track. Generally, these should match the |audio_source| so
33 // that it does not have to perform unnecessary sample rate conversion or 38 // that it does not have to perform unnecessary sample rate conversion or
34 // channel mixing. 39 // channel mixing.
35 CONTENT_EXPORT bool AddAudioTrackToMediaStream( 40 CONTENT_EXPORT bool AddAudioTrackToMediaStream(
36 scoped_refptr<media::AudioCapturerSource> audio_source, 41 scoped_refptr<media::AudioCapturerSource> audio_source,
tommi (sloooow) - chröme 2016/03/16 19:01:11 this should be by const & or pass a pointer to med
mcasas 2016/03/18 01:41:28 Added a TODO: it's beyond the reach of this CL sin
37 int sample_rate, 42 int sample_rate,
38 media::ChannelLayout channel_layout, 43 media::ChannelLayout channel_layout,
39 int frames_per_buffer, 44 int frames_per_buffer,
40 bool is_remote, 45 bool is_remote,
41 bool is_readonly, 46 bool is_readonly,
42 blink::WebMediaStream* web_media_stream); 47 blink::WebMediaStream* web_media_stream);
43 48
44 } // namespace content 49 } // namespace content
45 50
46 #endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_API_H_ 51 #endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_UTILS_H_
OLDNEW
« no previous file with comments | « content/public/renderer/media_stream_api.cc ('k') | content/public/renderer/media_stream_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698