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

Side by Side Diff: webrtc/api/java/jni/androidmediadecoder_jni.cc

Issue 1707933003: Change PeerConnectionFactory.setVideoHwAccelerationOptions to be able to replace Egl context. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/api/java/jni/androidmediaencoder_jni.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 ALOGD << "MediaCodecVideoDecoderFactory dtor"; 889 ALOGD << "MediaCodecVideoDecoderFactory dtor";
890 if (egl_context_) { 890 if (egl_context_) {
891 JNIEnv* jni = AttachCurrentThreadIfNeeded(); 891 JNIEnv* jni = AttachCurrentThreadIfNeeded();
892 jni->DeleteGlobalRef(egl_context_); 892 jni->DeleteGlobalRef(egl_context_);
893 } 893 }
894 } 894 }
895 895
896 void MediaCodecVideoDecoderFactory::SetEGLContext( 896 void MediaCodecVideoDecoderFactory::SetEGLContext(
897 JNIEnv* jni, jobject egl_context) { 897 JNIEnv* jni, jobject egl_context) {
898 ALOGD << "MediaCodecVideoDecoderFactory::SetEGLContext"; 898 ALOGD << "MediaCodecVideoDecoderFactory::SetEGLContext";
899 RTC_DCHECK(!egl_context_); 899 if (egl_context_) {
900 jni->DeleteGlobalRef(egl_context_);
901 egl_context_ = nullptr;
902 }
900 egl_context_ = jni->NewGlobalRef(egl_context); 903 egl_context_ = jni->NewGlobalRef(egl_context);
901 if (CheckException(jni)) { 904 if (CheckException(jni)) {
902 ALOGE << "error calling NewGlobalRef for EGL Context."; 905 ALOGE << "error calling NewGlobalRef for EGL Context.";
903 } 906 }
904 } 907 }
905 908
906 webrtc::VideoDecoder* MediaCodecVideoDecoderFactory::CreateVideoDecoder( 909 webrtc::VideoDecoder* MediaCodecVideoDecoderFactory::CreateVideoDecoder(
907 VideoCodecType type) { 910 VideoCodecType type) {
908 if (supported_codec_types_.empty()) { 911 if (supported_codec_types_.empty()) {
909 ALOGW << "No HW video decoder for type " << (int)type; 912 ALOGW << "No HW video decoder for type " << (int)type;
(...skipping 15 matching lines...) Expand all
925 ALOGD << "Destroy video decoder."; 928 ALOGD << "Destroy video decoder.";
926 delete decoder; 929 delete decoder;
927 } 930 }
928 931
929 const char* MediaCodecVideoDecoder::ImplementationName() const { 932 const char* MediaCodecVideoDecoder::ImplementationName() const {
930 return "MediaCodec"; 933 return "MediaCodec";
931 } 934 }
932 935
933 } // namespace webrtc_jni 936 } // namespace webrtc_jni
934 937
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/java/jni/androidmediaencoder_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698