| Index: webrtc/api/java/jni/androidmediaencoder_jni.cc
|
| diff --git a/webrtc/api/java/jni/androidmediaencoder_jni.cc b/webrtc/api/java/jni/androidmediaencoder_jni.cc
|
| index 5a817b6e8446ed3bca12bce62ab0dc6b5be326b2..22102fb2b3931457c33e4f9ec3eb19522b760143 100644
|
| --- a/webrtc/api/java/jni/androidmediaencoder_jni.cc
|
| +++ b/webrtc/api/java/jni/androidmediaencoder_jni.cc
|
| @@ -419,35 +419,32 @@ int32_t MediaCodecVideoEncoder::InitEncode(
|
| }
|
|
|
| return codec_thread_->Invoke<int32_t>(
|
| - Bind(&MediaCodecVideoEncoder::InitEncodeOnCodecThread,
|
| - this,
|
| - init_width,
|
| - init_height,
|
| - codec_settings->startBitrate,
|
| - codec_settings->maxFramerate,
|
| - false /* use_surface */));
|
| + FROM_HERE, Bind(&MediaCodecVideoEncoder::InitEncodeOnCodecThread, this,
|
| + init_width, init_height, codec_settings->startBitrate,
|
| + codec_settings->maxFramerate, false /* use_surface */));
|
| }
|
|
|
| int32_t MediaCodecVideoEncoder::Encode(
|
| const webrtc::VideoFrame& frame,
|
| const webrtc::CodecSpecificInfo* /* codec_specific_info */,
|
| const std::vector<webrtc::FrameType>* frame_types) {
|
| - return codec_thread_->Invoke<int32_t>(Bind(
|
| - &MediaCodecVideoEncoder::EncodeOnCodecThread, this, frame, frame_types));
|
| + return codec_thread_->Invoke<int32_t>(
|
| + FROM_HERE, Bind(&MediaCodecVideoEncoder::EncodeOnCodecThread, this, frame,
|
| + frame_types));
|
| }
|
|
|
| int32_t MediaCodecVideoEncoder::RegisterEncodeCompleteCallback(
|
| webrtc::EncodedImageCallback* callback) {
|
| return codec_thread_->Invoke<int32_t>(
|
| + FROM_HERE,
|
| Bind(&MediaCodecVideoEncoder::RegisterEncodeCompleteCallbackOnCodecThread,
|
| - this,
|
| - callback));
|
| + this, callback));
|
| }
|
|
|
| int32_t MediaCodecVideoEncoder::Release() {
|
| ALOGD << "EncoderRelease request";
|
| return codec_thread_->Invoke<int32_t>(
|
| - Bind(&MediaCodecVideoEncoder::ReleaseOnCodecThread, this));
|
| + FROM_HERE, Bind(&MediaCodecVideoEncoder::ReleaseOnCodecThread, this));
|
| }
|
|
|
| int32_t MediaCodecVideoEncoder::SetChannelParameters(uint32_t /* packet_loss */,
|
| @@ -458,10 +455,8 @@ int32_t MediaCodecVideoEncoder::SetChannelParameters(uint32_t /* packet_loss */,
|
| int32_t MediaCodecVideoEncoder::SetRates(uint32_t new_bit_rate,
|
| uint32_t frame_rate) {
|
| return codec_thread_->Invoke<int32_t>(
|
| - Bind(&MediaCodecVideoEncoder::SetRatesOnCodecThread,
|
| - this,
|
| - new_bit_rate,
|
| - frame_rate));
|
| + FROM_HERE, Bind(&MediaCodecVideoEncoder::SetRatesOnCodecThread, this,
|
| + new_bit_rate, frame_rate));
|
| }
|
|
|
| void MediaCodecVideoEncoder::OnMessage(rtc::Message* msg) {
|
| @@ -481,7 +476,7 @@ void MediaCodecVideoEncoder::OnMessage(rtc::Message* msg) {
|
| // unclear how to signal such a failure to the app, so instead we stay silent
|
| // about it and let the next app-called API method reveal the borkedness.
|
| DeliverPendingOutputs(jni);
|
| - codec_thread_->PostDelayed(kMediaCodecPollMs, this);
|
| + codec_thread_->PostDelayed(FROM_HERE, kMediaCodecPollMs, this);
|
| }
|
|
|
| bool MediaCodecVideoEncoder::ResetCodecOnCodecThread() {
|
| @@ -595,7 +590,7 @@ int32_t MediaCodecVideoEncoder::InitEncodeOnCodecThread(
|
| }
|
|
|
| inited_ = true;
|
| - codec_thread_->PostDelayed(kMediaCodecPollMs, this);
|
| + codec_thread_->PostDelayed(FROM_HERE, kMediaCodecPollMs, this);
|
| return WEBRTC_VIDEO_CODEC_OK;
|
| }
|
|
|
| @@ -1172,6 +1167,7 @@ void MediaCodecVideoEncoder::OnDroppedFrame() {
|
| // directly.
|
| RTC_DCHECK(!codec_thread_checker_.CalledOnValidThread());
|
| codec_thread_->Invoke<void>(
|
| + FROM_HERE,
|
| Bind(&MediaCodecVideoEncoder::OnDroppedFrameOnCodecThread, this));
|
| }
|
|
|
|
|