Ap4AsyncReaderStream.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:1k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. #pragma once
  2. #include "..BaseSplitterBaseSplitter.h"
  3. #include "Ap4.h"
  4. #include "Ap4File.h"
  5. //#include "Ap4Utils.h"
  6. //#include "Ap4Sample.h"
  7. #include "Ap4ByteStream.h"
  8. //#include "Ap4SampleEntry.h"
  9. //#include "Ap4IsmaCryp.h"
  10. //#include "Ap4AvcCAtom.h"
  11. //#include "Ap4FtabAtom.h"
  12. //#include "Ap4MdhdAtom.h"
  13. //#include "Ap4HdlrAtom.h"
  14. class AP4_AsyncReaderStream : public AP4_ByteStream
  15. {
  16. int m_refs;
  17. CBaseSplitterFile* m_pFile;
  18. public:
  19. AP4_AsyncReaderStream(CBaseSplitterFile* pFile);
  20. virtual ~AP4_AsyncReaderStream();
  21. void AddReference();
  22. void Release();
  23. AP4_Result Read(void* buffer, AP4_Size bytesToRead, AP4_Size* bytesRead);
  24. AP4_Result Write(const void* buffer, AP4_Size bytesToWrite, AP4_Size* bytesWritten);
  25. AP4_Result Seek(AP4_Offset offset);
  26. AP4_Result Tell(AP4_Offset& offset);
  27. AP4_Result GetSize(AP4_Size& size);
  28. };