[Flac-dev] Re: XMMS Plugin on Mac OS X

Josh Coalson j_coalson at yahoo.com
Tue Jun 11 10:17:03 PDT 2002


--- Pisco <pisco at mac.com> wrote:
>   This may clarify a few things.  I compiled flac from the source
> package 
> on flac.sourceforge.net since the Darwin package did not contain the
> XMMS 
> plugin.  I compiled it using the ./configure, make, make all
> sequence, 
> and it compiled fine.
>   When the flac plugin is alone in the XMMS Input directory, it works
> correctly and shows up correctly in the Input panel of the XMMS 
> preferences. (i.e. "FLAC Player v1.0.2 [libxmms-flac.so]")  When the
> shn 
> plugin is alone in the XMMS input directory, it works correctly and
> shows 
> up correctly in the Input panel. (i.e. "SHN Player 2.2.5
> [libshn.so]")  
> When they are both present in the input directory, things start to
> get 
> screwy.  If they are both named appropriately, the shn plugin works,
> the 
> flac plugin doesn't, and the shn plugin shows up twice in the Input 
> panel. (i.e. "SHN Player 2.2.5 [libxmms-flac.so]\nSHN Player 2.2.5 
> [libxmms-flac.so]")  It seems to load the first of the two it sees,
> but 
> take the filename from the second.  If I rename the shn plugin to
> load 
> after the flac plugin (i.e. to libxmms-shn), then the opposite occurs
> - 
> the flac plugin loads correctly, and the listings show two flac
> plugins. 
> (i.e. "FLAC Player v1.0.2 [libxmms-shn.so]\nFLAC Player v1.0.2 
> [libxmms-shn.so]")

Ah, I see.  My first guess at what is happening is that
both plugins are stomping on each other's global symbols.
Looking at flac/src/plugin_xmms/plugin.c, it looks like
the only one it could be is get_iplugin_info():

InputPlugin *get_iplugin_info()
{
    flac_ip.description =
        g_strdup_printf("FLAC Player v%s", FLAC__VERSION_STRING);
    return &flac_ip;
}

I copied the basic plugin design from another plugin (I
think it was XMMS' WAVE reader).  I'm not familiar enough
with XMMS' plugin implementation yet but looking at it I
don't see how the get_iplugin_info() design can work with
multiple shared libraries.  I CC'ed the flac-dev list to
see if anyone knows off the top of their head.

Josh


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com




More information about the Flac-dev mailing list