Page 1 of 1

Adding Modules: OutToTreeCompile -- Win 7 x64 system

Posted: 29 May 2012 05:23
by ewong
VLC Media Player v2.0.1 is installed in the folder

Are the necessary files for adding modules located here?
c:\Program Files (x86)\VideoLAN\VLC\sdk\include\vlc\plugins
c:\Program Files (x86)\VideoLAN\VLC\sdk\libs

MinGW is installed with the gcc compiler.

A) Before attempting to create a module, this app was built based on the demo:

Code: Select all

#include <stdio.h> #include <windows.h> #include <vlc/vlc.h> /* static void quit_on_exception (libvlc_exception_t *excp) { if (libvlc_exception_raised (excp)) { fprintf(stderr, "error: %s\n", libvlc_exception_get_message(excp)); exit(-1); } } */ int main(int argc, char **argv) { //libvlc_exception_t excp; libvlc_instance_t *inst; int item; char *myarg0 = "-I"; char *myarg1 = "dummy"; char *myarg2 = "--plugin-path=c:\\program files\\videolan\\plugins"; char *myargs[4] = {myarg0, myarg1, myarg2, NULL}; char *filename = "c:\\video\\main\\Everybody_Hates_Chris_Feb_26.mpg"; //libvlc_exception_init (&excp); inst = libvlc_new (3, myargs ); // inst = libvlc_new (3, myargs, &excp); //quit_on_exception (&excp); item = libvlc_playlist_add (inst, filename, NULL ); //quit_on_exception (&excp); libvlc_playlist_play (inst, item, 0, NULL ); // quit_on_exception (&excp); Sleep (10000); libvlc_destroy (inst); return 0; }
the Makefile

Code: Select all

VLC_INST = "C:/Program files (x86)/VideoLAN/VLC" VLC_SRC = "C:/Program files (x86)/VideoLAN/VLC/sdk" OBJS = obj/demo.o CC = gcc CFLAGS = -O3 -std=c99 -D UNICODE -D _UNICODE -D _WIN32_IE=0x0500 -D WINVER=0x500 ${WARNS} LDFLAGS = -s -lcomctl32 -Wl,--subsystem,windows all : demo.exe demo.exe : $(OBJS) $(CC) -o "$@" $(OBJS) $(LDFLAGS) -L${VLC_INST} -llibvlc -llibvlccore # gcc -o demo.exe demo.o obj/%.o : src/%.c ${HEADERS} ${CC} ${CFLAGS} -I${VLC_SRC}/include -c $< -o $@
The makefile indicates that the libvlc_playlist_add, and libvlc_destroy are undefined references. What is the missing library reference?

B) What are the steps to build a module, eg. decode module, on a Windows 7 x64 system.

http://wiki.videolan.org/Hacker_Guide/H ... e_a_Module
This webpage has an example stub module.
It is unclear what else is needed.
- additional code is needed to make it a DLL?
- which compiler is needed: gcc or is it possible to build a module within Visual Studio 2010






Thanks in advance.

Re: Adding Modules: OutToTreeCompile -- Win 7 x64 system

Posted: 29 May 2012 08:50
by RĂ©mi Denis-Courmont
Those functions don't exist, so no wonder it's failing.

And you need a C99 compiler, so forget MSVS already.