aboutsummaryrefslogtreecommitdiff
path: root/Src/Plugins/Input/in_mp3/adts_vlb.h
blob: 7b6d3a9df753042963de708133cd1f15f94b366b (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
#ifndef NULLSOFT_IN_MP3_ADTS_VLB_H
#define NULLSOFT_IN_MP3_ADTS_VLB_H
#include "adts.h"

#include "../vlb/obj_vlbDecoder.h"
#include "api__in_mp3.h"
#include <api/service/waServiceFactory.h>

class ADTS_VLB : public adts
{
public:
	ADTS_VLB();
	int Initialize( bool forceMono, bool reverseStereo, bool allowSurround, int maxBits, bool allowRG, bool _useFloat, bool _useCRC );

	bool Open( ifc_mpeg_stream_reader *file );
	void Close();

	void GetOutputParameters( size_t *numBits, int *numChannels, int *sampleRate );
	void CalculateFrameSize( int *frameSize );

	void Flush( ifc_mpeg_stream_reader *file );

	size_t GetCurrentBitrate();
	size_t GetDecoderDelay();

	int Sync( ifc_mpeg_stream_reader *file, unsigned __int8 *output, size_t outputSize, size_t *outputWritten, size_t *bitrate );
	int Decode( ifc_mpeg_stream_reader *file, unsigned __int8 *output, size_t outputSize, size_t *outputWritten, size_t *bitrate, size_t *endCut );

	int GetLayer();
	void Release();

private:
	obj_vlbDecoder *decoder;
	int needsync;
	AACStreamParameters params;
};
#endif