diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/vp6/flv_vp6_decoder.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/vp6/flv_vp6_decoder.h')
-rw-r--r-- | Src/vp6/flv_vp6_decoder.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Src/vp6/flv_vp6_decoder.h b/Src/vp6/flv_vp6_decoder.h new file mode 100644 index 00000000..51b9f32f --- /dev/null +++ b/Src/vp6/flv_vp6_decoder.h @@ -0,0 +1,36 @@ +#pragma once +#include "../Plugins/Input/in_flv/svc_flvdecoder.h" +#include "../Plugins/Input/in_flv/FLVVideoHeader.h" +#include "../Plugins/Input/in_flv/ifc_flvvideodecoder.h" +#include "duck_dxl.h" +#include "../nsv/dec_if.h" +// {8FFD7807-26F0-44ef-9B6E-BEFDD6B5779A} +static const GUID vp6_flv_guid = +{ 0x8ffd7807, 0x26f0, 0x44ef, { 0x9b, 0x6e, 0xbe, 0xfd, 0xd6, 0xb5, 0x77, 0x9a } }; + +class FLVDecoderCreator : public svc_flvdecoder +{ +public: + static const char *getServiceName() { return "VP6 FLV Decoder"; } + static GUID getServiceGuid() { return vp6_flv_guid; } + int CreateVideoDecoder(int format_type, int width, int height, ifc_flvvideodecoder **decoder); + int HandlesVideo(int format_type); +protected: + RECVS_DISPATCH; +}; + +class FLVVP6 : public ifc_flvvideodecoder +{ +public: + FLVVP6(DXL_XIMAGE_HANDLE xim); + int GetOutputFormat(int *x, int *y, int *color_format); + int DecodeSample(const void *inputBuffer, size_t inputBufferBytes, int32_t timestamp); + void Close(); + int GetPicture(void **data, void **decoder_data, uint64_t *timestamp); +private: + DXL_XIMAGE_HANDLE xim; + YV12_PLANES vidbufdec; + int decoded; +protected: + RECVS_DISPATCH; +};
\ No newline at end of file |