#ifndef __CTRL_ADAPTOR_INTF_H__
#define __CTRL_ADAPTOR_INTF_H__

#include "queue.h"
#include "pthread.h"
#include "tsemaphore.h"
#include "u_common.h"
#include "u_priority.h"
#include "x_os.h"
#include "u_os.h"
#include "aud_dec.h"

#define AUD_ADAPTOR_MAIN_THREAD_STACK_SIZE    51200
#define AUD_ADAPTOR_MAIN_THREAD_PRIORITY    PRIORITY(PRIORITY_CLASS_REALTIME, PRIORITY_LAYER_TIME_CRITICAL, 0)

typedef struct AUD_DEC_ADAPTOR_TRIGGER_PARAM_STRUCT
{
    UINT16 u2CompBaseId;
    INT32 (*pfAudDecMngrCallback)(UINT16 u2CompId, AUD_DEC_EVENT_T eEvent, VOID *pInfo);
}AUD_DEC_ADAPTOR_TRIGGER_PARAM_STRUCT;

INT32 i4AudDecStop(UINT16 u2CompId);    // for stop
INT32 i4AudDecPaser(UINT16 u2CompId, AUD_DEC_AFIFO_T *ptAudAfifo, AUD_DEC_OUTPUT_BUF_T *ptAudDecMngrOutputBuf);    // for play
INT32 i4AudDecStart(UINT16 u2CompId, AUD_DEC_OUTPUT_BUF_T *ptAudDecMngrOutputBuf);    // for start decoder
INT32 i4AudDecFlush(UINT16 u2CompId);    // for flush
INT32 i4AudDecSetParameter(UINT16 u2CompId, AUD_DEC_SET_INFO_T eAudDecAdaptorSetParam, void *pDecAdaptorParam);    // for set parameter
INT32 i4AudDecGetParameter(UINT16 u2CompId, AUD_DEC_GET_INFO_T eAudDecAdaptorGetParam, void *pDecAdaptorParam);    // for get parameter
INT32 i4AudDecLoadDecoder(AUD_DEC_FMT_T eAudFmt, UINT16 u2CompId);    // for load decoder

INT32 i4AudDecAdaptorTrigger(AUD_DEC_ADAPTOR_TRIGGER_PARAM_STRUCT *pTriggerParam);

#endif

