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

Unified Diff: talk/app/webrtc/java/jni/androidvideocapturer_jni.cc

Issue 1178643006: VideoCapturerAndroid: Add possibility to request a new resolution from the video adapter. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: added log message Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: talk/app/webrtc/java/jni/androidvideocapturer_jni.cc
diff --git a/talk/app/webrtc/java/jni/androidvideocapturer_jni.cc b/talk/app/webrtc/java/jni/androidvideocapturer_jni.cc
index 1fcf635ac0ea17b46b0c8a13c63449135c17c2b7..3f3b7a6caddc4b446e4271dd824fcd5f537c195c 100644
--- a/talk/app/webrtc/java/jni/androidvideocapturer_jni.cc
+++ b/talk/app/webrtc/java/jni/androidvideocapturer_jni.cc
@@ -182,6 +182,15 @@ void AndroidVideoCapturerJni::OnIncomingFrame(void* video_frame,
this, video_frame, length, rotation, time_stamp));
}
+void AndroidVideoCapturerJni::OnOutputFormatRequest(int width,
+ int height,
+ int fps) {
+ invoker_.AsyncInvoke<void>(
+ thread_,
+ rtc::Bind(&AndroidVideoCapturerJni::OnOutputFormatRequest_w,
+ this, width, height, fps));
+}
+
void AndroidVideoCapturerJni::OnCapturerStarted_w(bool success) {
CHECK(thread_checker_.CalledOnValidThread());
if (capturer_) {
@@ -206,6 +215,17 @@ void AndroidVideoCapturerJni::OnIncomingFrame_w(void* video_frame,
}
}
+void AndroidVideoCapturerJni::OnOutputFormatRequest_w(int width,
+ int height,
+ int fps) {
+ CHECK(thread_checker_.CalledOnValidThread());
+ if (capturer_) {
+ capturer_->OnOutputFormatRequest(width, height, fps);
+ } else {
+ LOG(LS_WARNING) << "OnOutputFormatRequest_w is called for closed capturer.";
+ }
+}
+
JNIEnv* AndroidVideoCapturerJni::jni() { return AttachCurrentThreadIfNeeded(); }
JOW(void, VideoCapturerAndroid_00024NativeObserver_nativeOnFrameCaptured)
@@ -233,5 +253,13 @@ JOW(void, VideoCapturerAndroid_00024NativeObserver_nativeCapturerStarted)
j_success);
}
+JOW(void, VideoCapturerAndroid_00024NativeObserver_nativeOnOutputFormatRequest)
+ (JNIEnv* jni, jclass, jlong j_capturer, jint j_width, jint j_height,
+ jint j_fps) {
+ LOG(LS_INFO) << "NativeObserver_nativeOnOutputFormatRequest";
+ reinterpret_cast<AndroidVideoCapturerJni*>(j_capturer)->OnOutputFormatRequest(
+ j_width, j_height, j_fps);
+}
+
} // namespace webrtc_jni
« no previous file with comments | « talk/app/webrtc/java/jni/androidvideocapturer_jni.h ('k') | talk/app/webrtc/java/src/org/webrtc/VideoCapturerAndroid.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698