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

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

Issue 1418263006: Extend VideoCaptureDevice::Client::OnError() to have a tracked_objects::Location param. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #import "media/capture/video/mac/video_capture_device_avfoundation_mac.h" 5 #import "media/capture/video/mac/video_capture_device_avfoundation_mac.h"
6 6
7 #import <CoreVideo/CoreVideo.h> 7 #import <CoreVideo/CoreVideo.h>
8 8
9 #include "base/location.h"
9 #include "base/logging.h" 10 #include "base/logging.h"
10 #include "base/mac/foundation_util.h" 11 #include "base/mac/foundation_util.h"
11 #include "media/base/video_capture_types.h" 12 #include "media/base/video_capture_types.h"
12 #include "media/capture/video/mac/video_capture_device_mac.h" 13 #include "media/capture/video/mac/video_capture_device_mac.h"
13 #include "ui/gfx/geometry/size.h" 14 #include "ui/gfx/geometry/size.h"
14 15
15 // Prefer MJPEG if frame width or height is larger than this. 16 // Prefer MJPEG if frame width or height is larger than this.
16 static const int kMjpegWidthThreshold = 640; 17 static const int kMjpegWidthThreshold = 640;
17 static const int kMjpegHeightThreshold = 480; 18 static const int kMjpegHeightThreshold = 480;
18 19
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 [self sendErrorString:[NSString 345 [self sendErrorString:[NSString
345 stringWithFormat:@"%@: %@", 346 stringWithFormat:@"%@: %@",
346 [error localizedDescription], 347 [error localizedDescription],
347 [error localizedFailureReason]]]; 348 [error localizedFailureReason]]];
348 } 349 }
349 350
350 - (void)sendErrorString:(NSString*)error { 351 - (void)sendErrorString:(NSString*)error {
351 DLOG(ERROR) << [error UTF8String]; 352 DLOG(ERROR) << [error UTF8String];
352 base::AutoLock lock(lock_); 353 base::AutoLock lock(lock_);
353 if (frameReceiver_) 354 if (frameReceiver_)
354 frameReceiver_->ReceiveError([error UTF8String]); 355 frameReceiver_->ReceiveError(FROM_HERE, [error UTF8String]);
355 } 356 }
356 357
357 @end 358 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698