Commit 4ff9bc71 authored by mostynb's avatar mostynb Committed by Commit bot

fix for builds with webrtc disabled

PepperVideoCaptureHost::OnFrameReady makes use of kUnknownFrameRate
which was previously only included in webrtc builds.  Let's move
these constants to the header file instead, since it can be
included in both webrtc and non-webrtc builds.

Followup to https://codereview.chromium.org/955253002.

BUG=461116,463829

Review URL: https://codereview.chromium.org/973373002

Cr-Commit-Position: refs/heads/master@{#319169}
parent dfe8c70f
......@@ -39,11 +39,6 @@ const char* kSupportedConstraints[] = {
MediaStreamVideoSource::kMinFrameRate,
};
const int MediaStreamVideoSource::kDefaultWidth = 640;
const int MediaStreamVideoSource::kDefaultHeight = 480;
const int MediaStreamVideoSource::kDefaultFrameRate = 30;
const int MediaStreamVideoSource::kUnknownFrameRate = 0;
namespace {
// Google-specific key prefix. Constraints with this prefix are ignored if they
......@@ -331,8 +326,10 @@ void GetBestCaptureFormat(
*capture_format = GetBestFormatBasedOnArea(
formats,
std::min(max_width, MediaStreamVideoSource::kDefaultWidth) *
std::min(max_height, MediaStreamVideoSource::kDefaultHeight));
std::min(max_width,
static_cast<int>(MediaStreamVideoSource::kDefaultWidth)) *
std::min(max_height,
static_cast<int>(MediaStreamVideoSource::kDefaultHeight)));
}
} // anonymous namespace
......
......@@ -76,12 +76,15 @@ class CONTENT_EXPORT MediaStreamVideoSource
static const char kMaxFrameRate[]; // maxFrameRate
static const char kMinFrameRate[]; // minFrameRate
// Default resolution. If no constraints are specified and the delegate
// support it, this is the resolution that will be used.
static const int kDefaultWidth;
static const int kDefaultHeight;
static const int kDefaultFrameRate;
static const int kUnknownFrameRate;
enum {
// Default resolution. If no constraints are specified and the delegate
// support it, this is the resolution that will be used.
kDefaultWidth = 640,
kDefaultHeight = 480,
kDefaultFrameRate = 30,
kUnknownFrameRate = 0,
};
protected:
void DoStopSource() override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment