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

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

Issue 498213002: Mac QTKit video capture: Correct DCHECK #inputs==1 location (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import "media/video/capture/mac/video_capture_device_qtkit_mac.h" 5 #import "media/video/capture/mac/video_capture_device_qtkit_mac.h"
6 6
7 #import <QTKit/QTKit.h> 7 #import <QTKit/QTKit.h>
8 8
9 #include "base/debug/crash_logging.h" 9 #include "base/debug/crash_logging.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 // tasks in the main thread. See bugs http://crbug.com/152757 and 229 // tasks in the main thread. See bugs http://crbug.com/152757 and
230 // http://crbug.com/399792. 230 // http://crbug.com/399792.
231 [self performSelectorOnMainThread:@selector(stopCaptureOnUIThread:) 231 [self performSelectorOnMainThread:@selector(stopCaptureOnUIThread:)
232 withObject:nil 232 withObject:nil
233 waitUntilDone:YES]; 233 waitUntilDone:YES];
234 [[NSNotificationCenter defaultCenter] removeObserver:self]; 234 [[NSNotificationCenter defaultCenter] removeObserver:self];
235 } 235 }
236 236
237 - (void)stopCaptureOnUIThread:(id)dummy { 237 - (void)stopCaptureOnUIThread:(id)dummy {
238 if ([[captureSession_ inputs] count] > 0) { 238 if ([[captureSession_ inputs] count] > 0) {
239 DCHECK_EQ([[captureSession_ inputs] count], 1u);
239 [captureSession_ removeInput:captureDeviceInput_]; 240 [captureSession_ removeInput:captureDeviceInput_];
240 DCHECK_EQ([[captureSession_ inputs] count], 1u);
241 [captureSession_ stopRunning]; 241 [captureSession_ stopRunning];
242 } 242 }
243 if ([[captureSession_ outputs] count] > 0) { 243 if ([[captureSession_ outputs] count] > 0) {
244 DCHECK_EQ([[captureSession_ outputs] count], 1u); 244 DCHECK_EQ([[captureSession_ outputs] count], 1u);
245 id output = [[captureSession_ outputs] objectAtIndex:0]; 245 id output = [[captureSession_ outputs] objectAtIndex:0];
246 [output setDelegate:nil]; 246 [output setDelegate:nil];
247 [captureSession_ removeOutput:output]; 247 [captureSession_ removeOutput:output];
248 } 248 }
249 } 249 }
250 250
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 - (void)sendLogString:(NSString*)message { 348 - (void)sendLogString:(NSString*)message {
349 DVLOG(1) << [message UTF8String]; 349 DVLOG(1) << [message UTF8String];
350 [lock_ lock]; 350 [lock_ lock];
351 if (frameReceiver_) 351 if (frameReceiver_)
352 frameReceiver_->LogMessage([message UTF8String]); 352 frameReceiver_->LogMessage([message UTF8String]);
353 [lock_ unlock]; 353 [lock_ unlock];
354 } 354 }
355 355
356 @end 356 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698