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

Unified Diff: content/public/renderer/media_stream_utils.cc

Issue 2710213005: Revert of Remove |remote| and |readonly| members of MediaStreamTrack (Closed)
Patch Set: Created 3 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
Index: content/public/renderer/media_stream_utils.cc
diff --git a/content/public/renderer/media_stream_utils.cc b/content/public/renderer/media_stream_utils.cc
index 20762598b9f25d815842f6bc2d45c6a6bb74404c..65491e3aafbb1b3b3a961e409e26421d1f6a1f15 100644
--- a/content/public/renderer/media_stream_utils.cc
+++ b/content/public/renderer/media_stream_utils.cc
@@ -25,6 +25,8 @@
bool AddVideoTrackToMediaStream(
std::unique_ptr<media::VideoCapturerSource> video_source,
+ bool is_remote,
+ bool is_readonly,
blink::WebMediaStream* web_media_stream) {
DCHECK(video_source.get());
if (!web_media_stream || web_media_stream->isNull()) {
@@ -38,8 +40,9 @@
MediaStreamSource::SourceStoppedCallback(), std::move(video_source));
const blink::WebString track_id =
blink::WebString::fromUTF8(base::GenerateGUID());
- web_media_stream_source.initialize(
- track_id, blink::WebMediaStreamSource::TypeVideo, track_id);
+ web_media_stream_source.initialize(track_id,
+ blink::WebMediaStreamSource::TypeVideo,
+ track_id, is_remote);
// Takes ownership of |media_stream_source|.
web_media_stream_source.setExtraData(media_stream_source);
@@ -56,6 +59,8 @@
int sample_rate,
media::ChannelLayout channel_layout,
int frames_per_buffer,
+ bool is_remote,
+ bool is_readonly,
blink::WebMediaStream* web_media_stream) {
DCHECK(audio_source.get());
if (!web_media_stream || web_media_stream->isNull()) {
@@ -74,11 +79,13 @@
blink::WebMediaStreamSource web_media_stream_source;
const blink::WebString track_id =
blink::WebString::fromUTF8(base::GenerateGUID());
- web_media_stream_source.initialize(
- track_id, blink::WebMediaStreamSource::TypeAudio, track_id);
+ web_media_stream_source.initialize(track_id,
+ blink::WebMediaStreamSource::TypeAudio,
+ track_id, is_remote);
MediaStreamAudioSource* const media_stream_source =
new ExternalMediaStreamAudioSource(std::move(audio_source), sample_rate,
- channel_layout, frames_per_buffer);
+ channel_layout, frames_per_buffer,
+ is_remote);
// Takes ownership of |media_stream_source|.
web_media_stream_source.setExtraData(media_stream_source);
« no previous file with comments | « content/public/renderer/media_stream_utils.h ('k') | content/renderer/media/capturefromelement/canvas_capture_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698