1/* 2 * Copyright (c) 2022 Shenzhen Kaihong DID Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16#ifndef CODEC_COMPONENT_MANAGER_SERVICE_H 17#define CODEC_COMPONENT_MANAGER_SERVICE_H 18 19#include <hdf_dlist.h> 20#include <hdf_remote_service.h> 21#include <pthread.h> 22#include "codec_component_if.h" 23#include "codec_component_manager_stub.h" 24#include "codec_component_type_service.h" 25#include "codec_internal.h" 26#ifdef __cplusplus 27extern "C" { 28#endif /* __cplusplus */ 29 30struct ComponentTypeNode { 31 uint32_t componentId; 32 struct CodecComponentType *service; 33 struct DListHead node; 34}; 35 36struct CodecComponentManagerSerivce { 37 struct CodecComponentManagerStub stub; 38 pthread_mutex_t listMute; 39 struct DListHead head; 40}; 41 42struct RemoteServiceDeathRecipient { 43 struct HdfDeathRecipient recipient; 44}; 45 46struct CodecComponentManagerSerivce *CodecComponentManagerSerivceGet(void); 47void OmxComponentManagerSeriveRelease(struct CodecComponentManagerSerivce *instance); 48void CleanRemoteServiceResource(struct HdfDeathRecipient *deathRecipient, struct HdfRemoteService *remote); 49#ifdef __cplusplus 50} 51#endif /* __cplusplus */ 52 53#endif // CODEC_COMPONENT_MANAGER_SERVICE_H