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 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 jni->DeleteGlobalRef(render_egl_context_); | 850 jni->DeleteGlobalRef(render_egl_context_); |
851 render_egl_context_ = NULL; | 851 render_egl_context_ = NULL; |
852 } | 852 } |
853 if (!IsNull(jni, render_egl_context)) { | 853 if (!IsNull(jni, render_egl_context)) { |
854 render_egl_context_ = jni->NewGlobalRef(render_egl_context); | 854 render_egl_context_ = jni->NewGlobalRef(render_egl_context); |
855 if (CheckException(jni)) { | 855 if (CheckException(jni)) { |
856 ALOGE << "error calling NewGlobalRef for EGL Context."; | 856 ALOGE << "error calling NewGlobalRef for EGL Context."; |
857 render_egl_context_ = NULL; | 857 render_egl_context_ = NULL; |
858 } else { | 858 } else { |
859 jclass j_egl_context_class = | 859 jclass j_egl_context_class = |
860 FindClass(jni, "javax/microedition/khronos/egl/EGLContext"); | 860 FindClass(jni, "org/webrtc/Egl$Context"); |
861 if (!jni->IsInstanceOf(render_egl_context_, j_egl_context_class)) { | 861 if (!jni->IsInstanceOf(render_egl_context_, j_egl_context_class)) { |
862 ALOGE << "Wrong EGL Context."; | 862 ALOGE << "Wrong EGL Context."; |
863 jni->DeleteGlobalRef(render_egl_context_); | 863 jni->DeleteGlobalRef(render_egl_context_); |
864 render_egl_context_ = NULL; | 864 render_egl_context_ = NULL; |
865 } | 865 } |
866 } | 866 } |
867 } | 867 } |
868 if (render_egl_context_ == NULL) { | 868 if (render_egl_context_ == NULL) { |
869 ALOGW << "NULL VideoDecoder EGL context - HW surface decoding is disabled."; | 869 ALOGW << "NULL VideoDecoder EGL context - HW surface decoding is disabled."; |
870 } | 870 } |
(...skipping 17 matching lines...) Expand all Loading... |
888 } | 888 } |
889 | 889 |
890 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( | 890 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( |
891 webrtc::VideoDecoder* decoder) { | 891 webrtc::VideoDecoder* decoder) { |
892 ALOGD << "Destroy video decoder."; | 892 ALOGD << "Destroy video decoder."; |
893 delete decoder; | 893 delete decoder; |
894 } | 894 } |
895 | 895 |
896 } // namespace webrtc_jni | 896 } // namespace webrtc_jni |
897 | 897 |
OLD | NEW |