[vlc-devel] Re: Mozilla Plugin
Michael Pron
michael.pron at noos.fr
Fri Apr 9 12:06:12 CEST 2004
I've done the modification but it doesn't solve the problem : now I've got a nicer "Program /usr/local/lib/mozilla-1.4.1/mozilla-bin (pid = 26326) received Erreur de segmentation signal.". Using gdb, i saw that __vlc_object_get is responsible of that (as his declaration were not taken into the extern "C").
This is what I've done in vlcpeer.cpp (tell me if I'm wrong)
#ifdef __cplusplus
extern "C" {
#endif
#define "vlc_common.h"
#ifdef __cplusplus
}
#endif
Considering the offer of extending the libvlc API, i don't know what to say. In fact, i first coded most of my functions in libvlc.c, and called them in vlcpeer.cpp. But, I'd considered that it may not be useful for the whole project to let these functions in this central file.
Le 08/04 13:39, Gildas Bazin a écrit :
> On Thursday 08 April 2004 13:29, Michael Pron wrote:
> > I'm actually trying to clean the code as much as I can.
> > But I've got a problem with the access functions to objects
> (vlc_object_get , vlc_object_find ...).
> > Explanation : First I'd coded in libvlc.c (that was easy to deal with).
> > But i don't think people would like to see code related to mozilla plugin
> in this file.
> > So I'm trying to move theses functions to mozilla/vlcpeer.cpp. There's no
> big deal with the compilation , but when you try to view a movie in
> mozilla, mozilla crashes.
> > I get this message : "undefined symbol:
> _Z16__vlc_object_getP12vlc_object_ti", which is in fact not surprising,
> knowing that i didn't change any linking rules.
> > Any idea??? (changes in Makefile.in ??? )
> >
>
> Because you are compiling C++ code, you'll need to include you're
> vlc_object_foo() declarations in something like:
> # ifdef __cplusplus
> extern "C" {
> # endif
> # ifdef __cplusplus
> }
> # endif
>
> However, may I instead suggest you extend the libvlc API to fit your needs
> instead of trying to use internal/private libvlc functions ?
>
> --
> Gildas
>
> --
> This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
> To unsubscribe, please read http://developers.videolan.org/lists.html
> If you are in trouble, please contact <postmaster at videolan.org>
>
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>
More information about the vlc-devel
mailing list