kibsoft / QtMEL

Qt Media Encoding Library
GNU Lesser General Public License v2.1
67 stars 16 forks source link

is the suggested QtMultimediaKit usable on on Qt 4.8.6 msvc2010 builds? #31

Open ghost opened 9 years ago

ghost commented 9 years ago

Hello , I am trying to build QtMEL for my Qt 4.8.6 /msvc2010 project. I can download binaries for both Libav and openCV ,the problem I have is if I can use the QtMultimediaKit you link to on the project page(http://kibsoft.ru/) .If yes how can I do that and if not ,is there a way I can build them for use of QtMEL in my project configuration?Even better ,Is there a chance you might have prebuilt binaries for Qt 4.8 msvc2010 ? :-)

Thank you for your time.

kibsoft commented 9 years ago

Hello

if I can use the QtMultimediaKit you link to on the project page(http://kibsoft.ru/)

No, you can't because you use MSVC compiler.

Is there a chance you might have prebuilt binaries for Qt 4.8 msvc2010 ?

Sorry, I have not :(

is there a way I can build them for use of QtMEL in my project configuration?

It seems you can download this archive and build the "multimedia" project. I am looking at the QtMEL's code and it seems I have forgotten to remove multimedia from dependencies(Maybe I am wrong). Can you remove it and try to build QtMEL?

ghost commented 9 years ago

Thanks for the quick repy , I tried to remove the multimedia dependency from the .pro file but when I build the project I get the error below:

QtMEL-master\src\grabbers\image\cameragrabber.cpp:31: error: C1083: Cannot open include file: 'QCamera': No such file or directory

Looking at the Qt documentation ,I see that all QCamera classes are related to Qt 5 and above.Was this QCamera class defined in the multimedia module or do I need to do some additional step to get it usable in my Qt 4.8 project.

kibsoft commented 9 years ago

Ah, I use QCamera to get names of available devices. So, then you need to build QtMultimedia yourself. Look at my first message, there is a link to the archive with Qt's sources.

ghost commented 9 years ago

Thanks ,I am downloading right now ...

ghost commented 9 years ago

I apologize if I am missing something obvious but after downloading the sources ,and going to the src/multimedia folder ,I can't find any reference to a QCamera class.Am I supposed to look somewere else? Thanks.

kibsoft commented 9 years ago

Then you need to find QtMultimedia somewhere on http://code.qt.io :( But I don't know if it is there

ghost commented 9 years ago

Hello , I really appreciate your support ,

I I was able to find QtMultimedia here http://code.qt.io/cgit/qt-mobility/qt-mobility.git/ and i built it successfully ,the problem I have now is that I am getting link errors from ffmpeg like this : ...... c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdint.h(166) : warning C4005: 'UINT64_C' : macro redefinition ..\QtMEL-master\src\encoder\encoder.cpp(27) : see previous definition of 'UINT64_C' ..\QtMEL-master\src\encoder\encoder.cpp(43) : error C2371: 'AVBuffer' : redefinition; different basic types c:\users\daniel\desktop\qtmel-master\ffmpeg-20131025-git-2cf9448-win32-dev\include\libavutil\buffer.h(73) : see declaration of 'AVBuffer' ..\QtMEL-master\src\encoder\encoder.cpp(65) : error C2039: 'AVPixelFormat' : is not a member of 'EncoderGlobal'

..\QtMEL-master\src\encoder\encoder.cpp(105) : error C2039: 'AVPixelFormat' : is not a member of 'EncoderGlobal' ..\QtMEL-master\src\encoder\encoder.cpp(115) : error C2039: 'AVPixelFormat' : is not a member of 'EncoderGlobal' .......

I suspect that I am linking against the wrong version of ffmpeg than the one you used in your project. As you may have guessed I am linking against ffmpeg-20131025-git-2cf9448-win32-dev I got from here :http://ffmpeg.zeranoe.com/builds/ .Could I know the version of ffmpeg you linked against to build this library successfully?And if possible where can I find them?

Thank you!

kibsoft commented 9 years ago

I have used git-14d94a1 as written on http://kibsoft.ru You can download it from here.

ghost commented 9 years ago

Thanks again for your help, I have built the library successfully. I was able to look for your ffmpeg version and found windows prebuilt binaries here: http://ffmpeg.zeranoe.com/builds/win32/dev/ffmpeg-git-14d94a1-win32-dev.7z http://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-git-14d94a1-win32-shared.7z

In case somebody else faces the same issues here are a few tweaks I had to do to get it running: After configuration of ffmpeg,I had this link error: unresolved external symbol impUnhookWindowsHookEx@4 referenced in function "public: void __thiscall MouseHelperPrivate::stopGrabbing(void)" (?stopGrabbing@MouseHelperPrivate@@QAEXXZ)

which I resolved by linking to the User32.lib binary in the library .pro file by adding: LIBS += -lUser32

The other one was : _iterator_debug_level value '2' doesn't match value '0' ,something like this (http://stackoverflow.com/questions/4738987/iterator-debug-level-error-in-visual-studio ) comming from the resource file.All attempts to get rid of this error failed until I ignored the resource file by commenting out the resource file in the .pro file :

RESOURCES = resources.qrc

(May be you have better ways to resolve these problems?)

The encoder example is working fine ,but the camera example is not identifying my devices although (your ) prebuilt example(https://dl.dropboxusercontent.com/u/77719957/QtMEL_Examples.zip) can identify ,may be I need to look more in your AvailableDevices() function to see how I can get this to work.

I can't thank you enough for this great piece of work! Keep it up.

kibsoft commented 9 years ago

may be I need to look more in your AvailableDevices() function to see how I can get this to work.

It seems you have a trouble with your QtMultimedia build, AvailableDevices() uses it.

I can't thank you enough for this great piece of work!

Thanks!