aboutsummaryrefslogtreecommitdiff
path: root/Src/mp4v/mp4_mp4v_decoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'Src/mp4v/mp4_mp4v_decoder.h')
-rw-r--r--Src/mp4v/mp4_mp4v_decoder.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/Src/mp4v/mp4_mp4v_decoder.h b/Src/mp4v/mp4_mp4v_decoder.h
new file mode 100644
index 00000000..564cd736
--- /dev/null
+++ b/Src/mp4v/mp4_mp4v_decoder.h
@@ -0,0 +1,31 @@
+#pragma once
+#include "../Plugins/Input/in_mp4/mpeg4video.h"
+#include "MFTDecoder.h"
+
+// {D3D14DCB-6AA8-4f59-A862-AA81D5AEE550}
+static const GUID mp4_mp4v_guid =
+{ 0xd3d14dcb, 0x6aa8, 0x4f59, { 0xa8, 0x62, 0xaa, 0x81, 0xd5, 0xae, 0xe5, 0x50 } };
+
+class MP4VMP4Decoder : public MP4VideoDecoder
+{
+public:
+ static const char *getServiceName() { return "MPEG-4 Part 2 MP4 Decoder"; }
+ static GUID getServiceGuid() { return mp4_mp4v_guid; }
+ MP4VMP4Decoder();
+ ~MP4VMP4Decoder();
+
+private:
+ /* mpeg4video interface */
+ int Open(MP4FileHandle mp4_file, MP4TrackId mp4_track);
+ int GetOutputFormat(int *x, int *y, int *color_format, double *aspect_ratio);
+ int DecodeSample(const void *inputBuffer, size_t inputBufferBytes, MP4Timestamp timestamp);
+ void Flush();
+ void Close();
+ int CanHandleCodec(const char *codecName);
+ int GetPicture(void **data, void **decoder_data, MP4Timestamp *timestamp);
+ void FreePicture(void *data, void *decoder_data);
+
+ MFTDecoder decoder;
+protected:
+ RECVS_DISPATCH;
+}; \ No newline at end of file