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

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

Issue 191713002: Remove unsupported WebRtc test on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reload Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/media/webrtc_getusermedia_browsertest.cc ('k') | 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) 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"
11 #include "base/android/scoped_java_ref.h" 11 #include "base/android/scoped_java_ref.h"
12 #include "base/debug/trace_event.h"
13 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
15 #include "jni/VideoCapture_jni.h" 14 #include "jni/VideoCapture_jni.h"
16 #include "media/base/video_util.h" 15 #include "media/base/video_util.h"
17 16
18 using base::android::AttachCurrentThread; 17 using base::android::AttachCurrentThread;
19 using base::android::CheckException; 18 using base::android::CheckException;
20 using base::android::GetClass; 19 using base::android::GetClass;
21 using base::android::MethodID; 20 using base::android::MethodID;
22 using base::android::JavaRef; 21 using base::android::JavaRef;
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 224
226 Java_VideoCapture_deallocate(env, j_capture_.obj()); 225 Java_VideoCapture_deallocate(env, j_capture_.obj());
227 } 226 }
228 227
229 void VideoCaptureDeviceAndroid::OnFrameAvailable( 228 void VideoCaptureDeviceAndroid::OnFrameAvailable(
230 JNIEnv* env, 229 JNIEnv* env,
231 jobject obj, 230 jobject obj,
232 jbyteArray data, 231 jbyteArray data,
233 jint length, 232 jint length,
234 jint rotation) { 233 jint rotation) {
235 TRACE_EVENT0("video", "VideoCaptureDeviceAndroid::OnFrameAvailable");
236 DVLOG(3) << "VideoCaptureDeviceAndroid::OnFrameAvailable: length =" << length; 234 DVLOG(3) << "VideoCaptureDeviceAndroid::OnFrameAvailable: length =" << length;
237 235
238 base::AutoLock lock(lock_); 236 base::AutoLock lock(lock_);
239 if (state_ != kCapturing || !client_.get()) 237 if (state_ != kCapturing || !client_.get())
240 return; 238 return;
241 239
242 jbyte* buffer = env->GetByteArrayElements(data, NULL); 240 jbyte* buffer = env->GetByteArrayElements(data, NULL);
243 if (!buffer) { 241 if (!buffer) {
244 LOG(ERROR) << "VideoCaptureDeviceAndroid::OnFrameAvailable: " 242 LOG(ERROR) << "VideoCaptureDeviceAndroid::OnFrameAvailable: "
245 "failed to GetByteArrayElements"; 243 "failed to GetByteArrayElements";
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 void VideoCaptureDeviceAndroid::SetErrorState(const std::string& reason) { 283 void VideoCaptureDeviceAndroid::SetErrorState(const std::string& reason) {
286 LOG(ERROR) << "VideoCaptureDeviceAndroid::SetErrorState: " << reason; 284 LOG(ERROR) << "VideoCaptureDeviceAndroid::SetErrorState: " << reason;
287 { 285 {
288 base::AutoLock lock(lock_); 286 base::AutoLock lock(lock_);
289 state_ = kError; 287 state_ = kError;
290 } 288 }
291 client_->OnError(reason); 289 client_->OnError(reason);
292 } 290 }
293 291
294 } // namespace media 292 } // namespace media
OLDNEW
« no previous file with comments | « content/browser/media/webrtc_getusermedia_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698