📄 decoder_task.h
字号:
/************************************************** * * decoder.h * * CVS ID: $Id: decoder_task.h,v 1.24 2006/10/31 14:14:19 chlapik Exp $ * Author: Raffaele Belardi [RB] - STM * Date: $Date: 2006/10/31 14:14:19 $ * Revision: $Revision: 1.24 $ * * Description: * * Main entry point for Accordo+ Decoder task, definitions. * *************************************************** * * COPYRIGHT (C) ST Microelectronics 2005 * All Rights Reserved * **************************************************** * * STM CVS Log: * * $Log: decoder_task.h,v $ * Revision 1.24 2006/10/31 14:14:19 chlapik * support for Layer I & II: * - Layer type, sample rate and channel number are determined by BitrateParser before playback * - mp3 decoder checks if these parameters found in valid header matches, if not scan bitstream per bytes * * Revision 1.23 2006/09/18 09:55:21 belardi * Corrected CVS keyword usage * * Revision 1.22 2006/09/18 09:23:02 belardi * Added Log CVS keyword into file header * * ***************************************************/ #ifndef _DECODER_H_#define _DECODER_H_#include "decoder_defines.h"#include <stdio.h>typedef enum t_fileType_tag { ft_unknown, ft_MP3_LayerI, ft_MP3_LayerII, ft_MP3_LayerIII, ft_WMA,#if (0 != HAVE_AAC) ft_AAC,#endif ft_Audio} t_fileType;/* Return values for decoder function Defined here because they must be independent of the type of decoder (MP3,WMA..) */typedef enum decoderReturnType_tag { decoderUninitilaized, decoderEOF, decoderEOF_immediate, decoderWaitingFBdata, decoderWaitingABempty, // need to add more... decoderFatalError} decoderReturnType;/* Compressed Audio decoder states */typedef enum CADecoderState_tag { notInitialized, waitingHeaderData, searchingHeader, waitingFrameData, decodingFrames, waitingAudioBufferHeader, waitingAudioBuffer, waitingAudioBufferEOF, waitingFBreadyAfterFS, fatalError} CADecoderStateType;/* parameter type for KillDecoder() */typedef enum DecoderKillType_tag { destroy, closeOnly} DecoderKillType;/* DMA_SRC status event - AudioBuffer */typedef struct DMA_SRC_status_event { enum { DMA_STS_AB_EMPTY, DMA_STS_TIME_INFO, DMA_STS_RECONF } state; struct { RETVAL fsm_result; RETVAL error_reason; RETVAL transition; } status;} t_DMA_SRC_status_event;typedef enum{ DECODER_STATE_RESET, DECODER_STATE_RESET_TRANSITION, DECODER_STATE_WAIT_FB, DECODER_STATE_WAIT_AB, DECODER_STATE_PLAY, DECODER_STATE_SEEK_DONE} decoderStateType;/* decoder status event */typedef struct decoder_status_event { decoderStateType state; struct { RETVAL fsm_result; RETVAL error_reason; RETVAL transition; } status;} t_decoder_status_event;/* decoder command event */struct t_dec_start_event { t_fileType fileType; uint16 sampling_fr; uint8 ch_num;};struct t_dec_stop_event { UInt force_execution: 1; UInt unused :31;};struct t_dec_fb_ready_event { UInt unused : 32;};typedef enum{ DECODER_CMD_START, DECODER_CMD_STOP, DECODER_CMD_FB_READY, DECODER_CMD_AB_EMPTY} t_decoder_command;typedef struct decoder_cmd_event{ t_decoder_command command; union { struct t_dec_start_event start_params; struct t_dec_stop_event stop_params; struct t_dec_fb_ready_event fb_ready_params; } command_params; } t_decoder_cmd_event;#define DECODER_WAIT_AB_EMPTY 0#define DECODER_PLAYBACK 1#define t_decoder_inevent uint32#define t_decoder_outevent uint32/*---------------------------------------------------------------------------*//*!\brief DECODER Task inevent def *//*---------------------------------------------------------------------------*/#define DECODER_NEW_COMMAND_EVENT 0x01#define DECODER_NEW_STATUS_EVENT 0x02#define DECODER_NEW_TIME_EVENT 0x04extern t_decoder_status_event decoder_status_event;uint32 DecoderSeekOffset(unsigned char direction);uint8 decoderStopRequest(void);RETVAL decoder_task_cmd(t_decoder_cmd_event* cmd_event);void InitDecoderTask(void);void setDecoderPlayMode(t_PlayMode PlayMode);#endif /* _DECODER_H_*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -