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.
133 lines
3.1 KiB
133 lines
3.1 KiB
/*
|
|
* Copyright (c) Hisilicon Technologies Co., Ltd. 2012-2019. All rights reserved.
|
|
* Description: API of subt output module
|
|
* Author: Hisilicon
|
|
* Create: 2012-03-12
|
|
*/
|
|
#ifndef SUBTITLE_DATA_H
|
|
#define SUBTITLE_DATA_H
|
|
|
|
#include "td_type.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define SUBT_MAX_PES_PACKET_LEN (64 * 1024)
|
|
|
|
/*
|
|
* @brief: Initialize this module
|
|
*
|
|
* @retval ::TD_SUCCESS - upon successful.
|
|
* @retval ::TD_FAILURE - failed.
|
|
*/
|
|
td_s32 SUBTDataRecvInit(td_void);
|
|
/*
|
|
* @brief: Destroy this module
|
|
*
|
|
* @retval ::TD_SUCCESS - upon successful.
|
|
* @retval ::TD_FAILURE - failed.
|
|
*/
|
|
td_s32 SUBTDataRecvDeInit(td_void);
|
|
|
|
/*
|
|
* @brief: Create the data receiving module.
|
|
*
|
|
* @param[in] pageID - page ID
|
|
* @param[in] ancillaryID - ancillary page ID
|
|
* @param[out] dataRecv - this module handle.
|
|
*
|
|
* @retval ::TD_SUCCESS - upon successful.
|
|
* @retval ::TD_FAILURE - failed.
|
|
*/
|
|
td_s32 SUBTDataRecvCreate(td_u16 pageID, td_u16 ancillaryID, td_void **dataRecv);
|
|
|
|
/*
|
|
* @brief:Destroy data receiving moudle.
|
|
*
|
|
* @param[in] dataRecv - this module handle
|
|
* @param[out] None.
|
|
*
|
|
* @retval ::TD_SUCCESS - upon successful
|
|
* @retval ::TD_FAILURE - failed.
|
|
*/
|
|
td_s32 SUBTDataRecvDestroy(td_void *dataRecv);
|
|
|
|
/*
|
|
* @brief:Reset data receiving moudle.
|
|
*
|
|
* @param[in] dataRecv - this module handle
|
|
* @param[in] isRecvFlag - whether recv data or not
|
|
* @param[out] None.
|
|
*
|
|
* @retval ::TD_SUCCESS - upon successful
|
|
* @retval ::TD_FAILURE - failed to reset.
|
|
*/
|
|
td_s32 SUBTDataRecvReset(td_void *dataRecv, td_bool isRecvFlag);
|
|
|
|
/*
|
|
* @brief:updata page id and ancillary id.
|
|
*
|
|
* @param[in] dataRecv - this module handle
|
|
* @param[in] pageID - page id
|
|
* @param[in] ancillaryID - ancillary id
|
|
* @param[out] None.
|
|
*
|
|
* @retval ::TD_SUCCESS - upon successful
|
|
* @retval ::TD_FAILURE - failed to updata page id.
|
|
*/
|
|
td_s32 SUBTDataRecvUpdata(td_void *dataRecv, td_u16 pageID, td_u16 ancillaryID);
|
|
|
|
/*
|
|
* @brief:bind parsing module.
|
|
*
|
|
* @param[in] dataRecv - this module handle
|
|
* @param[in] dataParse - the handle of data parsing module
|
|
* @param[out] None.
|
|
*
|
|
* @retval ::TD_SUCCESS - upon successful.
|
|
* @retval ::TD_FAILURE - failed to bind parsing module.
|
|
*/
|
|
td_s32 SUBTDataRecvBindParsing(td_void *dataRecv, td_void *dataParse);
|
|
|
|
/*
|
|
* @brief:unbind parsing module.
|
|
*
|
|
* @param[in] dataRecv - this module handle
|
|
* @param[out] None.
|
|
*
|
|
* @retval ::TD_SUCCESS - upon successful.
|
|
* @retval ::TD_FAILURE - failed to unbind.
|
|
*/
|
|
td_s32 SUBTDataRecvUnbindParsing(td_void *dataRecv);
|
|
|
|
/*
|
|
* @brief:redo the operation with cache data.
|
|
*
|
|
* @param[in] dataRecv - this module handle
|
|
* @param[out] None.
|
|
*
|
|
* @retval ::TD_SUCCESS - upon successful.
|
|
* @retval ::TD_FAILURE - failed to redo.
|
|
*/
|
|
td_s32 SUBTDataRecvRedo(td_void *dataRecv);
|
|
|
|
/*
|
|
* @brief:inject data.
|
|
*
|
|
* @param[in] dataRecv - this module handle
|
|
* @param[in] data - the pes packet data for subtitle
|
|
* @param[in] dataSize - pes data len
|
|
* @param[out] None.
|
|
*
|
|
* @retval ::TD_SUCCESS - upon successful, have finished parsing pes data.
|
|
* @retval ::TD_FAILURE - cannot finish pes data parsing.
|
|
*/
|
|
td_s32 SUBTDataRecvInject(td_void *dataRecv, const td_u8 *data, td_u32 dataSize);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|