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 |