2008-02-22 09:09:46 +00:00
|
|
|
#ifndef MPLAYER_MP3_HDR_H
|
|
|
|
#define MPLAYER_MP3_HDR_H
|
2002-02-14 23:41:00 +00:00
|
|
|
|
2005-08-01 18:36:50 +00:00
|
|
|
int mp_get_mp3_header(unsigned char* hbuf,int* chans, int* freq, int* spf, int* mpa_layer, int* br);
|
2002-07-21 14:36:33 +00:00
|
|
|
|
2005-08-01 18:36:50 +00:00
|
|
|
#define mp_decode_mp3_header(hbuf) mp_get_mp3_header(hbuf,NULL,NULL,NULL,NULL,NULL)
|
2002-02-14 23:41:00 +00:00
|
|
|
|
|
|
|
static inline int mp_check_mp3_header(unsigned int head){
|
|
|
|
if( (head & 0x0000e0ff) != 0x0000e0ff ||
|
|
|
|
(head & 0x00fc0000) == 0x00fc0000) return 0;
|
|
|
|
if(mp_decode_mp3_header((unsigned char*)(&head))<=0) return 0;
|
|
|
|
return 1;
|
|
|
|
}
|
2008-01-01 21:35:58 +00:00
|
|
|
|
2008-02-22 09:09:46 +00:00
|
|
|
#endif /* MPLAYER_MP3_HDR_H */
|