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

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

Issue 23693004: Change Mac Video Capture format change ARGB->YUY2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected the CVPixelFormat to UYUV Created 7 years, 3 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
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/video/capture/mac/video_capture_device_mac.h" 5 #include "media/video/capture/mac/video_capture_device_mac.h"
6 6
7 #import <QTKit/QTKit.h> 7 #import <QTKit/QTKit.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 if (![capture_device_ setCaptureHeight:height 143 if (![capture_device_ setCaptureHeight:height
144 width:width 144 width:width
145 frameRate:frame_rate]) { 145 frameRate:frame_rate]) {
146 SetErrorState("Could not configure capture device."); 146 SetErrorState("Could not configure capture device.");
147 return; 147 return;
148 } 148 }
149 149
150 state_ = kAllocated; 150 state_ = kAllocated;
151 VideoCaptureCapability current_settings; 151 VideoCaptureCapability current_settings;
152 current_settings.color = PIXEL_FORMAT_ARGB; 152 current_settings.color = PIXEL_FORMAT_UYVY;
153 current_settings.width = width; 153 current_settings.width = width;
154 current_settings.height = height; 154 current_settings.height = height;
155 current_settings.frame_rate = frame_rate; 155 current_settings.frame_rate = frame_rate;
156 current_settings.expected_capture_delay = 0; 156 current_settings.expected_capture_delay = 0;
157 current_settings.interlaced = false; 157 current_settings.interlaced = false;
158 158
159 observer_->OnFrameInfo(current_settings); 159 observer_->OnFrameInfo(current_settings);
160 } 160 }
161 161
162 void VideoCaptureDeviceMac::Start() { 162 void VideoCaptureDeviceMac::Start() {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 230 }
231 231
232 void VideoCaptureDeviceMac::SetErrorState(const std::string& reason) { 232 void VideoCaptureDeviceMac::SetErrorState(const std::string& reason) {
233 DCHECK_EQ(loop_proxy_, base::MessageLoopProxy::current()); 233 DCHECK_EQ(loop_proxy_, base::MessageLoopProxy::current());
234 DLOG(ERROR) << reason; 234 DLOG(ERROR) << reason;
235 state_ = kError; 235 state_ = kError;
236 observer_->OnError(); 236 observer_->OnError();
237 } 237 }
238 238
239 } // namespace media 239 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698