1
Плагины / Plugins / Need help with audiodecoder plugin devlopment
« on: March 31, 2018, 16:43:57 »
Hi,
I dont know if this is right place to ask if not then please to move it to right section.
I am developing plugin to play SID files, and it looks like it works ok but after installation of my plugin I cant play other file types.
I am doing it like this:
In plugin initialization I am registering class implementing IAIMPExtensionFileFormat
res = Core->RegisterExtension(IID_IAIMPServiceFileFormats, static_cast<IAIMPExtensionFileFormat*>(m_fileFormats));
next registering class implementing IAIMPServiceFileStreaming
res = Core->RegisterExtension(IID_IAIMPServiceFileStreaming, static_cast<IAIMPServiceFileStreaming*>(m_sidFileStreaming));
and finally I am registering class implementing IAIMPExtensionAudioDecoder
res = Core->RegisterExtension(IID_IAIMPServiceAudioDecoders, static_cast<IAIMPExtensionAudioDecoder*>(m_decoderFactory));
And everyting works fine except other formats - when AIMP wants to start to play other file type it is calling CreateDecoder for my decoder and because I am recoginzing that given stream is not my type I am returning S_FALSE but it gives error in AIMP.
What I am doing wrong? I thought the CreateDecoder will be called onyl for file types registere by my plugin. Maybe I should return different value.
Pleaase help anyone?
Full source code is available at github https://github.com/zbych-r/aimp_sidplay
I dont know if this is right place to ask if not then please to move it to right section.
I am developing plugin to play SID files, and it looks like it works ok but after installation of my plugin I cant play other file types.
I am doing it like this:
In plugin initialization I am registering class implementing IAIMPExtensionFileFormat
res = Core->RegisterExtension(IID_IAIMPServiceFileFormats, static_cast<IAIMPExtensionFileFormat*>(m_fileFormats));
next registering class implementing IAIMPServiceFileStreaming
res = Core->RegisterExtension(IID_IAIMPServiceFileStreaming, static_cast<IAIMPServiceFileStreaming*>(m_sidFileStreaming));
and finally I am registering class implementing IAIMPExtensionAudioDecoder
res = Core->RegisterExtension(IID_IAIMPServiceAudioDecoders, static_cast<IAIMPExtensionAudioDecoder*>(m_decoderFactory));
And everyting works fine except other formats - when AIMP wants to start to play other file type it is calling CreateDecoder for my decoder and because I am recoginzing that given stream is not my type I am returning S_FALSE but it gives error in AIMP.
What I am doing wrong? I thought the CreateDecoder will be called onyl for file types registere by my plugin. Maybe I should return different value.
Pleaase help anyone?
Full source code is available at github https://github.com/zbych-r/aimp_sidplay