include/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 00019 typedef int CODEC_HANDLE; 00020 00021 typedef enum { 00022 STREAM_TYPE_UNKNOW, 00023 STREAM_TYPE_ES_VIDEO, 00024 STREAM_TYPE_ES_AUDIO, 00025 STREAM_TYPE_ES_SUB, 00026 STREAM_TYPE_PS, 00027 STREAM_TYPE_TS, 00028 STREAM_TYPE_RM, 00029 } stream_type_t; 00030 00031 typedef struct { 00032 unsigned int format; 00033 unsigned int width; 00034 unsigned int height; 00035 unsigned int rate; 00036 unsigned int extra; 00037 unsigned int status; 00038 unsigned int ratio; 00039 void * param; 00040 } dec_sysinfo_t; 00041 00042 typedef struct { 00043 int valid; 00044 int sample_rate; 00045 int channels; 00046 int bitrate; 00047 int codec_id; 00048 int block_align; 00049 int extradata_size; 00050 char extradata[2048];; 00051 } audio_info_t; 00052 00053 typedef struct { 00054 CODEC_HANDLE handle; 00055 CODEC_HANDLE cntl_handle; 00056 CODEC_HANDLE sub_handle; 00057 stream_type_t stream_type; 00058 unsigned int has_video: 00059 1; 00060 unsigned int has_audio: 00061 1; 00062 unsigned int has_sub: 00063 1; 00064 unsigned int noblock: 00065 1; 00066 int video_type; 00067 int audio_type; 00068 int sub_type; 00069 int video_pid; 00070 int audio_pid; 00071 int sub_pid; 00072 int audio_channels; 00073 int audio_samplerate; 00074 int vbuf_size; 00075 int abuf_size; 00076 dec_sysinfo_t am_sysinfo; 00077 audio_info_t audio_info; 00078 int packet_size; 00079 } codec_para_t; 00080 00081 00082 #define IS_VALID_PID(t) (t>=0 && t<=0x1fff) 00083 #define IS_VALID_STREAM(t) (t>0 && t<=0x1fff) 00084 #define IS_VALID_ATYPE(t) (t>=0 && t<AFORMAT_MAX) 00085 #define IS_VALID_VTYPE(t) (t>=0 && t<VFORMAT_MAX) 00086 00087 #endif
Generated on Fri Feb 25 15:30:29 2011 for Amcodec by
