| /* |
| * Copyright (C) 2015, Samsung Electronics Co. LTD |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| #ifndef EXYNOS_VISION_TARGET_H |
| #define EXYNOS_VISION_TARGET_H |
| |
| #include <map> |
| |
| #include <VX/vx.h> |
| #include <VX/vx_internal.h> |
| |
| #include "ExynosVisionReference.h" |
| #include "ExynosVisionKernel.h" |
| |
| namespace android { |
| using namespace std; |
| |
| class ExynosVisionTarget : public ExynosVisionReference { |
| private: |
| vx_char m_target_name[VX_MAX_TARGET_NAME]; |
| vx_enum m_target_enum; |
| map<vx_enum, ExynosVisionKernel*> m_kernel_map; |
| |
| public: |
| |
| private: |
| |
| public: |
| /* Constructor */ |
| ExynosVisionTarget(ExynosVisionContext *context, const vx_char name[VX_MAX_TARGET_NAME]); |
| |
| /* Destructor */ |
| virtual ~ExynosVisionTarget(void); |
| |
| virtual vx_status destroy(void); |
| |
| vx_char *getTargetName(void) |
| { |
| return m_target_name; |
| } |
| |
| vx_enum getTargetEnum(void) |
| { |
| return m_target_enum; |
| } |
| |
| vx_uint32 getKernelsNum() |
| { |
| return m_kernel_map.size(); |
| } |
| |
| ExynosVisionKernel* addKernel(const vx_char name[VX_MAX_KERNEL_NAME], |
| vx_enum enumeration, |
| vx_kernel_f func_ptr, |
| vx_uint32 numParams, |
| vx_kernel_input_validate_f input, |
| vx_kernel_output_validate_f output, |
| vx_kernel_initialize_f init, |
| vx_kernel_deinitialize_f deinit); |
| ExynosVisionKernel* getKernelByEnum(vx_enum kernel_enum); |
| ExynosVisionKernel* getKernelByName(const vx_char *name); |
| ExynosVisionKernel* getKernelByIndex(vx_uint32 index); |
| vx_status removeKernel(ExynosVisionKernel **kernel); |
| |
| virtual void displayInfo(vx_uint32 tab_num, vx_bool detail_info); |
| |
| static vx_enum getTargetEnumByName(const vx_char *name); |
| static vx_char* getTargetNameByEnum(vx_enum target_enum); |
| static vx_enum getTargetEnumByTargetString(const vx_char *target_string); |
| }; |
| |
| }; // namespace android |
| #endif |