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 27namespace android { 28 29extern const char *kProfilingVersionString; 30extern const char *kProfilingResults; 31 32struct MediaCodecInfo; 33 34AString getProfilingVersionString(); 35 36bool splitString(const AString &s, const AString &delimiter, AString *s1, AString *s2); 37 38// profile codecs and save the result to xml file named kProfilingResults. 39void profileCodecs(const Vector<sp<MediaCodecInfo>> &infos); 40 41// profile codecs and save the result to global_results, encoder_results and decoder_results. 42void 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 49void 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