From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/mp4v/MFTDecoder.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Src/mp4v/MFTDecoder.h (limited to 'Src/mp4v/MFTDecoder.h') diff --git a/Src/mp4v/MFTDecoder.h b/Src/mp4v/MFTDecoder.h new file mode 100644 index 00000000..997b24a9 --- /dev/null +++ b/Src/mp4v/MFTDecoder.h @@ -0,0 +1,25 @@ +#pragma once +#include +#include +#include "../Winamp/wa_ipc.h" +#include + +class MFTDecoder +{ +public: + MFTDecoder(); + ~MFTDecoder(); + + HRESULT Open(VIDEOINFOHEADER *header); + HRESULT Feed(const void *data, size_t data_size, uint64_t timestamp_hundred_nanos); + HRESULT GetFrame(IMFMediaBuffer **output_buffer, uint64_t *hundrednanos); + HRESULT GetFrame(YV12_PLANES **data, void **decoder_data, uint64_t *mft_timestamp); + HRESULT FreeFrame(YV12_PLANES *data, void *decoder_data); + HRESULT GetOutputFormat(UINT *width, UINT *height, bool *flip, double *aspect); + HRESULT Flush(); + HRESULT Drain(); + + IMFTransform *decoder; + LONG stride; + UINT32 width, height; +}; \ No newline at end of file -- cgit