RawMediaReader.h 882 B

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include "../Agave/DecodeFile/svc_raw_media_reader.h"
  3. #include "../Agave/DecodeFile/ifc_raw_media_reader.h"
  4. #include "giofile.h"
  5. // {5EC19CF3-E1ED-4AA5-AFD3-8E93149692BD}
  6. static const GUID mpeg_audio_raw_reader_guid =
  7. { 0x5ec19cf3, 0xe1ed, 0x4aa5, { 0xaf, 0xd3, 0x8e, 0x93, 0x14, 0x96, 0x92, 0xbd } };
  8. class RawMediaReaderService : public svc_raw_media_reader
  9. {
  10. public:
  11. static const char *getServiceName() { return "MPEG-1/2 Audio Raw Reader"; }
  12. static GUID getServiceGuid() { return mpeg_audio_raw_reader_guid; }
  13. int CreateRawMediaReader(const wchar_t *filename, ifc_raw_media_reader **reader);
  14. protected:
  15. RECVS_DISPATCH;
  16. };
  17. class RawMediaReader : public ifc_raw_media_reader
  18. {
  19. public:
  20. RawMediaReader(CGioFile *file);
  21. int Read(void *buffer, size_t buffer_size, size_t *bytes_read);
  22. size_t Release();
  23. protected:
  24. RECVS_DISPATCH;
  25. private:
  26. CGioFile *file;
  27. };