annotate libmpdemux/mp3_hdr.h @ 31616:3da109629fca

Remove completely nonsensical le2me usages, the only effect they had was breaking playback on big-endian.
author reimar
date Sat, 10 Jul 2010 22:49:28 +0000
parents 0f1b5b68af32
children 7b4f8ecdc33b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29238
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
1 /*
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
2 * This file is part of MPlayer.
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
3 *
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
5 * it under the terms of the GNU General Public License as published by
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
7 * (at your option) any later version.
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
8 *
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
12 * GNU General Public License for more details.
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
13 *
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
14 * You should have received a copy of the GNU General Public License along
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
17 */
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26143
diff changeset
18
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25553
diff changeset
19 #ifndef MPLAYER_MP3_HDR_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25553
diff changeset
20 #define MPLAYER_MP3_HDR_H
4710
701976d7a7d1 fast header checker added
arpi
parents:
diff changeset
21
26143
268ecf0e1ba4 Add missing header #includes to fix 'make checkheaders'.
diego
parents: 26029
diff changeset
22 #include <stddef.h>
268ecf0e1ba4 Add missing header #includes to fix 'make checkheaders'.
diego
parents: 26029
diff changeset
23
16162
b5c2254d13f8 set i_bps in demux_audio for WAV and MP3 to avoid division by zero before
reimar
parents: 15199
diff changeset
24 int mp_get_mp3_header(unsigned char* hbuf,int* chans, int* freq, int* spf, int* mpa_layer, int* br);
6763
e29f95ed5d36 Fix vbr muxing and win32 codec crash on init
albeu
parents: 4710
diff changeset
25
16162
b5c2254d13f8 set i_bps in demux_audio for WAV and MP3 to avoid division by zero before
reimar
parents: 15199
diff changeset
26 #define mp_decode_mp3_header(hbuf) mp_get_mp3_header(hbuf,NULL,NULL,NULL,NULL,NULL)
4710
701976d7a7d1 fast header checker added
arpi
parents:
diff changeset
27
701976d7a7d1 fast header checker added
arpi
parents:
diff changeset
28 static inline int mp_check_mp3_header(unsigned int head){
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 29238
diff changeset
29 if( (head & 0x0000e0ff) != 0x0000e0ff ||
4710
701976d7a7d1 fast header checker added
arpi
parents:
diff changeset
30 (head & 0x00fc0000) == 0x00fc0000) return 0;
701976d7a7d1 fast header checker added
arpi
parents:
diff changeset
31 if(mp_decode_mp3_header((unsigned char*)(&head))<=0) return 0;
701976d7a7d1 fast header checker added
arpi
parents:
diff changeset
32 return 1;
701976d7a7d1 fast header checker added
arpi
parents:
diff changeset
33 }
25553
6ac1ece1f9fe Add multiple inclusion guards to all header files that lack them.
diego
parents: 16162
diff changeset
34
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25553
diff changeset
35 #endif /* MPLAYER_MP3_HDR_H */