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

Side by Side Diff: media/video/capture/android/video_capture_device_android.cc

Issue 22876027: Consolidate duplicated frame / capability structures in video_capture_types.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased: changed media::VideoCaptureCapability::kI420 -> media::PIXEL_FORMAT_I420 etc. 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
« no previous file with comments | « media/media.gyp ('k') | media/video/capture/fake_video_capture_device.cc » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "media/video/capture/android/video_capture_device_android.h" 5 #include "media/video/capture/android/video_capture_device_android.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 return; 144 return;
145 } 145 }
146 146
147 // Store current width and height. 147 // Store current width and height.
148 current_settings_.width = 148 current_settings_.width =
149 Java_VideoCapture_queryWidth(env, j_capture_.obj()); 149 Java_VideoCapture_queryWidth(env, j_capture_.obj());
150 current_settings_.height = 150 current_settings_.height =
151 Java_VideoCapture_queryHeight(env, j_capture_.obj()); 151 Java_VideoCapture_queryHeight(env, j_capture_.obj());
152 current_settings_.frame_rate = 152 current_settings_.frame_rate =
153 Java_VideoCapture_queryFrameRate(env, j_capture_.obj()); 153 Java_VideoCapture_queryFrameRate(env, j_capture_.obj());
154 current_settings_.color = VideoCaptureCapability::kYV12; 154 current_settings_.color = PIXEL_FORMAT_YV12;
155 CHECK(current_settings_.width > 0 && !(current_settings_.width % 2)); 155 CHECK(current_settings_.width > 0 && !(current_settings_.width % 2));
156 CHECK(current_settings_.height > 0 && !(current_settings_.height % 2)); 156 CHECK(current_settings_.height > 0 && !(current_settings_.height % 2));
157 157
158 DVLOG(1) << "VideoCaptureDeviceAndroid::Allocate: queried width=" 158 DVLOG(1) << "VideoCaptureDeviceAndroid::Allocate: queried width="
159 << current_settings_.width 159 << current_settings_.width
160 << ", height=" 160 << ", height="
161 << current_settings_.height 161 << current_settings_.height
162 << ", frame_rate=" 162 << ", frame_rate="
163 << current_settings_.frame_rate; 163 << current_settings_.frame_rate;
164 // Report the frame size to the observer. 164 // Report the frame size to the observer.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 void VideoCaptureDeviceAndroid::SetErrorState(const std::string& reason) { 259 void VideoCaptureDeviceAndroid::SetErrorState(const std::string& reason) {
260 LOG(ERROR) << "VideoCaptureDeviceAndroid::SetErrorState: " << reason; 260 LOG(ERROR) << "VideoCaptureDeviceAndroid::SetErrorState: " << reason;
261 { 261 {
262 base::AutoLock lock(lock_); 262 base::AutoLock lock(lock_);
263 state_ = kError; 263 state_ = kError;
264 } 264 }
265 observer_->OnError(); 265 observer_->OnError();
266 } 266 }
267 267
268 } // namespace media 268 } // namespace media
OLDNEW
« no previous file with comments | « media/media.gyp ('k') | media/video/capture/fake_video_capture_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698