Problem with ActiveX in C++

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
FrereDavid
New Cone
New Cone
Posts: 6
Joined: 23 May 2006 15:19

Problem with ActiveX in C++

Postby FrereDavid » 10 Jul 2006 12:56

Hi,

I'm currently trying to put VLC ActiveX in my ATL/C++ project, and I have problems reading a file.

I managed to declare and use the ActiveX (I have the logo of VLC filling the ActiveX space) but when I try to actually read a file and call the AddTarget method, it crashes.

I do:

m_VLC->addTarget("c:\\Loading.avi",NULL,VLC::VLCPlayListInsert,0);

but in AddTarget code, the raw_addTarget methods returns E_INVALIDARG.
I think it may come from my NULL options but I thought that putting NULL would avoid having problems...

I'd be glad if anyone could help me :)

JMS
Blank Cone
Blank Cone
Posts: 22
Joined: 16 Jul 2005 11:30
Location: Königswinter-Thomasberg
Contact:

Postby JMS » 11 Jul 2006 20:43

For the NULL I'm not quite sure: the input parameter is a VARIANT and what you want to put in is a VT_EMPTY, so perhaps try _variant_t() instead of the NULL.

In addition I think I read something about the INSERT mode which should / can not be used for some reason. Actually I use APPEND, perhaps this can make it a second try.

FrereDavid
New Cone
New Cone
Posts: 6
Joined: 23 May 2006 15:19

Postby FrereDavid » 12 Jul 2006 05:37

It works !! Thank you very much :)

JMS
Blank Cone
Blank Cone
Posts: 22
Joined: 16 Jul 2005 11:30
Location: Königswinter-Thomasberg
Contact:

Postby JMS » 12 Jul 2006 07:56

It works !! Thank you very much :)
For the papers :lol: which one? You needed both or the NULL Stuff?

FrereDavid
New Cone
New Cone
Posts: 6
Joined: 23 May 2006 15:19

Postby FrereDavid » 12 Jul 2006 08:07

m_VLC->addTarget("c:\\Loading.avi",_variant_t(),VLC::VLCPlayListInsert,0); works :)

it was just the NULL parameter, Insert is ok :)

lmwork
New Cone
New Cone
Posts: 4
Joined: 18 Feb 2009 23:34

Re: Problem with ActiveX in C++

Postby lmwork » 19 Feb 2009 20:24

I'm trying to develop a simple c++ application and cannot get the vlc activeX control to play video. When I run my program I can see the activeX widget but no video will play. Here is my example program.

int main(int argc, char *argv[])
{
QApplication app(argc, argv);

//MainWindow mainWin;
//mainWin.show();

QAxWidget* mediaPlayer_ = new QAxWidget;
QString source("Videos/Formation Reference-3.mpg");
mediaPlayer_->setControl( "{9BE31822-FDAD-461B-AD51-BE1D1C159921}"); //string is class ID for VLC Media Player
mediaPlayer_->setProperty("mrl", source);
mediaPlayer_->setProperty("autoplay", true);
mediaPlayer_->setProperty("autoloop", true);
mediaPlayer_->setProperty("visible", true);


return app.exec();
}



Any suggestions.

Below are the errors I receive:

[00000001] main libvlc debug: VLC media player - version 0.9.8a Grishenko - (c)
1996-2008 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ./configure '--host=i5
86-mingw32msvc' '--build=i386-linux' '--enable-mkv' '--enable-release' '--withou
t-contrib' '--enable-nls' '--enable-shared-libvlc' '--enable-update-check' '--en
able-lua' '--enable-faad' '--enable-flac' '--enable-theora' '--enable-twolame' '
--enable-quicktime' '--enable-real' '--enable-realrtsp' '--enable-ffmpeg' '--wit
h-ffmpeg-mp3lame' '--with-ffmpeg-faac' '--with-ffmpeg-config-path=/usr/win32/bin
' '--with-ffmpeg-zlib' '--enable-live555' '--with-live555-tree=/usr/win32/live.c
om' '--ena
[00000001] main libvlc debug: translation test: code is "C"
[00000001] main libvlc debug: checking builtin modules
[00000001] main libvlc debug: checking plugin modules
[00000001] main libvlc debug: loading plugins cache file C:\Documents and Settin
gs\bellrd1\Application Data\vlc\plugins-zxzx04.dat
[00000001] main libvlc debug: recursively browsing `d:\QtVideoPlayer\Qt_MediaPla
yerWidgets\debug\modules'
[00000001] main libvlc debug: recursively browsing `d:\QtVideoPlayer\Qt_MediaPla
yerWidgets\debug\plugins'
[00000001] main libvlc debug: recursively browsing `C:\Program Files\VideoLAN\VL
C\plugins'
[00000001] main libvlc debug: module bank initialized, found 262 modules
[00000001] main libvlc debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 F
PU
[00000001] main libvlc debug: looking for memcpy module: 3 candidates
[00000001] main libvlc debug: using memcpy module "memcpymmxext"
[00000366] main interaction debug: thread 4924 (Interaction control) created at
priority 0 (interface/interaction.c:382)
[00000366] main interaction debug: thread started
[00000368] main preparser debug: waiting for thread initialization
[00000368] main preparser debug: thread started
[00000368] main preparser debug: thread 4976 (preparser) created at priority 0 (
playlist/thread.c:79)
[00000369] main fetcher debug: waiting for thread initialization
[00000369] main fetcher debug: thread started
[00000369] main fetcher debug: thread 4992 (fetcher) created at priority 0 (play
list/thread.c:108)
[00000367] main playlist debug: waiting for thread initialization
[00000367] main playlist debug: thread started
[00000367] main playlist debug: rebuilding array of current - root Playlist
[00000367] main playlist debug: rebuild done - 0 items, index -1
[00000367] main playlist debug: thread 5000 (playlist) created at priority 0 (pl
aylist/thread.c:117)
[00000370] main interface debug: looking for interface module: 1 candidate
[00000370] main interface debug: using interface module "hotkeys"
[00000370] main interface debug: thread 5016 (interface) created at priority 0 (
interface/interface.c:168)
[00000370] main interface debug: thread started
*** LibVLC Exception not handled: No active input
Set a breakpoint in 'libvlc_exception_not_handled' to debug.
*** LibVLC Exception not handled: No active input
Set a breakpoint in 'libvlc_exception_not_handled' to debug.
*** LibVLC Exception not handled: No active input
Set a breakpoint in 'libvlc_exception_not_handled' to debug.
*** LibVLC Exception not handled: No active input
Set a breakpoint in 'libvlc_exception_not_handled' to debug.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 7 guests