aboutsummaryrefslogtreecommitdiff
path: root/Src/mp4v/MFTDecoder.h
diff options
context:
space:
mode:
authorJean-Francois Mauguit <jfmauguit@mac.com>2024-09-24 09:03:25 -0400
committerGitHub <noreply@github.com>2024-09-24 09:03:25 -0400
commitbab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/mp4v/MFTDecoder.h
parent4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff)
parent20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff)
downloadwinamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/mp4v/MFTDecoder.h')
-rw-r--r--Src/mp4v/MFTDecoder.h25
1 files changed, 25 insertions, 0 deletions
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 <Mftransform.h>
+#include <bfc/platform/types.h>
+#include "../Winamp/wa_ipc.h"
+#include <Amvideo.h>
+
+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