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

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

Issue 1451953002: Preliminary support of VP9 HW encoder on Android. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Address comments Created 5 years, 1 month 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 | talk/app/webrtc/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 * 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
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
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/java/jni/androidmediaencoder_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698