file_avi_reader.h 545 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include "avi_reader.h"
  3. #include <stdio.h>
  4. class AVIReaderFILE : public nsavi::avi_reader
  5. {
  6. public:
  7. AVIReaderFILE(const wchar_t *filename);
  8. ~AVIReaderFILE();
  9. /* avi_reader implementation */
  10. int Read(void *buffer, uint32_t read_length, uint32_t *bytes_read);
  11. int Peek(void *buffer, uint32_t read_length, uint32_t *bytes_read);
  12. int Seek(uint64_t position);
  13. uint64_t Tell();
  14. int Skip(uint32_t skip_bytes);
  15. void GetFilename(wchar_t *fn, size_t fn_len) {}
  16. uint64_t GetContentLength()
  17. {
  18. return 1;
  19. }
  20. private:
  21. FILE *f;
  22. };