1 /* 2 * Copyright 2015 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef MEDIA_CODEC_LIST_OVERRIDES_H_ 18 19 #define MEDIA_CODEC_LIST_OVERRIDES_H_ 20 21 #include <media/MediaCodecInfo.h> 22 #include <media/stagefright/foundation/AString.h> 23 24 #include <utils/StrongPointer.h> 25 #include <utils/KeyedVector.h> 26 27 namespace android { 28 29 extern const char *kProfilingVersionString; 30 extern const char *kProfilingResults; 31 32 struct MediaCodecInfo; 33 34 AString getProfilingVersionString(); 35 36 bool splitString(const AString &s, const AString &delimiter, AString *s1, AString *s2); 37 38 // profile codecs and save the result to xml file named kProfilingResults. 39 void profileCodecs(const Vector<sp<MediaCodecInfo>> &infos); 40 41 // profile codecs and save the result to global_results, encoder_results and decoder_results. 42 void profileCodecs( 43 const Vector<sp<MediaCodecInfo>> &infos, 44 CodecSettings *global_results, 45 KeyedVector<AString, CodecSettings> *encoder_results, 46 KeyedVector<AString, CodecSettings> *decoder_results, 47 bool forceToMeasure = false); 48 49 void exportResultsToXML( 50 const char *fileName, 51 const CodecSettings& global_results, 52 const KeyedVector<AString, CodecSettings>& encoder_results, 53 const KeyedVector<AString, CodecSettings>& decoder_results); 54 55 } // namespace android 56 57 #endif // MEDIA_CODEC_LIST_OVERRIDES_H_ 58