amcodecMy Project: codec_type.h Source File

amcodec

codec_type.h
Go to the documentation of this file.
00001 
00008 /* Copyright (C) 2007-2011, Amlogic Inc.
00009 * All right reserved
00010 * 
00011 */
00012 #ifndef CODEC_TYPE_H_
00013 #define CODEC_TYPE_H_
00014 
00015 #include "amports/amstream.h"
00016 #include "amports/vformat.h"
00017 #include "amports/aformat.h"
00018 #include "ppmgr/ppmgr.h"
00019 
00020 typedef int CODEC_HANDLE;
00021 
00022 typedef enum {
00023     STREAM_TYPE_UNKNOW,
00024     STREAM_TYPE_ES_VIDEO,
00025     STREAM_TYPE_ES_AUDIO,
00026     STREAM_TYPE_ES_SUB,
00027     STREAM_TYPE_PS,
00028     STREAM_TYPE_TS,
00029     STREAM_TYPE_RM,
00030 } stream_type_t;
00031 
00032 typedef struct {
00033     unsigned int    format;  
00034     unsigned int    width;   
00035     unsigned int    height;  
00036     unsigned int    rate;    
00037     unsigned int    extra;   
00038     unsigned int    status;  
00039     unsigned int    ratio;   
00040     void *          param;   
00041     unsigned long long    ratio64;   
00042 } dec_sysinfo_t;
00043 
00044 typedef struct {
00045     int valid;               
00046     int sample_rate;         
00047     int channels;            
00048     int bitrate;             
00049     int codec_id;            
00050     int block_align;         
00051     int extradata_size;      
00052     char extradata[AUDIO_EXTRA_DATA_SIZE];;   
00053 } audio_info_t;
00054 
00055  typedef struct {
00056     int valid;               
00057     int sample_rate;         
00058     int channels;            
00059     int bitrate;             
00060     int codec_id;            
00061     int block_align;         
00062     int extradata_size;      
00063     char extradata[512];;   
00064 } Asf_audio_info_t;
00065 
00066 typedef struct {
00067     CODEC_HANDLE handle;        
00068     CODEC_HANDLE cntl_handle;   
00069     CODEC_HANDLE sub_handle;    
00070     CODEC_HANDLE audio_utils_handle;  
00071     stream_type_t stream_type;  
00072 unsigned int has_video:
00073     1;                          
00074 unsigned int  has_audio:
00075     1;                          
00076 unsigned int has_sub:
00077     1;                          
00078 unsigned int noblock:
00079     1;                          
00080     int video_type;             
00081     int audio_type;             
00082     int sub_type;               
00083     int video_pid;              
00084     int audio_pid;              
00085     int sub_pid;                
00086     int audio_channels;         
00087     int audio_samplerate;       
00088     int vbuf_size;              
00089     int abuf_size;              
00090     dec_sysinfo_t am_sysinfo;   
00091     audio_info_t audio_info;    
00092     int packet_size;            
00093     int avsync_threshold;    
00094     void * adec_priv;          
00095     int SessionID;
00096         int dspdec_not_supported;//check some profile that audiodsp decoder can not support,we switch to arm decoder
00097         int switch_audio_flag;          //<switch audio flag switching(1) else(0)
00098         int automute_flag;
00099 } codec_para_t;
00100 
00101 typedef struct 
00102 {
00103     signed char id;      
00104     unsigned char width;
00105     unsigned char height;
00106         unsigned char type;    
00107 }subtitle_info_t;
00108 #define MAX_SUB_NUM                     (32)
00109 
00110 #define IS_VALID_PID(t)     (t>=0 && t<=0x1fff)
00111 #define IS_VALID_STREAM(t)  (t>0 && t<=0x1fff)
00112 #define IS_VALID_ATYPE(t)   (t>=0 && t<AFORMAT_MAX)
00113 #define IS_VALID_VTYPE(t)   (t>=0 && t<VFORMAT_MAX)
00114 
00115 //pass to arm audio decoder
00116 typedef struct {
00117     int sample_rate;         
00118     int channels;            
00119     int format;            
00120     int bitrate;
00121     int block_align;
00122     int codec_id;         //original codecid corespingding to ffmepg
00123     int handle;        
00124     int extradata_size;      
00125     char extradata[AUDIO_EXTRA_DATA_SIZE];
00126         int SessionID;
00127         int dspdec_not_supported;//check some profile that audiodsp decoder can not support,we switch to arm decoder    
00128         int droppcm_flag;                               // drop pcm flag, if switch audio (1)
00129         int automute;
00130 } arm_audio_info;
00131 
00132 //audio decoder type, default arc
00133 #define AUDIO_ARC_DECODER 0
00134 #define AUDIO_ARM_DECODER 1
00135 #define AUDIO_FFMPEG_DECODER 2
00136 #define AUDIO_ARMWFD_DECODER  3
00137 #endif
Generated on Tue Dec 2 2014 21:58:54 for amcodecMy Project by   doxygen 1.7.6.1