Page 1 of 1

how or where is vlc_entry__m initialized?

Posted: 27 Aug 2013 03:53
by busybeeCS
there is a continuous calling in vlc:
module_Init->module_InitStatic(vlc_entry__main)->vlc_plugin_describe (vlc_plugin_cb entry)->entry (vlc_plugin_setter, &module)

vlc_entry__main is of the most importance. so far as i know,the variable vlc_entry__main is a function defined in the header file modules.h.
but i dont find where is it initialized. if not initialized, the calling entry (vlc_plugin_setter, &module),which in fact is vlc_entry__main (vlc_plugin_setter, &module) is obviously wrong.
can anybody tell me how or where is it initialized?i will be thankful.

Re: how or where is vlc_entry__m initialized?

Posted: 27 Aug 2013 18:03
by Rémi Denis-Courmont
vlc_entry__main() is defined in src/libvlc-module.c, but it's all macros.

Re: how or where is vlc_entry__m initialized?

Posted: 07 Sep 2013 05:59
by busybeeCS
vlc_entry__main() is defined in src/libvlc-module.c, but it's all macros.
hi Rémi Denis-Courmont,thank u very much for your reply.
now i know that file libvlc-module.c uses macro vlc_module_begin which is defined in file vlc_plugin.h,by expanding vlc_module_begin,we can see the definition of function vlc_entry_main.
the function's prefixes EXTERN_SYMBOL and CDECL_SYMBOL are both empty, that is to say, libvlc-module.c just defines vlc_entry_main.
in the file src/modules/modules.h, vlc_enrty_main is declared like this: int vlc_entry__main (int (*)(void *, void *, int, ...), void *);
my question is that is the function vlc_entry__main in libvlc-module.c equals to the one in modules.h? if so, how to explain the permission?

Re: how or where is vlc_entry__m initialized?

Posted: 07 Sep 2013 08:24
by Rémi Denis-Courmont
I don't understand the question.

Re: how or where is vlc_entry__m initialized?

Posted: 07 Sep 2013 12:31
by busybeeCS
I don't understand the question.
sry for my unclear expression.
i mean vlc _entry_main is defined in src/libvlc-module.c, declared in src/modules/modules.h.
then how does the declaration know the function is defined in src/libvlc-module.c, as the declaration appears without prefix extern indicating the function is defined in other files.

Re: how or where is vlc_entry__m initialized?

Posted: 13 Sep 2013 18:14
by Rémi Denis-Courmont
Your question makes no sense at all.

Re: how or where is vlc_entry__m initialized?

Posted: 17 Sep 2013 11:18
by busybeeCS
Your question makes no sense at all.
i dont see so,if u think it makes no sense, why cannot u explain it cleanly to me

Re: how or where is vlc_entry__m initialized?

Posted: 17 Sep 2013 14:35
by Jean-Baptiste Kempf
Seriously, it's very hard to understand your question.