Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(522)

Side by Side Diff: media/capture/video/mac/video_capture_device_mac.mm

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/capture/video/mac/video_capture_device_mac.h" 5 #include "media/capture/video/mac/video_capture_device_mac.h"
6 6
7 #include <IOKit/IOCFPlugIn.h> 7 #include <IOKit/IOCFPlugIn.h>
8 #include <IOKit/usb/IOUSBLib.h> 8 #include <IOKit/usb/IOUSBLib.h>
9 #include <IOKit/usb/USBSpec.h> 9 #include <IOKit/usb/USBSpec.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 [[VideoCaptureDeviceQTKit alloc] initWithFrameReceiver:this]; 458 [[VideoCaptureDeviceQTKit alloc] initWithFrameReceiver:this];
459 } 459 }
460 460
461 if (!capture_device_) 461 if (!capture_device_)
462 return false; 462 return false;
463 463
464 state_ = kIdle; 464 state_ = kIdle;
465 return true; 465 return true;
466 } 466 }
467 467
468 void VideoCaptureDeviceMac::ReceiveFrame(const uint8* video_frame, 468 void VideoCaptureDeviceMac::ReceiveFrame(const uint8_t* video_frame,
469 int video_frame_length, 469 int video_frame_length,
470 const VideoCaptureFormat& frame_format, 470 const VideoCaptureFormat& frame_format,
471 int aspect_numerator, 471 int aspect_numerator,
472 int aspect_denominator, 472 int aspect_denominator,
473 base::TimeDelta timestamp) { 473 base::TimeDelta timestamp) {
474 // This method is safe to call from a device capture thread, i.e. any thread 474 // This method is safe to call from a device capture thread, i.e. any thread
475 // controlled by QTKit/AVFoundation. 475 // controlled by QTKit/AVFoundation.
476 if (!final_resolution_selected_) { 476 if (!final_resolution_selected_) {
477 DCHECK(!AVFoundationGlue::IsAVFoundationSupported()); 477 DCHECK(!AVFoundationGlue::IsAVFoundationSupported());
478 if (capture_format_.frame_size.width() > kVGA.width || 478 if (capture_format_.frame_size.width() > kVGA.width ||
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 if (![capture_device_ setCaptureHeight:capture_format_.frame_size.height() 582 if (![capture_device_ setCaptureHeight:capture_format_.frame_size.height()
583 width:capture_format_.frame_size.width() 583 width:capture_format_.frame_size.width()
584 frameRate:capture_format_.frame_rate]) { 584 frameRate:capture_format_.frame_rate]) {
585 ReceiveError(FROM_HERE, "Could not configure capture device."); 585 ReceiveError(FROM_HERE, "Could not configure capture device.");
586 return false; 586 return false;
587 } 587 }
588 return true; 588 return true;
589 } 589 }
590 590
591 } // namespace media 591 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698