Hello! I have created a patch to support DLNA streaming with the HTTP output plugin. This is to fix a problem I was having with streaming FLAC to a Naim Uniti hi-fi streamer. I think the Naim is hardwired to expect MP3 (or maybe wma, i didn't try that) but would disconnect when it received a FLAC stream. I really wanted a lossless stream. It is possible to stream FLAC via DLNA fine, so I looked at the messages being passed and modified MPD to detect that DLNA streaming is supported by the client and use that in preference to an icecast stream. No metadata is sent in DLNA mode and the Naim need an initial content length or else it would disconnect.
So I realise this patch may be rather specific to the Naim device, but I don't have another to try. Also, it should be backwards compatible (it still works with VLC). I modified the reading logic as I couldn't tell if the Naim had disconnected or MPD had. It now only checks the client state if some data has been read. I have added a bit more debug along the way but I don't know if logging the misunderstood request is a security no-no. Also clears the fifo buffer, rather than freeing it, which it keeps a 4kb buffer around but ensures the client->input is always valid (e.g. for those parts of the code that check the buffer is empty)... i started by setting client->input to NULL after the free() but ran into asserts where the pointer was being used and felt that not freeing it early was generally safer. I don't know how much explaination of the changes you normally require, so sorry if I have gone on a bit. Could somebody merge my patch / comment on any changes it needs / try it with another DLNA device. Thanks, Steve. PS: I've used several version control systems in the past, but git is new to me so this patch is a product of google.... let me know if you need it another way. PPS: Ultra short intro: I'm a software developer with 20+ years of experience and a keen interest in music. My most notable project is (was?) maart, available on sourceforge.
0001-Added-support-for-DLNA-streaming.patch
Description: Binary data
------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team