RSATom / QmlVlc

[ABANDONED] libvlc wrapper for Qt Quick 2/Qml
Other
139 stars 56 forks source link

Getting started with QmlVlcDemo #32

Closed kevkha closed 9 years ago

kevkha commented 9 years ago

Thanks for sharing your project. Could you please document in the readme how to get the demo working? I did a clone (or download the zip file) but both folders (libvlc-sdk and QmlVlc) in deps dir are empty. I follow the links from your demo on gitHub and able to download the missing dirs and sub dirs in question but when run/build the project there are many errors such as "file not found" (I changed from #include QmlVlc.h to #include QmlVlc/QmlVlc.h (note I removed the < and > for visibility here)) and many others for libvlc-sdk/include/vlc/ and I corrected them but not sure if I did the right thing. Now, I stuck at main.cpp:34: error: undefined reference to `RegisterQmlVlc()' and 6 more errors in the same main.cpp. I would like run the demo on both Windows and Ubuntu. Thanks in advance.

RSATom commented 9 years ago

You are right, It worth add some docs here. What platform do you want start first? - I will give you instructions how to build it.

kevkha commented 9 years ago

Thanks for your speedy response. I usually do my coding on Windows and copy the project to Ubuntu and run again to ensure everything working so I guess Windows first, but the final program will be run on Ubuntu. Thanks.

RSATom commented 9 years ago

Ok, I'll try to do build instructions right now. btw, some hints about building on Ubuntu already exists: https://github.com/RSATom/QmlVlcDemo/wiki/Build-hints

kevkha commented 9 years ago

Thanks. I am going to check the Ubuntu now and will check back on the Windows instructions once you have it posted. Thanks again for your works and time.

RSATom commented 9 years ago

btw, downloading sources archive will not work since there are submodules used. So you have to use git even on Windows: git clone --recursive https://github.com/RSATom/QmlVlcDemo.git

RSATom commented 9 years ago

I've added some hints for windows build. Check it please. If something is not clear - write here please, I'll try to explain better.

kevkha commented 9 years ago

I have to use git bash for --recursive option to work (git GUI doesn't understand --recursive option on Windows). That did the trick for the clone part. I will try to build on Windows and see how it goes. Thanks.

kevkha commented 9 years ago

The build completed with several warnings as shown. image

Attempted to run the demo and it crashed

Starting C:\Users\Kevin\Documents\QtProjects\build-QmlVlcDemo-Desktop_Qt_5_4_0_MinGW_32bit-Debug\debug\QmlVlcDemo.exe... The program has unexpectedly finished. C:\Users\Kevin\Documents\QtProjects\build-QmlVlcDemo-Desktop_Qt_5_4_0_MinGW_32bit-Debug\debug\QmlVlcDemo.exe crashed

RSATom commented 9 years ago

This warnings is ok - I got the same all time.

About crash: try remove %VLC%\plugins\gui\libqt4_plugin.dll

kevkha commented 9 years ago

Unfortunately, that did not help. I also moved libskins2_plugin.dll of out place, did a "Clean" and rebuild but same crash. How do we trace this crash? Currently, Qt is run in debug mode but I don't see any log in debug dir.

RSATom commented 9 years ago

what vlc version do you use?

kevkha commented 9 years ago

VLC 2.1.5. Do I need to have VLC running first? I will install the latest version and try again.

RSATom commented 9 years ago

can you see call stack in QtCreator?

kevkha commented 9 years ago

I click on "Start Debuging F5" button and see this "During startup program exited with code 0xc0000135." Does this help?

RSATom commented 9 years ago

0xc0000135 - is "Unable to locate Dll" exception. Do you have libvlc in %PATH% variable?

kevkha commented 9 years ago

I removed VLC 2.1.5 (64-bit) and installed VLC 2.2.0 (32-bit). Which libvlc are you referring to? I added C:\Program Files (x86)\VideoLAN\VLC to PATH but the same crash. I tried without libqt4_plugin.dll too. Still no go.

RSATom commented 9 years ago

Did you restart QtCreator after that?

kevkha commented 9 years ago

That's it. It worked my friend. I think we should document VLC to PATH too. By default VLC does not do it for us. image

And I confirm with libqt4_plugin.dll in place is ok too so main issue was VLC path for the libvlc.dll and others. Thanks so so much!

RSATom commented 9 years ago

Great!

I think we should document VLC to PATH too. By default VLC does not do it for us.

Good point.