On 2009/02/23 11:08, Jochen Keil <jochen.k...@gmail.com> wrote: > as promised i send the patch against the latest git sources (cloned on > Mo 23 Feb 2009 10:57:36 CET). > This will add support for embedded cue sheets in flac files. > Please send me any comments for improvement, critisim or bugs.
That is an interesting approach you chose, and fits quite elegantly into the current limited MPD API. > I have commented some parts where i think more work has to be done. > Whatsmore i'm not so happy with it overall, to me it seems more like a > hack rather then something clean.. anyway for the moment it's the best i > can do. > Hope you like it anyway. ;) > Any hints where i could get started to get the subsongs proper tagged? It's a hack, but I think if we cut off some rough edges, we can merge it anyway. Let's get the feature in if it doesn't break anything, and think about migrating to a clean solution after that. > One last question: > Is there a way to access song->tag from the decoder plugin (flac_plugin.c)? > Trying access decoder->stream_tag or decoder->decoder_tag doesn't > work/wouldn't even compile. No, the decoder struct is opaque. You can't access the song tag, and stream_tag/decoder_tag are different from song->tag. But since you're in flac_plugin.c (which created the tag struct in the first place), you can just re-read the tags if you need them. > diff --git a/src/input_file.c b/src/input_file.c > index b29a412..cd3f2e7 100644 > --- a/src/input_file.c > +++ b/src/input_file.c > @@ -25,6 +25,9 @@ > #include <string.h> > #include <glib.h> > > +#include "ls.h" > +#include "decoder/_flac_common.h" > + MPD core sources should not include decoder specific headers. But now I understand what you meant with "input_flac" on IRC - it'll eliminate this dependency. > diff --git a/src/update.c b/src/update.c > index 17059ff..9599e9a 100644 > --- a/src/update.c > +++ b/src/update.c > @@ -35,6 +35,9 @@ > #include "stats.h" > #include "main.h" > #include "config.h" > +#include "tag.h" > + > +#include "decoder/_flac_common.h" Same here, although that will be more difficult to get rid of. Let's say you add #ifdef HAVE_FLAC around that code, and we merge it - cleanup (decoder API extension) later. Max ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team