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 #include <vector> 27 28 namespace android { 29 30 struct MediaCodecInfo; 31 32 AString getProfilingVersionString(); 33 34 bool splitString(const AString &s, const AString &delimiter, AString *s1, AString *s2); 35 36 // profile codecs and save the result to xml file named kProfilingResults. 37 void profileCodecs(const std::vector<sp<MediaCodecInfo>> &infos, 38 const char* profilingResults); 39 40 // profile codecs and save the result to global_results, encoder_results and decoder_results. 41 void profileCodecs( 42 const std::vector<sp<MediaCodecInfo>> &infos, 43 CodecSettings *global_results, 44 KeyedVector<AString, CodecSettings> *encoder_results, 45 KeyedVector<AString, CodecSettings> *decoder_results, 46 bool forceToMeasure = false); 47 48 void exportResultsToXML( 49 const char *fileName, 50 const CodecSettings& global_results, 51 const KeyedVector<AString, CodecSettings>& encoder_results, 52 const KeyedVector<AString, CodecSettings>& decoder_results); 53 54 } // namespace android 55 56 #endif // MEDIA_CODEC_LIST_OVERRIDES_H_ 57