2
* The contents of this file are subject to the Mozilla Public
3
* License Version 1.1 (the "License"); you may not use this file
4
* except in compliance with the License. You may obtain a copy of
5
* the License at http://www.mozilla.org/MPL/
7
* Software distributed under the License is distributed on an "AS
8
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9
* implied. See the License for the specific language governing
10
* rights and limitations under the License.
12
* The Original Code is MPEG4IP.
14
* The Initial Developer of the Original Code is Cisco Systems Inc.
15
* Portions created by Cisco Systems Inc. are
16
* Copyright (C) Cisco Systems Inc. 2000-2002. All Rights Reserved.
19
* Dave Mackie dmackie@cisco.com
22
#ifndef __MP4AV_MP3_INCLUDED__
23
#define __MP4AV_MP3_INCLUDED__
25
typedef u_int32_t MP4AV_Mp3Header;
31
bool MP4AV_Mp3GetNextFrame(
34
const u_int8_t** ppFrame,
35
u_int32_t* pFrameSize,
36
bool allowLayer4 DEFAULT_PARM(false),
37
bool donthack DEFAULT_PARM(false));
39
MP4AV_Mp3Header MP4AV_Mp3HeaderFromBytes(const u_int8_t* pBytes);
41
u_int8_t MP4AV_Mp3GetHdrVersion(MP4AV_Mp3Header hdr);
43
u_int8_t MP4AV_Mp3GetHdrLayer(MP4AV_Mp3Header hdr);
45
u_int8_t MP4AV_Mp3GetChannels(MP4AV_Mp3Header hdr);
47
u_int16_t MP4AV_Mp3GetHdrSamplingRate(MP4AV_Mp3Header hdr);
49
u_int16_t MP4AV_Mp3GetHdrSamplingWindow(MP4AV_Mp3Header hdr);
51
u_int16_t MP4AV_Mp3GetSamplingWindow(u_int16_t samplingRate);
53
u_int16_t MP4AV_Mp3GetBitRate(MP4AV_Mp3Header hdr);
55
u_int16_t MP4AV_Mp3GetFrameSize(MP4AV_Mp3Header hdr);
57
u_int16_t MP4AV_Mp3GetAduOffset(const u_int8_t* pFrame, u_int32_t frameSize);
59
u_int8_t MP4AV_Mp3GetCrcSize(MP4AV_Mp3Header hdr);
61
u_int8_t MP4AV_Mp3GetSideInfoSize(MP4AV_Mp3Header hdr);
63
u_int8_t MP4AV_Mp3ToMp4AudioType(u_int8_t mpegVersion);
68
#endif /* __MP4AV_MP3_INCLUDED__ */