| 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
|
| index f68a41d5817f3d963a4ab246fe2a6e8bd55962e6..fb7a210572645317eb0ca3667e1314b9f993c048 100644
|
| --- a/content/renderer/media/media_stream_constraints_util_video_content.h
|
| +++ b/content/renderer/media/media_stream_constraints_util_video_content.h
|
| @@ -7,9 +7,8 @@
|
|
|
| #include <string>
|
|
|
| -#include "base/logging.h"
|
| #include "content/common/content_export.h"
|
| -#include "media/capture/video_capture_types.h"
|
| +#include "content/renderer/media/media_stream_constraints_util.h"
|
| #include "third_party/webrtc/base/optional.h"
|
|
|
| namespace blink {
|
| @@ -18,67 +17,15 @@ class WebMediaConstraints;
|
|
|
| namespace content {
|
|
|
| -class CONTENT_EXPORT VideoContentCaptureSourceSelectionResult {
|
| - public:
|
| - // Creates a result without value and with an empty failed constraint name.
|
| - VideoContentCaptureSourceSelectionResult();
|
| +CONTENT_EXPORT extern const int kDefaultScreenCastWidth;
|
| +CONTENT_EXPORT extern const int kDefaultScreenCastHeight;
|
| +CONTENT_EXPORT extern const double kDefaultScreenCastFrameRate;
|
| +CONTENT_EXPORT extern const int kMinScreenCastDimension;
|
| +CONTENT_EXPORT extern const int kMaxScreenCastDimension;
|
|
|
| - // Creates a result without value and with the given |failed_constraint_name|.
|
| - // Does not take ownership of |failed_constraint_name|, so it must be null or
|
| - // point to a string that remains accessible.
|
| - explicit VideoContentCaptureSourceSelectionResult(
|
| - const char* failed_constraint_name);
|
| -
|
| - // Creates a result with the given values.
|
| - VideoContentCaptureSourceSelectionResult(
|
| - std::string device_id,
|
| - const rtc::Optional<bool>& noise_reduction,
|
| - media::VideoCaptureParams capture_params);
|
| -
|
| - VideoContentCaptureSourceSelectionResult(
|
| - const VideoContentCaptureSourceSelectionResult& other);
|
| - VideoContentCaptureSourceSelectionResult& operator=(
|
| - const VideoContentCaptureSourceSelectionResult& other);
|
| - VideoContentCaptureSourceSelectionResult(
|
| - VideoContentCaptureSourceSelectionResult&& other);
|
| - VideoContentCaptureSourceSelectionResult& operator=(
|
| - VideoContentCaptureSourceSelectionResult&& other);
|
| - ~VideoContentCaptureSourceSelectionResult();
|
| -
|
| - bool HasValue() const { return failed_constraint_name_ == nullptr; }
|
| -
|
| - // Accessors.
|
| - const char* failed_constraint_name() const { return failed_constraint_name_; }
|
| - const std::string& device_id() const {
|
| - DCHECK(HasValue());
|
| - return device_id_;
|
| - }
|
| - const rtc::Optional<bool>& noise_reduction() const {
|
| - DCHECK(HasValue());
|
| - return noise_reduction_;
|
| - }
|
| - media::VideoCaptureParams capture_params() const {
|
| - DCHECK(HasValue());
|
| - return capture_params_;
|
| - }
|
| -
|
| - // Convenience accessors for fields embedded in the |capture_params_| field.
|
| - int Height() const;
|
| - int Width() const;
|
| - float FrameRate() const;
|
| - media::ResolutionChangePolicy ResolutionChangePolicy() const;
|
| -
|
| - private:
|
| - const char* failed_constraint_name_;
|
| - std::string device_id_;
|
| - rtc::Optional<bool> noise_reduction_;
|
| - media::VideoCaptureParams capture_params_;
|
| -};
|
| -
|
| -// This function performs source and source-settings selection for content
|
| -// video capture based on the given |constraints|.
|
| -VideoContentCaptureSourceSelectionResult CONTENT_EXPORT
|
| -SelectVideoContentCaptureSourceSettings(
|
| +// This function performs source, source-settings and track-settings selection
|
| +// for content video capture based on the given |constraints|.
|
| +VideoCaptureSettings CONTENT_EXPORT SelectSettingsVideoContentCapture(
|
| const blink::WebMediaConstraints& constraints);
|
|
|
| } // namespace content
|
|
|