Index: talk/app/webrtc/java/jni/androidmediaencoder_jni.cc |
diff --git a/talk/app/webrtc/java/jni/androidmediaencoder_jni.cc b/talk/app/webrtc/java/jni/androidmediaencoder_jni.cc |
index c6c7594d87e8d48293cdfc60d46abf5f0c210cf7..b36dc0bb341bd53888041cc7e25f854532f868fd 100644 |
--- a/talk/app/webrtc/java/jni/androidmediaencoder_jni.cc |
+++ b/talk/app/webrtc/java/jni/androidmediaencoder_jni.cc |
@@ -109,6 +109,11 @@ class MediaCodecVideoEncoder : public webrtc::VideoEncoder, |
int GetTargetFramerate() override; |
bool SupportsNativeHandle() const override { return true; } |
+ const char* ImplementationName() const override; |
+ |
+ private: |
+ // CHECK-fail if not running on |codec_thread_|. |
+ void CheckOnCodecThread(); |
private: |
// ResetCodecOnCodecThread() calls ReleaseOnCodecThread() and |
@@ -1068,8 +1073,12 @@ int MediaCodecVideoEncoder::GetTargetFramerate() { |
return scale_ ? quality_scaler_.GetTargetFramerate() : -1; |
} |
+const char* MediaCodecVideoEncoder::ImplementationName() const { |
+ return "MediaCodec"; |
+} |
+ |
MediaCodecVideoEncoderFactory::MediaCodecVideoEncoderFactory() |
- : egl_context_ (nullptr) { |
+ : egl_context_(nullptr) { |
JNIEnv* jni = AttachCurrentThreadIfNeeded(); |
ScopedLocalRefFrame local_ref_frame(jni); |
jclass j_encoder_class = FindClass(jni, "org/webrtc/MediaCodecVideoEncoder"); |