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/bmp/avi_rle_decoder.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Src/bmp/avi_rle_decoder.h (limited to 'Src/bmp/avi_rle_decoder.h') diff --git a/Src/bmp/avi_rle_decoder.h b/Src/bmp/avi_rle_decoder.h new file mode 100644 index 00000000..19bb5a86 --- /dev/null +++ b/Src/bmp/avi_rle_decoder.h @@ -0,0 +1,25 @@ +#pragma once +#include "../Plugins/Input/in_avi/ifc_avivideodecoder.h" +#include "../nsavi/avi_header.h" + +class AVIRLE : public ifc_avivideodecoder +{ +public: + AVIRLE(void *video_frame, nsavi::video_format *stream_format, size_t video_frame_size); + static AVIRLE *CreateDecoder(nsavi::video_format *stream_format); + int GetOutputProperties(int *x, int *y, int *color_format, double *aspect_ratio, int *flip); + int DecodeChunk(uint16_t type, const void *inputBuffer, size_t inputBufferBytes); + void Flush(); + void Close(); + int GetPicture(void **data, void **decoder_data); + int GetPalette(RGB32 **palette); +private: + nsavi::video_format *stream_format; + size_t video_frame_size; + uint8_t *video_frame; + bool video_outputted; + RGBQUAD palette[256]; + bool palette_retrieved; +protected: + RECVS_DISPATCH; +}; \ No newline at end of file -- cgit