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

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

Issue 1371373002: Extend components/test_runner's generated WebMediaStream to have a ChromeMock VideoTrack and Source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mazzoni@ comments, web_view/test_runner build, rebase, cleaned up requestUserMedia() Created 5 years, 2 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_api.h
diff --git a/content/public/renderer/media_stream_api.h b/content/public/renderer/media_stream_api.h
index 71ce675309b5c25ed69c7b7bc54051b4e8ee75eb..83f32940fc4ff74366e27f43edaf20525ebf953c 100644
--- a/content/public/renderer/media_stream_api.h
+++ b/content/public/renderer/media_stream_api.h
@@ -5,22 +5,28 @@
#ifndef CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_API_H_
#define CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_API_H_
+#include <string>
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
#include "media/base/audio_capturer_source.h"
#include "media/base/video_capturer_source.h"
namespace blink {
-class WebMediaStreamSource;
+class WebMediaStream;
}
-namespace Media {
+namespace media {
class AudioParameters;
}
namespace content {
-
-// These two methods will initialize a WebMediaStreamSource object to take
-// data from the provided audio or video capturer source.
+// 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|).
// |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.
@@ -29,8 +35,14 @@ CONTENT_EXPORT bool AddVideoTrackToMediaStream(
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);
+
CONTENT_EXPORT bool AddAudioTrackToMediaStream(
- scoped_refptr<media::AudioCapturerSource> source,
+ const scoped_refptr<media::AudioCapturerSource>& source,
const media::AudioParameters& params,
bool is_remote,
bool is_readonly,

Powered by Google App Engine
This is Rietveld 408576698