mp4_ulaw_decoder.h 906 B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include "../Plugins/Input/in_mp4/mpeg4audio.h"
  3. // {F05D2AAA-6F21-4970-AE9C-8D9FFB497957}
  4. static const GUID mp4_ulaw_guid =
  5. { 0xf05d2aaa, 0x6f21, 0x4970, { 0xae, 0x9c, 0x8d, 0x9f, 0xfb, 0x49, 0x79, 0x57 } };
  6. class MP4ulawDecoder : public MP4AudioDecoder
  7. {
  8. public:
  9. static const char *getServiceName() { return "ulaw MP4 Decoder"; }
  10. static GUID getServiceGuid() { return mp4_ulaw_guid; }
  11. MP4ulawDecoder();
  12. int Open();
  13. void Close();
  14. int GetOutputProperties(unsigned int *sampleRate, unsigned int *channels, unsigned int *bitsPerSample);
  15. int DecodeSample(void *inputBuffer, size_t inputBufferBytes, void *outputBuffer, size_t *outputBufferBytes);
  16. int CanHandleCodec(const char *codecName);
  17. //int SetGain(float _gain) { gain=_gain; return MP4_SUCCESS; }
  18. int RequireChunks(); // return 1 if your decoder wants to read whole chunks rather than samples
  19. protected:
  20. RECVS_DISPATCH;
  21. };