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

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

Issue 2735793002: Add algorithm for processing constraints for video content capture. (Closed)
Patch Set: Add contradiction tests Created 3 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_constraints_util_video_content.h
diff --git a/content/renderer/media/media_stream_constraints_util_video_content.h b/content/renderer/media/media_stream_constraints_util_video_content.h
new file mode 100644
index 0000000000000000000000000000000000000000..a80798ecc395d42ad4671e63708bb38e38681fb0
--- /dev/null
+++ b/content/renderer/media/media_stream_constraints_util_video_content.h
@@ -0,0 +1,54 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CONSTRAINTS_UTIL_VIDEO_CONTENT_H_
+#define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CONSTRAINTS_UTIL_VIDEO_CONTENT_H_
+
+#include <string>
+
+#include "content/common/content_export.h"
+#include "media/capture/video_capture_types.h"
+#include "third_party/webrtc/base/optional.h"
+
+namespace blink {
+class WebMediaConstraints;
+}
+
+namespace content {
+
+struct CONTENT_EXPORT VideoContentCaptureSourceSelectionResult {
+ // Creates a result without value and with an empty |failed_constraint_name|.
+ VideoContentCaptureSourceSelectionResult();
+
+ VideoContentCaptureSourceSelectionResult(
+ const VideoContentCaptureSourceSelectionResult& other);
+ VideoContentCaptureSourceSelectionResult& operator=(
+ const VideoContentCaptureSourceSelectionResult& other);
+ VideoContentCaptureSourceSelectionResult(
+ VideoContentCaptureSourceSelectionResult&& other);
+ VideoContentCaptureSourceSelectionResult& operator=(
+ VideoContentCaptureSourceSelectionResult&& other);
+ ~VideoContentCaptureSourceSelectionResult();
+
+ bool HasValue() const;
+
+ // Convenience accessors for fields embedded in the capture_params field.
+ int Height() const;
+ int Width() const;
+ float FrameRate() const;
+ media::ResolutionChangePolicy ResolutionChangePolicy() const;
+
hta - Chromium 2017/03/08 13:34:09 Wonder if you could get away with a "private" here
Guido Urdaneta 2017/03/09 14:38:38 Done. Changed to a class.
+ std::string device_id;
+ rtc::Optional<bool> noise_reduction;
+ media::VideoCaptureParams capture_params;
+ const char* failed_constraint_name;
+};
+
+VideoContentCaptureSourceSelectionResult CONTENT_EXPORT
+SelectVideoContentCaptureSourceSettings(
+ const blink::WebMediaConstraints& constraints);
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CONSTRAINTS_UTIL_VIDEO_CONTENT_H_

Powered by Google App Engine
This is Rietveld 408576698