| Index: media/video/capture/video_capture_types.cc
|
| diff --git a/media/video/capture/video_capture_types.cc b/media/video/capture/video_capture_types.cc
|
| index ce5c354e290eed22fef06f69a067b4cf2d01265c..1b1fdd54ea785e040e077d9d0dcb1ae5908adc56 100644
|
| --- a/media/video/capture/video_capture_types.cc
|
| +++ b/media/video/capture/video_capture_types.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "media/video/capture/video_capture_types.h"
|
|
|
| +#include <cmath>
|
| +
|
| #include "base/logging.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "media/base/limits.h"
|
| @@ -69,4 +71,11 @@ std::string VideoCaptureFormat::PixelFormatToString(VideoPixelFormat format) {
|
|
|
| VideoCaptureParams::VideoCaptureParams()
|
| : resolution_change_policy(RESOLUTION_POLICY_FIXED) {}
|
| +
|
| +float DiffVideoCaptureFormat(const VideoCaptureFormat& lhs,
|
| + const VideoCaptureFormat& rhs) {
|
| + return std::abs(lhs.frame_size.width() - rhs.frame_size.width()) +
|
| + std::abs(lhs.frame_size.height() - rhs.frame_size.height()) +
|
| + std::fabs(lhs.frame_rate - rhs.frame_rate);
|
| +}
|
| } // namespace media
|
|
|