OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |