AudioCodecs.h 476 B

1234567891011121314151617181920212223
  1. // Copyright (c) Kuba Szczodrzyński 2022-1-12.
  2. #pragma once
  3. #include "BaseCodec.h"
  4. #include "BaseContainer.h"
  5. #include <memory>
  6. enum class AudioCodec {
  7. UNKNOWN = 0,
  8. AAC = 1,
  9. MP3 = 2,
  10. VORBIS = 3,
  11. OPUS = 4,
  12. FLAC = 5,
  13. };
  14. class AudioCodecs {
  15. public:
  16. static std::shared_ptr<BaseCodec> getCodec(AudioCodec type);
  17. static std::shared_ptr<BaseCodec> getCodec(BaseContainer *container);
  18. static void addCodec(AudioCodec type, const std::shared_ptr<BaseCodec> &codec);
  19. };