1
0

mkv_f263_decoder.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #pragma once
  2. #include "../Plugins/Input/in_mkv/ifc_mkvvideodecoder.h"
  3. #include "../Plugins/Input/in_mkv/svc_mkvdecoder.h"
  4. #include "../winamp/wa_ipc.h"
  5. // {0071721C-7B4D-4766-B165-E42BC080DA74}
  6. static const GUID mkv_flv1_guid =
  7. { 0x71721c, 0x7b4d, 0x4766, { 0xb1, 0x65, 0xe4, 0x2b, 0xc0, 0x80, 0xda, 0x74 } };
  8. class MKVDecoderCreator : public svc_mkvdecoder
  9. {
  10. public:
  11. static const char *getServiceName() { return "FLV1 MKV Decoder"; }
  12. static GUID getServiceGuid() { return mkv_flv1_guid; }
  13. int CreateVideoDecoder(const char *codec_id, const nsmkv::TrackEntryData *track_entry_data, const nsmkv::VideoData *video_data, ifc_mkvvideodecoder **decoder);
  14. protected:
  15. RECVS_DISPATCH;
  16. };
  17. class MKVFLV1 : public ifc_mkvvideodecoder
  18. {
  19. public:
  20. MKVFLV1(void *decoder);
  21. int GetOutputProperties(int *x, int *y, int *color_format, double *aspect_ratio);
  22. int DecodeBlock(const void *inputBuffer, size_t inputBufferBytes, uint64_t timestamp);
  23. void Flush();
  24. int GetPicture(void **data, void **decoder_data, uint64_t *timestamp);
  25. private:
  26. void *decoder;
  27. YV12_PLANES yv12;
  28. int32_t last_timestamp;
  29. int width, height;
  30. int decoded;
  31. protected:
  32. RECVS_DISPATCH;
  33. };