avi_vp6_decoder.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #include "../Plugins/Input/in_avi/ifc_avivideodecoder.h"
  3. #include "../Plugins/Input/in_avi/svc_avidecoder.h"
  4. #include "duck_dxl.h"
  5. #include "../nsv/dec_if.h"
  6. // {51E8C046-6170-49ab-B690-1EDB58A2B76D}
  7. static const GUID avi_vp6_guid =
  8. { 0x51e8c046, 0x6170, 0x49ab, { 0xb6, 0x90, 0x1e, 0xdb, 0x58, 0xa2, 0xb7, 0x6d } };
  9. class AVIDecoderCreator : public svc_avidecoder
  10. {
  11. public:
  12. static const char *getServiceName() { return "VP6 AVI Decoder"; }
  13. static GUID getServiceGuid() { return avi_vp6_guid; }
  14. int CreateVideoDecoder(const nsavi::AVIH *avi_header, const nsavi::STRH *stream_header, const nsavi::STRF *stream_format, const nsavi::STRD *stream_data, ifc_avivideodecoder **decoder);
  15. protected:
  16. RECVS_DISPATCH;
  17. };
  18. class AVIVP6 : public ifc_avivideodecoder
  19. {
  20. public:
  21. AVIVP6(DXL_XIMAGE_HANDLE xim);
  22. int GetOutputProperties(int *x, int *y, int *color_format, double *aspect_ratio, int *flip);
  23. int DecodeChunk(uint16_t type, const void *inputBuffer, size_t inputBufferBytes);
  24. void Flush();
  25. int GetPicture(void **data, void **decoder_data);
  26. void FreePicture(void *data, void *decoder_data);
  27. void HurryUp(int state);
  28. private:
  29. DXL_XIMAGE_HANDLE xim;
  30. YV12_PLANES vidbufdec;
  31. int decoded;
  32. protected:
  33. RECVS_DISPATCH;
  34. };