1 /* 2 * Copyright 2017, 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 ANDROID_HARDWARE_MEDIA_OMX_V1_0_OMXSTORE_H 18 #define ANDROID_HARDWARE_MEDIA_OMX_V1_0_OMXSTORE_H 19 20 #include <hidl/MQDescriptor.h> 21 #include <hidl/Status.h> 22 23 #include <android/hardware/media/omx/1.0/IOmx.h> 24 #include <android/hardware/media/omx/1.0/IOmxStore.h> 25 #include <media/stagefright/xmlparser/MediaCodecsXmlParser.h> 26 27 namespace android { 28 namespace hardware { 29 namespace media { 30 namespace omx { 31 namespace V1_0 { 32 namespace implementation { 33 34 using ::android::hardware::media::omx::V1_0::IOmxStore; 35 using ::android::hardware::media::omx::V1_0::IOmx; 36 using ::android::hardware::media::omx::V1_0::Status; 37 using ::android::hidl::base::V1_0::IBase; 38 using ::android::hardware::hidl_string; 39 using ::android::hardware::hidl_vec; 40 using ::android::hardware::Return; 41 using ::android::hardware::Void; 42 using ::android::sp; 43 using ::android::wp; 44 45 struct OmxStore : public IOmxStore { 46 OmxStore( 47 const sp<IOmx> &omx = nullptr, 48 const char* owner = "default", 49 const std::vector<std::string> &searchDirs = 50 MediaCodecsXmlParser::getDefaultSearchDirs(), 51 const std::vector<std::string> &xmlFiles = 52 MediaCodecsXmlParser::getDefaultXmlNames(), 53 const char *xmlProfilingResultsPath = 54 MediaCodecsXmlParser::defaultProfilingResultsXmlPath); 55 56 virtual ~OmxStore(); 57 58 // Methods from IOmxStore 59 Return<void> listServiceAttributes(listServiceAttributes_cb) override; 60 Return<void> getNodePrefix(getNodePrefix_cb) override; 61 Return<void> listRoles(listRoles_cb) override; 62 Return<sp<IOmx>> getOmx(hidl_string const&) override; 63 64 protected: 65 Status mParsingStatus; 66 hidl_string mPrefix; 67 hidl_vec<ServiceAttribute> mServiceAttributeList; 68 hidl_vec<RoleInfo> mRoleList; 69 }; 70 71 } // namespace implementation 72 } // namespace V1_0 73 } // namespace omx 74 } // namespace media 75 } // namespace hardware 76 } // namespace android 77 78 #endif // ANDROID_HARDWARE_MEDIA_OMX_V1_0_OMXSTORE_H 79