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[] = { ...@@ -39,11 +39,6 @@ const char* kSupportedConstraints[] = {
MediaStreamVideoSource::kMinFrameRate, MediaStreamVideoSource::kMinFrameRate,
}; };
const int MediaStreamVideoSource::kDefaultWidth = 640;
const int MediaStreamVideoSource::kDefaultHeight = 480;
const int MediaStreamVideoSource::kDefaultFrameRate = 30;
const int MediaStreamVideoSource::kUnknownFrameRate = 0;
namespace { namespace {
// Google-specific key prefix. Constraints with this prefix are ignored if they // Google-specific key prefix. Constraints with this prefix are ignored if they
...@@ -331,8 +326,10 @@ void GetBestCaptureFormat( ...@@ -331,8 +326,10 @@ void GetBestCaptureFormat(
*capture_format = GetBestFormatBasedOnArea( *capture_format = GetBestFormatBasedOnArea(
formats, formats,
std::min(max_width, MediaStreamVideoSource::kDefaultWidth) * std::min(max_width,
std::min(max_height, MediaStreamVideoSource::kDefaultHeight)); static_cast<int>(MediaStreamVideoSource::kDefaultWidth)) *
std::min(max_height,
static_cast<int>(MediaStreamVideoSource::kDefaultHeight)));
} }
} // anonymous namespace } // anonymous namespace
......
...@@ -76,12 +76,15 @@ class CONTENT_EXPORT MediaStreamVideoSource ...@@ -76,12 +76,15 @@ class CONTENT_EXPORT MediaStreamVideoSource
static const char kMaxFrameRate[]; // maxFrameRate static const char kMaxFrameRate[]; // maxFrameRate
static const char kMinFrameRate[]; // minFrameRate static const char kMinFrameRate[]; // minFrameRate
// Default resolution. If no constraints are specified and the delegate enum {
// support it, this is the resolution that will be used. // Default resolution. If no constraints are specified and the delegate
static const int kDefaultWidth; // support it, this is the resolution that will be used.
static const int kDefaultHeight; kDefaultWidth = 640,
static const int kDefaultFrameRate; kDefaultHeight = 480,
static const int kUnknownFrameRate;
kDefaultFrameRate = 30,
kUnknownFrameRate = 0,
};
protected: protected:
void DoStopSource() override; 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