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/aacdec-mft/FLVAACDecoder.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/aacdec-mft/FLVAACDecoder.h')
-rw-r--r-- | Src/aacdec-mft/FLVAACDecoder.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Src/aacdec-mft/FLVAACDecoder.h b/Src/aacdec-mft/FLVAACDecoder.h new file mode 100644 index 00000000..12bfedc2 --- /dev/null +++ b/Src/aacdec-mft/FLVAACDecoder.h @@ -0,0 +1,43 @@ +#pragma once +#include "../Plugins/Input/in_flv/svc_flvdecoder.h" +#include "../Plugins/Input/in_flv/FLVAudioHeader.h" +#include "../Plugins/Input/in_flv/ifc_flvaudiodecoder.h" + +#include "MFTDecoder.h" + +// {B670EC35-1313-460a-A2EA-C7120AD18BAD} +static const GUID flv_aac_guid = +{ 0xb670ec35, 0x1313, 0x460a, { 0xa2, 0xea, 0xc7, 0x12, 0xa, 0xd1, 0x8b, 0xad } }; + + +class FLVDecoder : public svc_flvdecoder +{ +public: + static const char *getServiceName() { return "MFT AAC FLV Decoder"; } + static GUID getServiceGuid() { return flv_aac_guid; } + int CreateAudioDecoder(int stereo, int bits, int sample_rate, int format, ifc_flvaudiodecoder **decoder); + int HandlesAudio(int format_type); +protected: + RECVS_DISPATCH; +}; + +class FLVAAC : public ifc_flvaudiodecoder +{ +public: + FLVAAC(); + int GetOutputFormat(unsigned int *sample_rate, unsigned int *channels, unsigned int *bits); + int DecodeSample(const void *input_buffer, size_t input_buffer_bytes, void *samples, size_t *samples_size_bytes, double *bitrate); + void Flush(); + void Close(); + int Ready(); + void SetPreferences(unsigned int max_channels, unsigned int preferred_bits); +private: +/* data */ + MFTDecoder decoder; + unsigned int bps; + size_t preDelay; + bool got_decoder_config; + +protected: + RECVS_DISPATCH; +}; |