RU
EN
Main Page
Download
Addons
Forum
Blog
Feedback
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
News:
Скины для плагина Analog Meter
AIMP Forum
»
AIMP for Windows
»
Addons
»
Plugins
(Moderators:
Зелёный
,
Soolo
,
Tiger
) »
Need help with audiodecoder plugin devlopment
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Need help with audiodecoder plugin devlopment (Read 7477 times)
0 Members and 1 Guest are viewing this topic.
Need help with audiodecoder plugin devlopment
«
on:
March 31, 2018, 16:43:57 »
zbych
Новичок
Posts: 2
Карма: +0/-0
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
Logged
Re: Need help with audiodecoder plugin devlopment
«
Reply #1 on:
March 31, 2018, 17:58:54 »
zbych
Новичок
Posts: 2
Карма: +0/-0
I don't know if it is right way but I found solution by myself:
the IAIMPExtensionAudioDecoder::CreateDecoder method returns
E_FAIL
and other objects like IAIMPExtensionFileInfoProvider check given FileURI and returns E_FAIL too.
Logged
Re: Need help with audiodecoder plugin devlopment
«
Reply #2 on:
March 31, 2018, 20:11:52 »
Artem
Администратор
Супермен
Posts: 15906
Карма: +2928/-56
IAIMPExtensionFileFormat just informs the player that some new file types are supported. Player ask all decoders because file extension may not be same to file type. If you have checked that stream is not yours - just return E_FAIL but dont change the IAIMPErrorInfo .
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
AIMP Forum
»
AIMP for Windows
»
Addons
»
Plugins
(Moderators:
Зелёный
,
Soolo
,
Tiger
) »
Need help with audiodecoder plugin devlopment