aboutsummaryrefslogtreecommitdiff
path: root/Src/external_dependencies/openmpt-trunk/mptrack/StreamEncoderMP3.h
blob: ad61d68d33c068b2c21358f82f726c42c4d97941 (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
/*
 * StreamEncoder.h
 * ---------------
 * Purpose: Exporting streamed music files.
 * Notes  : none
 * Authors: Joern Heusipp
 *          OpenMPT Devs
 * The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
 */

#pragma once

#include "openmpt/all/BuildSettings.hpp"

#include "StreamEncoder.h"

OPENMPT_NAMESPACE_BEGIN


#ifdef MPT_WITH_LAME
class ComponentLame;
#endif

enum MP3EncoderType
{
	MP3EncoderLame,
	MP3EncoderLameCompatible,
};

class MP3Encoder : public EncoderFactoryBase
{

private:

	MP3EncoderType m_Type;

public:

	std::unique_ptr<IAudioStreamEncoder> ConstructStreamEncoder(std::ostream &file, const Encoder::Settings &settings, const FileTags &tags) const override;
	mpt::ustring DescribeQuality(float quality) const override;
	mpt::ustring DescribeBitrateABR(int bitrate) const override;
	bool IsAvailable() const override;

public:

	MP3Encoder(MP3EncoderType type);

};


OPENMPT_NAMESPACE_END