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

Unified Diff: content/renderer/media/media_stream_video_source.h

Issue 212973002: Refactor VideoDestinationHandler to implement MediaStreamVideoSource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/media_stream_video_source.h
diff --git a/content/renderer/media/media_stream_video_source.h b/content/renderer/media/media_stream_video_source.h
index 651f0037c17b8bd348b5169e1fc8f91d26aa015a..11eacca671a916955f3d6cb46df19ee8cb8806f4 100644
--- a/content/renderer/media/media_stream_video_source.h
+++ b/content/renderer/media/media_stream_video_source.h
@@ -66,6 +66,9 @@ class CONTENT_EXPORT MediaStreamVideoSource
// exist.
webrtc::VideoSourceInterface* GetAdapter();
+ // Return true if |name| is a constraint supported by MediaStreamVideoSource.
+ static bool IsConstraintSupported(const std::string& name);
+
// Constraint keys used by a video source.
// Specified by draft-alvestrand-constraints-resolution-00b
static const char kMinAspectRatio[]; // minAspectRatio
@@ -120,6 +123,15 @@ class CONTENT_EXPORT MediaStreamVideoSource
// method has been called, MediaStreamVideoSource may be deleted.
virtual void StopSourceImpl() = 0;
+ enum State {
+ NEW,
+ RETRIEVING_CAPABILITIES,
+ STARTING,
+ STARTED,
+ ENDED
+ };
+ State state() { return state_; }
+
private:
// Creates a webrtc::VideoSourceInterface used by libjingle.
void InitAdapter();
@@ -140,13 +152,6 @@ class CONTENT_EXPORT MediaStreamVideoSource
// AddTrack match the format that was used to start the device.
void FinalizeAddTrack();
- enum State {
- NEW,
- RETRIEVING_CAPABILITIES,
- STARTING,
- STARTED,
- ENDED
- };
State state_;
media::VideoCaptureFormat current_format_;

Powered by Google App Engine
This is Rietveld 408576698