You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
3.4 KiB

/*
* Copyright (c) Hisilicon Technologies Co., Ltd. 2012-2019. All rights reserved.
* Description: uapi_rm.h
* Author: Hisilicon
* Create: 2015/12/01
*/
#ifndef UAPI_RM_H
#define UAPI_RM_H
#include "td_type.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif
/* Type of the event callback function
* CNcomment:
*/
typedef enum {
UAPI_RM_EVENT_WIN_LACK = 0x1, /* <The window lack event><CNcomment: 窗口缺乏事件> */
UAPI_RM_EVENT_WIN_CREATED = 0x2, /* <The window be created event><CNcomment: 窗口创建事件> */
UAPI_RM_EVENT_WIN_DESTROYED = 0x4, /* <The window be destroyed event><CNcomment: 窗口销毁事件> */
UAPI_RM_EVENT_MAX,
} uapi_rm_event;
/* Type of the resource
* CNcomment:
*/
typedef enum {
UAPI_RM_RESOURCE_TYPE_ALL = 0x0, /* <The all resource><CNcomment: 所有资源> */
UAPI_RM_RESOURCE_TYPE_WIN, /* <The resource of video window><CNcomment: 视频窗口资源> */
UAPI_RM_RESOURCE_TYPE_TRACK, /* <The resource of audio track><CNcomment: 音频通道资源> */
UAPI_RM_RESOURCE_TYPE_VDEC, /* <The resource of vdec><CNcomment: 视频解码器资源> */
UAPI_RM_RESOURCE_TYPE_ADEC, /* <The resource of adec><CNcomment: 音频解码器资源> */
UAPI_RM_RESOURCE_MAX,
} uapi_rm_resource_type;
/* Defines the type of the event callback function
* CNcomment:
*/
typedef td_s32 (*uapi_rm_event_cb_fn)(td_void *client, uapi_rm_event event, td_u32 event_para);
/*
* brief Initializes the RM module. CNcomment:RM CNend
* attention
* param N/A
* retval: TD_SUCCESS Success CNcomment: CNend
* retval: TD_FAILURE Failure CNcomment: CNend
*/
td_s32 uapi_rm_init(td_void);
/*
* brief Deinitializes the RM module. CNcomment:RM CNend
* attention \n
* param N/A
* retval: TD_SUCCESS Success CNcomment: CNend
* retval: TD_FAILURE Failure CNcomment: CNend
*/
td_s32 uapi_rm_deinit(td_void);
/*
* brief Registers an event. CNcomment: CNend
* attention \n
* param[in] pClient client handle CNcomment:service CNend
* param[in] fn callback function CNcomment: CNend
* param[in] u32EventMask Event mask enumeration CNcomment: CNend
* retval: TD_SUCCESS Success CNcomment: CNend
* retval: TD_FAILURE Failure CNcomment: CNend
*/
td_s32 uapi_rm_register_callback(const td_void *client, uapi_rm_event_cb_fn fn, td_u32 event_mask);
/*
* brief Deregisters an event. CNcomment: CNend
* attention \n
* param[in] pClient client handle CNcomment:service CNend
* param[in] fn callback function CNcomment: CNend
* retval: TD_SUCCESS Success CNcomment: CNend
* retval: TD_FAILURE Failure CNcomment: CNend
*/
td_s32 uapi_rm_unregister_callback(const td_void *client, uapi_rm_event_cb_fn fn);
/*
* brief request resource. CNcomment: CNend
* attention \n
* param[in] enResourceType resource type CNcomment: CNend
* retval: TD_SUCCESS Success CNcomment: CNend
* retval: TD_FAILURE Failure CNcomment: CNend
*/
td_s32 uapi_rm_request_resource(uapi_rm_resource_type resource_type);
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif
#endif /* UAPI_RM_H */