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

Side by Side Diff: talk/app/webrtc/java/jni/androidmediadecoder_jni.cc

Issue 1461083002: Use EGL14 if supported on Android (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changed VideoRendererGui to return an EglBase.Context. Created 5 years 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
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 jni->DeleteGlobalRef(render_egl_context_); 851 jni->DeleteGlobalRef(render_egl_context_);
852 render_egl_context_ = NULL; 852 render_egl_context_ = NULL;
853 } 853 }
854 if (!IsNull(jni, render_egl_context)) { 854 if (!IsNull(jni, render_egl_context)) {
855 render_egl_context_ = jni->NewGlobalRef(render_egl_context); 855 render_egl_context_ = jni->NewGlobalRef(render_egl_context);
856 if (CheckException(jni)) { 856 if (CheckException(jni)) {
857 ALOGE << "error calling NewGlobalRef for EGL Context."; 857 ALOGE << "error calling NewGlobalRef for EGL Context.";
858 render_egl_context_ = NULL; 858 render_egl_context_ = NULL;
859 } else { 859 } else {
860 jclass j_egl_context_class = 860 jclass j_egl_context_class =
861 FindClass(jni, "javax/microedition/khronos/egl/EGLContext"); 861 FindClass(jni, "org/webrtc/EglBase$Context");
862 if (!jni->IsInstanceOf(render_egl_context_, j_egl_context_class)) { 862 if (!jni->IsInstanceOf(render_egl_context_, j_egl_context_class)) {
863 ALOGE << "Wrong EGL Context."; 863 ALOGE << "Wrong EGL Context.";
864 jni->DeleteGlobalRef(render_egl_context_); 864 jni->DeleteGlobalRef(render_egl_context_);
865 render_egl_context_ = NULL; 865 render_egl_context_ = NULL;
866 } 866 }
867 } 867 }
868 } 868 }
869 if (render_egl_context_ == NULL) { 869 if (render_egl_context_ == NULL) {
870 ALOGW << "NULL VideoDecoder EGL context - HW surface decoding is disabled."; 870 ALOGW << "NULL VideoDecoder EGL context - HW surface decoding is disabled.";
871 } 871 }
(...skipping 17 matching lines...) Expand all
889 } 889 }
890 890
891 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( 891 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder(
892 webrtc::VideoDecoder* decoder) { 892 webrtc::VideoDecoder* decoder) {
893 ALOGD << "Destroy video decoder."; 893 ALOGD << "Destroy video decoder.";
894 delete decoder; 894 delete decoder;
895 } 895 }
896 896
897 } // namespace webrtc_jni 897 } // namespace webrtc_jni
898 898
OLDNEW
« no previous file with comments | « talk/app/webrtc/java/android/org/webrtc/VideoRendererGui.java ('k') | talk/app/webrtc/java/jni/androidmediaencoder_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698