i cannot play any video. Each time i used this function, i get the log "Invalid parameter passed to C runtime function.". I use VLC with Qt 4.7.2 and vmem to render the video (because my
application has transparent background VLC cannot normally render in a QWidget).
Here is the code
Code: Select all
char const* vlc_argv[] =
{
"--no-xlib",
"-I", "dummy", /* Don't use any interface */
"--ignore-config",
"--no-video-title-show",
};
int vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv);
vlc = libvlc_new( vlc_argc, vlc_argv);
QFile* file = new QFile(path);
if (!file->open(QIODevice::ReadOnly))
return false;
qDebug() << "FILE OPENED " << file->handle();
mediaplayer = libvlc_media_player_new(vlc);
media = libvlc_media_new_fd(vlc, file->handle());
libvlc_media_player_set_media(mediaplayer, media);
libvlc_media_player_play();