Re: [Rhythmbox-devel] DACP (iTunes remote) support added
- From: Alexandre Rosenfeld <alexandre rosenfeld gmail com>
- Cc: rhythmbox-devel gnome org
- Subject: Re: [Rhythmbox-devel] DACP (iTunes remote) support added
- Date: Thu, 28 Oct 2010 15:37:42 -0400
On Thu, Oct 28, 2010 at 14:06, Peter
<rhythmbox-devel maubp freeserve co uk> wrote:
Hi Michael,
I've been able to send covers (using a single hard coded filename)
by inserting a copy of the dcap-share.c cover sending code into
dmap-share.c in this new stub. However, I don't understand the
libdmapshare code enough to work out how to define the callback
function which would ask the client (in this case the Rhythmbox
plugin) to supply the appropriate filename.
Can you send us the code you are working on? Or a branch somewhere? So we can help you out.
It should be trivial to add the callback, but that would make an API break, so that is Michael's call.
It would then make sense to make the code which takes the
cover filename and turns this into the soup message into a
shared function. Note that when HAVE_GDKPIXBUF is false,
I think it would make sense to check the file really is a PNG
(and not JPEG) before sending it to the remote client. This
could be as trivial as checking the filename extension (since
this is the branch when we don't have the graphics library).
Hm, checking the extension is not really a good idea and it doesnt matter much. You can give the filename any extension you want and it doesnt make the file that format. For instance, someone could have some temporary name with no extension and it could still be a valid PNG file (cases like ID3 covers as you mentioned, we would probably dump the cover to a temporary file).
Checking for the PNG magic bytes could make sense, especially if we already have an open stream for the cover.
Regards,
Peter
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]