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 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 } | 849 } |
850 } | 850 } |
851 if (render_egl_context_ == NULL) { | 851 if (render_egl_context_ == NULL) { |
852 ALOGW << "NULL VideoDecoder EGL context - HW surface decoding is disabled."; | 852 ALOGW << "NULL VideoDecoder EGL context - HW surface decoding is disabled."; |
853 } | 853 } |
854 } | 854 } |
855 | 855 |
856 webrtc::VideoDecoder* MediaCodecVideoDecoderFactory::CreateVideoDecoder( | 856 webrtc::VideoDecoder* MediaCodecVideoDecoderFactory::CreateVideoDecoder( |
857 VideoCodecType type) { | 857 VideoCodecType type) { |
858 if (supported_codec_types_.empty()) { | 858 if (supported_codec_types_.empty()) { |
859 ALOGE << "No HW video decoder for type " << (int)type; | 859 ALOGW << "No HW video decoder for type " << (int)type; |
860 return NULL; | 860 return NULL; |
861 } | 861 } |
862 for (VideoCodecType codec_type : supported_codec_types_) { | 862 for (VideoCodecType codec_type : supported_codec_types_) { |
863 if (codec_type == type) { | 863 if (codec_type == type) { |
864 ALOGD << "Create HW video decoder for type " << (int)type; | 864 ALOGD << "Create HW video decoder for type " << (int)type; |
865 return new MediaCodecVideoDecoder( | 865 return new MediaCodecVideoDecoder( |
866 AttachCurrentThreadIfNeeded(), type, render_egl_context_); | 866 AttachCurrentThreadIfNeeded(), type, render_egl_context_); |
867 } | 867 } |
868 } | 868 } |
869 ALOGE << "Can not find HW video decoder for type " << (int)type; | 869 ALOGW << "Can not find HW video decoder for type " << (int)type; |
870 return NULL; | 870 return NULL; |
871 } | 871 } |
872 | 872 |
873 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( | 873 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( |
874 webrtc::VideoDecoder* decoder) { | 874 webrtc::VideoDecoder* decoder) { |
875 ALOGD << "Destroy video decoder."; | 875 ALOGD << "Destroy video decoder."; |
876 delete decoder; | 876 delete decoder; |
877 } | 877 } |
878 | 878 |
879 } // namespace webrtc_jni | 879 } // namespace webrtc_jni |
880 | 880 |
OLD | NEW |