www.pudn.com > iMagic_2006_0428_v098r23.rar > mp4_function.h


/* 
**************************************************************** 
*                      Magic Pixel Inc. 
*    Copyright 2004, Magic Pixel Inc., HsinChu, Taiwan 
*                    All rights reserved. 
* 
* 
* 
* Filename:    mp4_function.H 
* 
* Programmer:    Jacky Chang  
*                MPX E340 division 
* 
* Created: 11/24/2005 
* 
* Description: Common header file 
* 
*         
* Change History (most recent first): 
*     <1>     11/24/2005    Jacky Chang    first file 
**************************************************************** 
*/ 
 
#ifndef mp4_function_h 
#define mp4_function_h 
 
 
extern void aac_compare(int *buf, int len); 
 
uint32_t get_aac_sample_rate(uint8_t sr_index); 
void buf_stream_init(buffer_bs *bs, unsigned char * bufptr, int len); 
void buf_byte_align(buffer_bs *bs); 
unsigned int buf_1bit_read(buffer_bs *bs); 
unsigned int buf_bit_read(buffer_bs *bs,int len); 
unsigned int buf_bit_read2(buffer_bs *bs,int len); 
unsigned int check_file_type(mp4_dec *pmd, unsigned int filelen, unsigned int *srate, unsigned int *brate); 
void mp4_stream_init(mp4_struct *mp4s); 
void mp4_read_data(mp4_dec *pmd, unsigned char * buf, int len); 
unsigned int mp4_1byte_read(mp4_dec *pmd); 
void mp4_byte_skip(mp4_dec *pmd,int byte_len); 
 
int ADTSFrameCount(mp4_dec *pmd, int skipframe, unsigned int *tolsize); 
int ProgressFrame(mp4_dec *pmd); 
 
/* 
int mp4_init_frame(mp4_struct *mp4s); 
void mp4_next_frame(mp4_dec *pmd,mp4_struct *mp4s); 
int32_t mp4ff_num_samples(mp4ff_t *f, int32_t track); 
BOOL mp4_dec_end(mp4_dec *pmd); 
uint8_t program_config_element_mp4(mp4_dec *pmd, buffer_bs *bbs); 
int GetAACTrack(mp4_dec *pmd); 
int AudioSpecificConfig2(mp4_dec *pmd, buffer_bs *bbs); 
//-----------mp4 ----------------------------------- 
uint64_t mp4ff_atom_read_header(mp4_dec *pmd,  
          unsigned int *atom_type, int *header_size); 
int mp4ff_atom_read(mp4_dec *pmd,  int32_t size, uint8_t atom_type); 
int mp4ff_read_stsz(mp4_dec *pmd, int size); 
int mp4ff_read_stco(mp4_dec *pmd,int size); 
int mp4ff_read_stsc(mp4_dec *pmd,int size); 
int mp4ff_read_ctts(mp4_dec *pmd, int size); 
int mp4ff_read_stts(mp4_dec *pmd, int size); 
int mp4ff_read_stsd(mp4_dec *pmd, int totsize); 
int mp4ff_read_mvhd(mp4_dec *pmd, int size); 
int mp4ff_read_mdhd(mp4_dec *pmd, int size); 
int32_t parse_atoms(mp4_dec *pmd); 
 
void mp4ff_close(mp4ff_t *ff); 
 
unsigned __int64 mp4_8byte_read(mp4_dec *pmd); 
unsigned int mp4_nbyte_read(mp4_dec *pmd, int len); 
uint32_t mp4ff_read_mp4_descr_length(mp4_dec *pmd, int * read_num); 
int mp4ff_sample_to_offset(mp4ff_t *f, int32_t track,int32_t sample); 
int mp4_atom_value(unsigned char *ptr,int s_size,int a_idx,int s_idx); 
*/ 
#endif