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

Unified Diff: content/public/renderer/media_stream_api.h

Issue 1647773002: MediaStream audio sourcing: Bypass audio processing for non-WebRTC cases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NOT FOR REVIEW -- This will be broken-up across multiple CLs. Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/common/media_stream_request.cc ('k') | content/public/renderer/media_stream_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/renderer/media_stream_api.h
diff --git a/content/public/renderer/media_stream_api.h b/content/public/renderer/media_stream_api.h
index dfb2aaf6ea1161d61c513b8634dedc460f98df54..ad7bfbbb0acde4f784071b1102b9f4fe98b8ba76 100644
--- a/content/public/renderer/media_stream_api.h
+++ b/content/public/renderer/media_stream_api.h
@@ -7,22 +7,18 @@
#include "content/common/content_export.h"
#include "media/base/audio_capturer_source.h"
+#include "media/base/channel_layout.h"
#include "media/base/video_capturer_source.h"
namespace blink {
class WebMediaStream;
}
-namespace media {
-class AudioParameters;
-}
-
namespace content {
// These methods create a WebMediaStreamSource + MediaStreamSource pair with the
// provided audio or video capturer source. A new WebMediaStreamTrack +
-// MediaStreamTrack pair is created, holding the previous MediaStreamSource, and
-// is plugged into the stream identified by |media_stream_url| (or passed as
-// |web_stream|).
+// MediaStreamTrack pair is created, connected to the source and is plugged into
+// the WebMediaStream (|web_stream|).
// |is_remote| should be true if the source of the data is not a local device.
// |is_readonly| should be true if the format of the data cannot be changed by
// MediaTrackConstraints.
@@ -30,21 +26,17 @@ CONTENT_EXPORT bool AddVideoTrackToMediaStream(
scoped_ptr<media::VideoCapturerSource> source,
bool is_remote,
bool is_readonly,
- const std::string& media_stream_url);
-CONTENT_EXPORT bool AddVideoTrackToMediaStream(
- scoped_ptr<media::VideoCapturerSource> source,
- bool is_remote,
- bool is_readonly,
blink::WebMediaStream* web_stream);
+// |sample_rate|, |channel_layout|, and |frames_per_buffer| specify the audio
+// parameters of the track. Generally, these should match the |source| so that
+// it does not have to perform unnecessary sample rate conversion or channel
+// mixing.
CONTENT_EXPORT bool AddAudioTrackToMediaStream(
const scoped_refptr<media::AudioCapturerSource>& source,
- const media::AudioParameters& params,
- bool is_remote,
- bool is_readonly,
- const std::string& media_stream_url);
-CONTENT_EXPORT bool AddAudioTrackToMediaStream(
- const scoped_refptr<media::AudioCapturerSource>& source,
+ int sample_rate,
+ media::ChannelLayout channel_layout,
+ int frames_per_buffer,
bool is_remote,
bool is_readonly,
blink::WebMediaStream* web_stream);
« no previous file with comments | « content/public/common/media_stream_request.cc ('k') | content/public/renderer/media_stream_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698