Chromium Code Reviews| Index: media/video/capture/mac/video_capture_device_mac.mm |
| diff --git a/media/video/capture/mac/video_capture_device_mac.mm b/media/video/capture/mac/video_capture_device_mac.mm |
| index b13496c8058bb3602e52b9fded4f9d42aa69a824..cab8717bda1a081885dbc65008858b35a1dd7790 100644 |
| --- a/media/video/capture/mac/video_capture_device_mac.mm |
| +++ b/media/video/capture/mac/video_capture_device_mac.mm |
| @@ -43,8 +43,8 @@ |
| namespace media { |
| -const int kMinFrameRate = 1; |
| -const int kMaxFrameRate = 30; |
| +const float kMinFrameRate = 1.0f; |
|
tommi (sloooow) - chröme
2014/08/13 12:42:29
can you add documentation for these constants? I'
mcasas
2014/08/13 14:04:52
Done.
|
| +const float kMaxFrameRate = 30.0f; |
| // In device identifiers, the USB VID and PID are stored in 4 bytes each. |
| const size_t kVidPidSize = 4; |
| @@ -350,7 +350,9 @@ VideoCaptureDeviceMac::VideoCaptureDeviceMac(const Name& device_name) |
| state_(kNotInitialized), |
| capture_device_(nil), |
| weak_factory_(this) { |
| - final_resolution_selected_ = AVFoundationGlue::IsAVFoundationSupported(); |
| + // Avoid reconfiguring AVFoundation or blacklisted devices. |
| + final_resolution_selected_ = AVFoundationGlue::IsAVFoundationSupported() || |
| + device_name.is_blacklisted(); |
| } |
| VideoCaptureDeviceMac::~VideoCaptureDeviceMac() { |
| @@ -569,13 +571,13 @@ void VideoCaptureDeviceMac::LogMessage(const std::string& message) { |
| } |
| bool VideoCaptureDeviceMac::UpdateCaptureResolution() { |
| - if (![capture_device_ setCaptureHeight:capture_format_.frame_size.height() |
| - width:capture_format_.frame_size.width() |
| - frameRate:capture_format_.frame_rate]) { |
| - ReceiveError("Could not configure capture device."); |
| - return false; |
| - } |
| - return true; |
| + if (![capture_device_ setCaptureHeight:capture_format_.frame_size.height() |
| + width:capture_format_.frame_size.width() |
| + frameRate:capture_format_.frame_rate]) { |
| + ReceiveError("Could not configure capture device."); |
| + return false; |
| + } |
| + return true; |
| } |
| } // namespace media |