www.pudn.com > H265+2008.8.rar > zpav8avi.h


 
/* 
/////////////////////////////////////////////////////////////////////////////// 
//                                                                           // 
//   Copyright (C) 2006-2008  Beijing,  pengzhen  (pengzhenxp@yahoo.com.cn)  // 
//                                                                           // 
/////////////////////////////////////////////////////////////////////////////// 
*/ 
 
#ifndef __ZPAV8_AVI_H__ 
#define __ZPAV8_AVI_H__ 
 
#include "zpid.h" 
#include "zpmem.h" 
 
#ifdef __cplusplus 
extern "C" { 
#endif  
 
#ifndef WIN32 
#define zpav_avi_api 
#endif /* !WIN32 */ 
 
#ifdef WIN32 
#ifdef zpav_avi_exports 
#define zpav_avi_api __declspec(dllexport) 
#else 
#define zpav_avi_api __declspec(dllimport) 
#endif  
#endif /* WIN32 */ 
 
/** 
* write avi  
*/ 
typedef struct _avi_context  
{ 
 
	/* video */ 
 
	unsigned int video_Handler; /* FOURCC_ZPV0 ~~~ FOURCC_ZPV9 */ 
	unsigned int video_tag; /* FOURCC_VIDEO */ /* FOURCC_STREAM */ 
 
	unsigned int width ; /* picture width. (must be a multiple of 16) */ /* 352 */ 
	unsigned int height; /* picture height. (must be a multiple of 16) */ /* 288 */ 
 
	unsigned int frame_rate; /* frames/second */ /* <25,30> */  
	unsigned int rgb_bit_count;   /* 32 : RGB32 ; 24 : RGB24 ; 16: RGB16 ; 16: RGB15 */ 
 
	unsigned int key_frame; /* the current frame is encoded as a key frame */ 
 
    /* audio */ 
 
	unsigned int audio_Handler; /* FOURCC_ZPA0 ~~~ FOURCC_ZPA9 */ 
	unsigned int audio_tag;     /* FOURCC_AUDIO */ /* FOURCC_STREAM */ 
 
	unsigned int sample_rate; /* sample rate */ /* 4000 ~~~ 48000 */ 
    unsigned int channels;  /* channels */ /* 1 2 */   
 
	unsigned int bit_rate;  /* bits/second */ /* <300*1000> */ 
	unsigned int frame_number;  /* video or audio frame number */ 
	unsigned int total_bytes; /* the total length of the codec bitstream */ 
 
} avi_context ; 
 
/* 
#define BI_RGB        0L 
#define BI_RLE8       1L 
#define BI_RLE4       2L 
#define BI_BITFIELDS  3L 
*/ 
 
/** 
* write avi (bits streams) 
*/	 
typedef enum __avi_streams__ 
{ 
	 
	FOURCC_VIDEO  = 'bd00' , 
	FOURCC_AUDIO  = 'bw00' , 
	FOURCC_AUDIO1 = 'bw10'   
		 
} avi_streams ; 
 
/** 
* write avi  
*/ 
zpav_avi_api void write_avi_header(avi_context*, char* )  ; 
zpav_avi_api void write_avi_trailer(avi_context*, char* )  ; 
zpav_avi_api void write_avi_packet(avi_context*, int, char*, int ) ; 
 
 
#ifdef __cplusplus 
} 
#endif  
 
#endif /* __ZPAV8_AVI_H__ */