| Index: webrtc/api/java/jni/androidvideocapturer_jni.cc
|
| diff --git a/webrtc/api/java/jni/androidvideocapturer_jni.cc b/webrtc/api/java/jni/androidvideocapturer_jni.cc
|
| index 615fcb32d80c30895e4958215e96be5ef5ed9dda..58c99238ee2df5853e24fd3b52ea2b87b7e2795e 100644
|
| --- a/webrtc/api/java/jni/androidvideocapturer_jni.cc
|
| +++ b/webrtc/api/java/jni/androidvideocapturer_jni.cc
|
| @@ -109,15 +109,17 @@ void AndroidVideoCapturerJni::Stop() {
|
|
|
| template <typename... Args>
|
| void AndroidVideoCapturerJni::AsyncCapturerInvoke(
|
| - const char* method_name,
|
| + const rtc::Location& posted_from,
|
| void (webrtc::AndroidVideoCapturer::*method)(Args...),
|
| typename Identity<Args>::type... args) {
|
| rtc::CritScope cs(&capturer_lock_);
|
| if (!invoker_) {
|
| - LOG(LS_WARNING) << method_name << "() called for closed capturer.";
|
| + LOG(LS_WARNING) << posted_from.function_name()
|
| + << "() called for closed capturer.";
|
| return;
|
| }
|
| - invoker_->AsyncInvoke<void>(rtc::Bind(method, capturer_, args...));
|
| + invoker_->AsyncInvoke<void>(posted_from,
|
| + rtc::Bind(method, capturer_, args...));
|
| }
|
|
|
| std::vector<cricket::VideoFormat>
|
| @@ -158,9 +160,8 @@ AndroidVideoCapturerJni::GetSupportedFormats() {
|
|
|
| void AndroidVideoCapturerJni::OnCapturerStarted(bool success) {
|
| LOG(LS_INFO) << "AndroidVideoCapturerJni capture started: " << success;
|
| - AsyncCapturerInvoke("OnCapturerStarted",
|
| - &webrtc::AndroidVideoCapturer::OnCapturerStarted,
|
| - success);
|
| + AsyncCapturerInvoke(
|
| + FROM_HERE, &webrtc::AndroidVideoCapturer::OnCapturerStarted, success);
|
| }
|
|
|
| void AndroidVideoCapturerJni::OnMemoryBufferFrame(void* video_frame,
|
| @@ -181,8 +182,7 @@ void AndroidVideoCapturerJni::OnMemoryBufferFrame(void* video_frame,
|
| buffer->MutableData(webrtc::kUPlane), buffer->stride(webrtc::kUPlane),
|
| buffer->MutableData(webrtc::kVPlane), buffer->stride(webrtc::kVPlane),
|
| width, height);
|
| - AsyncCapturerInvoke("OnIncomingFrame",
|
| - &webrtc::AndroidVideoCapturer::OnIncomingFrame,
|
| + AsyncCapturerInvoke(FROM_HERE, &webrtc::AndroidVideoCapturer::OnIncomingFrame,
|
| buffer, rotation, timestamp_ns);
|
| }
|
|
|
| @@ -194,15 +194,14 @@ void AndroidVideoCapturerJni::OnTextureFrame(int width,
|
| rtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer(
|
| surface_texture_helper_->CreateTextureFrame(width, height, handle));
|
|
|
| - AsyncCapturerInvoke("OnIncomingFrame",
|
| - &webrtc::AndroidVideoCapturer::OnIncomingFrame,
|
| + AsyncCapturerInvoke(FROM_HERE, &webrtc::AndroidVideoCapturer::OnIncomingFrame,
|
| buffer, rotation, timestamp_ns);
|
| }
|
|
|
| void AndroidVideoCapturerJni::OnOutputFormatRequest(int width,
|
| int height,
|
| int fps) {
|
| - AsyncCapturerInvoke("OnOutputFormatRequest",
|
| + AsyncCapturerInvoke(FROM_HERE,
|
| &webrtc::AndroidVideoCapturer::OnOutputFormatRequest,
|
| width, height, fps);
|
| }
|
|
|