1
0

mkv_mp4v_decoder.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include "../Plugins/Input/in_mkv/ifc_mkvvideodecoder.h"
  3. #include "../Plugins/Input/in_mkv/svc_mkvdecoder.h"
  4. #include "MFTDecoder.h"
  5. // {E63A1285-DD51-4b2d-9847-F1C2A5638951}
  6. static const GUID mkv_mp4v_guid =
  7. { 0xe63a1285, 0xdd51, 0x4b2d, { 0x98, 0x47, 0xf1, 0xc2, 0xa5, 0x63, 0x89, 0x51 } };
  8. class MKVDecoderCreator : public svc_mkvdecoder
  9. {
  10. public:
  11. static const char *getServiceName() { return "MPEG-4 Part 2 MKV Decoder"; }
  12. static GUID getServiceGuid() { return mkv_mp4v_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 MKVMP4V : public ifc_mkvvideodecoder
  18. {
  19. public:
  20. MKVMP4V(MFTDecoder *decoder, const nsmkv::VideoData *video_data);
  21. ~MKVMP4V();
  22. int GetOutputProperties(int *x, int *y, int *color_format, double *aspect_ratio);
  23. int DecodeBlock(const void *inputBuffer, size_t inputBufferBytes, uint64_t timestamp);
  24. void Flush();
  25. int GetPicture(void **data, void **decoder_data, uint64_t *timestamp);
  26. void FreePicture(void *data, void *decoder_data);
  27. void HurryUp(int state);
  28. void Close();
  29. private:
  30. MFTDecoder *decoder;
  31. const nsmkv::VideoData *video_data;
  32. protected:
  33. RECVS_DISPATCH;
  34. };