Ok, I must be missing something fundamental somewhere. I am unable to make MPD recognise a new URI scheme. I have tried adding the ohu:// and ohm:// schemes into the ls.cxx file, however whenever I try to add an item using that scheme into MPD I consistently get an Unsupported URI error in the log. I have also tried to add in a log to the uri_supported_scheme function, but anything I put in there is never being logged.
Initially I was adding in a new #ifdef ENABLE_SONGCAST section at the top and adding in the necessary code to configure in order to enable the value and this failed, so instead I just added ohu and ohm as URI prefixes in the curl plugin to test, but that also is not working. Anyone able to suggest what I might be missing? Craig. -----Original Message----- From: mpd-devel [mailto:[email protected]] On Behalf Of Craig Tolley Sent: 28 August 2014 21:28 To: Max Kellermann Cc: [email protected] Subject: Re: [mpd-devel] OHU/OHM SongCast Stream Decoder I'm sorry, you replied telling me I should use the mailing list for developer questions, which is what i did - re-asking the same question as I assumed from your forum post that the mailing list would elicit me a greater response. 1. Thanks for pointing out ls.cxx, I can see the definitions now so will try adding a new one in and seeing how I get on. 2. The socket utilities seem to be in the src/system/socketutil.cxx file. I will give them a try and see if they work for me. 3. Thanks again. 4. Yes, it was serious. I had missed the file when looking through and this was by far a quicker and more efficient way to find out exactly how and where to use the log function. Craig. -----Original Message----- From: Max Kellermann Sent: Thursday, August 28, 2014 9:18 PM To: Craig Tolley Cc: [email protected] Subject: Re: [mpd-devel] OHU/OHM SongCast Stream Decoder On 2014/08/28 21:49, Craig Tolley <[email protected]> wrote: > Ok, not had any responses as yet I did reply to you. However, you only re-posted the same text until now. > 1. I am creating an Input Plugin, how do I tell MPD that ohu:// and > ohm:// are valid URIs? Somewhere I need to create the link between the > SongCastInputPlugin class that I will create and the MPD playlist and > I haven't found this as yet. ls.cxx > 2. There is already a Socket Utility which looks like it handles socket > connections. Am I free to utilise this instead of building connections > into my SongCast class? Which Socket Utility do you mean? In any case, reusing existing code is better than reinventing the wheel. > 3. Are there any methods that I must implement in the plugin or order > to > be functional within mpd? Only open() must be implemented. init() and finish() are optional and may be nullptr. > 4. Is there a built in logging function that I can use for dev > purposes, > or do I just output to a file of my choosing? Yes. The function's called Log() and you can find it in Log.hxx. Was that a serious question? _______________________________________________ mpd-devel mailing list [email protected] http://mailman.blarg.de/listinfo/mpd-devel _______________________________________________ mpd-devel mailing list [email protected] http://mailman.blarg.de/listinfo/mpd-devel
