StreamEncoderMP3.h 958 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * StreamEncoder.h
  3. * ---------------
  4. * Purpose: Exporting streamed music files.
  5. * Notes : none
  6. * Authors: Joern Heusipp
  7. * OpenMPT Devs
  8. * The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
  9. */
  10. #pragma once
  11. #include "openmpt/all/BuildSettings.hpp"
  12. #include "StreamEncoder.h"
  13. OPENMPT_NAMESPACE_BEGIN
  14. #ifdef MPT_WITH_LAME
  15. class ComponentLame;
  16. #endif
  17. enum MP3EncoderType
  18. {
  19. MP3EncoderLame,
  20. MP3EncoderLameCompatible,
  21. };
  22. class MP3Encoder : public EncoderFactoryBase
  23. {
  24. private:
  25. MP3EncoderType m_Type;
  26. public:
  27. std::unique_ptr<IAudioStreamEncoder> ConstructStreamEncoder(std::ostream &file, const Encoder::Settings &settings, const FileTags &tags) const override;
  28. mpt::ustring DescribeQuality(float quality) const override;
  29. mpt::ustring DescribeBitrateABR(int bitrate) const override;
  30. bool IsAvailable() const override;
  31. public:
  32. MP3Encoder(MP3EncoderType type);
  33. };
  34. OPENMPT_NAMESPACE_END