I now rebuilt the 1.2.0-git version from scratch, with the 'bluemotion" video out plugin.
To get my project linked with libvlc I needed to do some modifications to the stdint.h header, since this Microsoft compiler does not understand "long long". I changed that to "__int64"
To link I needed a vlclib.lib file. Renaming the vlclib.dll.a file to vlclib.lib actually linked and at least the libvlc_new function returns a pointer.
I used the sample code at http://wiki.videolan.org/LibVLC_SampleCode_SDL and found something strange:
In all code examples I found, vlc_new appears to require a third parameter of type libvlc_exception_t*
libvlc_exception_t is however not declared. (and not found in any of the headers) All the other libvlc_ types are OK.
In my libvlc.h, libvlc_new is now declared as
Code: Select all
libvlc_new( int argc , const char *const *argv );
Is this new to version 1.2.0-git?
This is the code I used, at least vlc_new returns a pointer so it looks good.
The bluemotion module and vbm-instancehdl parameter are specific to my project
Code: Select all
bool CVlcSurface::InitVlcPlayer(int instance)
{
char InstStr[8];
sprintf(InstStr, "%i", instance);
// libvlc_exception_t ex;
libvlc_instance_t *libvlc = NULL;
libvlc_media_t *Media = NULL;
libvlc_media_player_t *MediaPlayer = NULL;
char const *vlc_argv[] =
{
// "-q",
"--ignore-config", /* Don't use VLC's config files */
"--plugin-path", "C:\\program files\\VLC\\plugins",
"--vout", "bluemotion",
"--vbm-instancehdl", InstStr,
};
int vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv);
libvlc = libvlc_new(vlc_argc, vlc_argv);
if(!libvlc) return false;
//TODO: Further libvlc code
return true;
}