flv_f263_decoder.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 "../Winamp/wa_ipc.h" // for YV12_PLANES
  6. // {8E100A48-C03B-4453-A1FA-6B944FC23F6A}
  7. static const GUID flv_h263_guid=
  8. { 0x8e100a48, 0xc03b, 0x4453, { 0xa1, 0xfa, 0x6b, 0x94, 0x4f, 0xc2, 0x3f, 0x6a } };
  9. class FLVDecoderCreator : public svc_flvdecoder
  10. {
  11. public:
  12. static const char *getServiceName() { return "H.263 FLV Decoder"; }
  13. static GUID getServiceGuid() { return flv_h263_guid; }
  14. int CreateVideoDecoder(int format_type, int width, int height, ifc_flvvideodecoder **decoder);
  15. int HandlesVideo(int format_type);
  16. protected:
  17. RECVS_DISPATCH;
  18. };
  19. class FLVSorenson : public ifc_flvvideodecoder
  20. {
  21. public:
  22. FLVSorenson(void *decoder);
  23. int GetOutputFormat(int *x, int *y, int *color_format);
  24. int DecodeSample(const void *inputBuffer, size_t inputBufferBytes, int32_t timestamp);
  25. void Flush();
  26. void Close();
  27. int GetPicture(void **data, void **decoder_data, uint64_t *timestamp);
  28. private:
  29. void *decoder;
  30. YV12_PLANES yv12;
  31. int32_t last_timestamp;
  32. int width, height;
  33. int decoded;
  34. protected:
  35. RECVS_DISPATCH;
  36. };