MFTDecoder.h 707 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <Mftransform.h>
  3. #include <bfc/platform/types.h>
  4. #include "../Winamp/wa_ipc.h"
  5. #include <Amvideo.h>
  6. class MFTDecoder
  7. {
  8. public:
  9. MFTDecoder();
  10. ~MFTDecoder();
  11. HRESULT Open(VIDEOINFOHEADER *header);
  12. HRESULT Feed(const void *data, size_t data_size, uint64_t timestamp_hundred_nanos);
  13. HRESULT GetFrame(IMFMediaBuffer **output_buffer, uint64_t *hundrednanos);
  14. HRESULT GetFrame(YV12_PLANES **data, void **decoder_data, uint64_t *mft_timestamp);
  15. HRESULT FreeFrame(YV12_PLANES *data, void *decoder_data);
  16. HRESULT GetOutputFormat(UINT *width, UINT *height, bool *flip, double *aspect);
  17. HRESULT Flush();
  18. HRESULT Drain();
  19. IMFTransform *decoder;
  20. LONG stride;
  21. UINT32 width, height;
  22. };