Chromium Code Reviews| 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_ |