VLC ActiveX Debug

This forum is about all development around libVLC.
Mzhang
Blank Cone
Blank Cone
Posts: 13
Joined: 08 Apr 2009 19:55

VLC ActiveX Debug

Postby Mzhang » 08 Apr 2009 20:02

Hello,

Not sure if this is the right place for this post, but I'd appreciate if anyone can help =)

I want to debug the VLC ActiveX for IE. I installed cygwin on windows xp and made the dll.
I am having trouble making the .exe file though. Being not very familiar with the makefile..I added the preprosessor _BUILD_LOCALSERVER ( in Makefile, the CPPFLags tag), and took out the
'-shared' in the linker,so the linking code is as follows:

However I couldn't run the result executable, could anyone give me a hand?

On another note, is it possible at all to compile the activex using Visual Studio 2005? I tried that but couldn't register the generated dll..

g++ -mno-cygwin -nostdlib /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/lib/dllcrt2.o .libs/axvlc_la-main.o .libs/axvlc_la-utils.o .libs/axvlc_la-olecontrol.o .libs/axvlc_la-oleinplaceactiveobject.o .libs/axvlc_la-oleinplaceobject.o .libs/axvlc_la-oleobject.o .libs/axvlc_la-persistpropbag.o .libs/axvlc_la-persiststorage.o .libs/axvlc_la-persiststreaminit.o .libs/axvlc_la-provideclassinfo.o .libs/axvlc_la-connectioncontainer.o .libs/axvlc_la-objectsafety.o .libs/axvlc_la-dataobject.o .libs/axvlc_la-viewobject.o .libs/axvlc_la-supporterrorinfo.o .libs/axvlc_la-vlccontrol.o .libs/axvlc_la-vlccontrol2.o .libs/axvlc_la-plugin.o .libs/axvlc_la-axvlc_idl.o -L/cygdrive/c/vlc/vlc/src/.libs -L/usr/win32/lib ../../src/.libs/libvlc.dll.a /cygdrive/c/vlc/vlc/src/.libs/libvlccore.dll.a -lkernel32 -lmingw32 ../../src/.libs/libvlccore.dll.a -lkernel32 -lws2_32 -lnetapi32 -lwinmm /usr/win32/lib/libiconv.a -lmingw32 -lole32 -loleaut32 -luuid -lshlwapi -lgdi32 -lmingw32 -L/usr/lib/gcc/i686-pc-mingw32/3.4.4 -L/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/lib -L/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../.. -lstdc++ -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -lmingw32 -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -mno-cygwin -mms-bitfields -Wl,./axvlc.def -Wl,axvlc_rc.o -o .libs/axvlc.exe -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/axvlc.dll.a

thannoy
Big Cone-huna
Big Cone-huna
Posts: 601
Joined: 20 Mar 2008 09:44
VLC version: 0.9.8a & 1.0-git
Operating System: GNU/Linux Fedora10
Location: France
Contact:

Re: VLC ActiveX Debug

Postby thannoy » 08 Apr 2009 23:01

What is the error which prevent you from running the result executable?

Do you use a static VLC? (I can see some *vlc*.a in your g++ line), I didn't know it was supported.
If you use dynamic libvlc, ensure that Windows can find this dynamic lib (using %PATH% for example).


You can also use the standard ActiveX compilation chain and test it using a web-browser. If I remember correctly, it was ok to use run iexplore through gdb to debug the activex using a test html page.
Don't forget to search the wiki.videolan.org if you want the JS API to control the ActiveX (it is the same as mozilla plugin JS API). Also, vlc.revolunet.com can be usefull.

regards

Mzhang
Blank Cone
Blank Cone
Posts: 13
Joined: 08 Apr 2009 19:55

Re: VLC ActiveX Debug

Postby Mzhang » 09 Apr 2009 15:53

Thanks for your reply.

I got a Win32 error when trying to run the executable ' Error: Could not start axvlc.exe".

And Yes the libraries are statically linked..

I'm not quite familiar with gdb but I am going to try run iexplorer through and debug the activeX that way. So I guess I cannot build the activeX in Visual Studio right?

Mzhang
Blank Cone
Blank Cone
Posts: 13
Joined: 08 Apr 2009 19:55

Re: VLC ActiveX Debug

Postby Mzhang » 09 Apr 2009 16:41

Hi again,

I tried running GDB as follows but I am getting error 193 (I can register the activeX dll and run IE outside of gdb with no problem)...any idea how I can solve this?


$ gdb axvlc.dll
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) r /cygdrive /c/Program\ Files/Internet\ Explorer/iexplorer.exe
Starting program: /cygdrive/c/vlc/vlc/projects/activex/.libs/axvlc.dll /cygdrive
/c/Program\ Files/Internet\ Explorer/iexplorer.exe
Error creating process /cygdrive/c/vlc/vlc/projects/activex/.libs/axvlc.dll, (er
ror 193).

thannoy
Big Cone-huna
Big Cone-huna
Posts: 601
Joined: 20 Mar 2008 09:44
VLC version: 0.9.8a & 1.0-git
Operating System: GNU/Linux Fedora10
Location: France
Contact:

Re: VLC ActiveX Debug

Postby thannoy » 09 Apr 2009 20:18

Compiling any part of VLC using visual studio is unsupported, web plugins included.

You should not try to debug the dll directly, but more like this:
gdb --args iexplore

Then, you use a test html page which deal with the plugin. The activex will be part of the process iexplore at runtime if you use it.
As test pages, you can use your own or:
- http://vlc.revolunet.com
- http://git.videolan.org/?p=vlc.git;a=bl ... ml;hb=HEAD

Also, this page can help you (JS API):
http://wiki.videolan.org/Documentation: ... lla_plugin (the API like .playlist.add())

Mzhang
Blank Cone
Blank Cone
Posts: 13
Joined: 08 Apr 2009 19:55

Re: VLC ActiveX Debug

Postby Mzhang » 09 Apr 2009 23:04

Thanks for your help. I am managed to debug the dll through iexplorer.

I am trying to load multiple streams in my explorer(I have 9 streams) and I found that IE will receive a segmentation fault at
vlc_access.h:152. However I was not able to set a breakpoint ,I always receive an Input/Output error like below:
(gdb) break udp.c:90
Breakpoint 1 at 0x6e781552: file udp.c, line 90.
(gdb) r
Starting program: /cygdrive/c/Program Files/Internet Explorer/iexplore.exe
[New thread 264684.0x1e45c]
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x6e781552: Input/Output error.


Could you help on this?

thannoy
Big Cone-huna
Big Cone-huna
Posts: 601
Joined: 20 Mar 2008 09:44
VLC version: 0.9.8a & 1.0-git
Operating System: GNU/Linux Fedora10
Location: France
Contact:

Re: VLC ActiveX Debug

Postby thannoy » 10 Apr 2009 17:54

Emm, it is not in my skills.

I have in mind that we can ask gdb to set a breakpoint with a kind of pending option to try to set it on library loads, but very unsure about this option specification.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 23 guests