blob: 77e1ea0139c081090f0448163cdefffa8cce9adb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
/****************************************************************************
* MPEG Layer3-Audio Decoder
* © 1997-2006 by Fraunhofer IIS
* All Rights Reserved
*
* filename: mp3ancofl.h
* project : MPEG Decoder
* author : Dieter Weninger
* date : 2003-05-14
* contents: ancillary data and original file length - HEADER
*
\***************************************************************************/
#ifndef __MP3ANCOFL_H__
#define __MP3ANCOFL_H__
#include "mpegbitstream.h"
#define ID_OFL 0xB
#define VERSION_0_LEN 8 /* bytes */
#define VERSION_1_LEN 10 /* bytes */
class CMp3AncOfl
{
public:
CMp3AncOfl(CBitStream &__Db);
~CMp3AncOfl();
void Reset(void);
int getVersion(void);
unsigned int getTotalLength(void);
unsigned int getCodecDelay(void);
unsigned int getAddDelay(void);
bool validOfl(void);
void fetchOfl(int oflOn,
CBitStream &Db,
int beforeScf,
unsigned int* startDelay,
unsigned int* totalLength);
int readAnc(unsigned char *ancBytes,
CBitStream &Db,
const int numAncBits);
int doReadBytes(){return m_readBytes;}
private:
void crcOfl(unsigned short crcPoly,
unsigned short crcMask,
unsigned long *crc,
unsigned char byte);
void cleanUp(void);
bool isFhGAnc( int size);
bool readOfl(CBitStream &Db, int beforeScaleFactors);
bool isOfl(void);
bool justSearched(void);
int toSkip(void);
void getOfl(CBitStream &Db, const int len);
CBitStream &m_Db; // dynamic buffer
unsigned char oflArray[10];
bool m_valid;
bool m_searched;
bool m_semaphor;
bool m_FhGAncChecked;
bool m_collecting;
bool m_mp3pro;
unsigned char* m_FhGAncBuf;
unsigned char* m_tmpAncBuf;
int m_pFhGAncBuf;
int m_FhGAncBufSize;
// flag signalling byte- or bit-wise reading
int m_readBytes;
};
#endif /* __MP3ANCOFL_H__ */
|