1
0

flv_vp6_decoder.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #pragma once
  2. #include "../Plugins/Input/in_flv/svc_flvdecoder.h"
  3. #include "../Plugins/Input/in_flv/FLVVideoHeader.h"
  4. #include "../Plugins/Input/in_flv/ifc_flvvideodecoder.h"
  5. #include "duck_dxl.h"
  6. #include "../nsv/dec_if.h"
  7. // {8FFD7807-26F0-44ef-9B6E-BEFDD6B5779A}
  8. static const GUID vp6_flv_guid =
  9. { 0x8ffd7807, 0x26f0, 0x44ef, { 0x9b, 0x6e, 0xbe, 0xfd, 0xd6, 0xb5, 0x77, 0x9a } };
  10. class FLVDecoderCreator : public svc_flvdecoder
  11. {
  12. public:
  13. static const char *getServiceName() { return "VP6 FLV Decoder"; }
  14. static GUID getServiceGuid() { return vp6_flv_guid; }
  15. int CreateVideoDecoder(int format_type, int width, int height, ifc_flvvideodecoder **decoder);
  16. int HandlesVideo(int format_type);
  17. protected:
  18. RECVS_DISPATCH;
  19. };
  20. class FLVVP6 : public ifc_flvvideodecoder
  21. {
  22. public:
  23. FLVVP6(DXL_XIMAGE_HANDLE xim);
  24. int GetOutputFormat(int *x, int *y, int *color_format);
  25. int DecodeSample(const void *inputBuffer, size_t inputBufferBytes, int32_t timestamp);
  26. void Close();
  27. int GetPicture(void **data, void **decoder_data, uint64_t *timestamp);
  28. private:
  29. DXL_XIMAGE_HANDLE xim;
  30. YV12_PLANES vidbufdec;
  31. int decoded;
  32. protected:
  33. RECVS_DISPATCH;
  34. };