Сказ про то как нуб gstreamer к qt проекту под виндой прикручивал |
Здравствуйте, гость ( Вход | Регистрация )
Сказ про то как нуб gstreamer к qt проекту под виндой прикручивал |
ibnz |
24.10.2014, 15:15
Сообщение
#1
|
Студент Группа: Новичок Сообщений: 11 Регистрация: 28.9.2011 Пользователь №: 2916 Спасибо сказали: 0 раз(а) Репутация: 0 |
Вводная.
WinXP + QtSDK 5.3.1 (MSVC2010) + QtCreator 3.2.1 Цель: скомпилить и пощупать пример VOIP http://gstreamer.freedesktop.org/data/doc/...pp-example.html СКАЗ Соблазнившись прелестями gstreamer и, вдохновившись наличием биндингов к Qt, кроссплатформенностью и вроде как даже примера именно того что мне требовалось (VOIP), я потирая руки полез установливать: • Сам gstreamer http://gstreamer.freedesktop.org/data/pkg/windows/1.4.3/ gstreamer-1.0-devel-x86-1.4.3.msi Ставим в папочку c:\gstreamer , отметив все галочки в мастере установки. • qt-gstreamer Рядышком в папочке c:\gstreamer создаем подпапочку qt-gstreamer куда делаем git clone http://anongit.freedesktop.org/git/gstream...t-gstreamer.git содержащий qt классы и собственно заветный пример. Лезем в папочку c:\gstreamer\qt-gstreamer\examples\voip\ и умиляясь лаконичности и миниатюрности всего лишь 3 файликов проекта, открываем voip.pro. Отмечая подробные комментарии и радующую глаз простоту и стройность кода, еще раз внутренне воздаем хвалу написавшему сие. Ничтоже сумняшеся, и уже, почти уверовав в благополучное и быстрое завершение начинания, рука сама потянулась и сделать Ctrl+B и тут же получила ответ от qmake в виде сообщения Цитата 14:09:06: Запускается: «C:\Qt\Qt5.3.1\5.3\msvc2010_opengl\bin\qmake.exe» C:\gstreamer\qt-gstreamer\examples\voip\voip.pro -r -spec win32-msvc2010 "CONFIG+=debug Project ERROR: Qt5GStreamer-1.0 development package not found" Чтож, лезем в профайл и открываем для себя кое-что из мира линуха.
Почитав, покурив, пощупав этот pkg-config, я так и не понял как оно должно работать под виндой и ко мне пришло волевое решение, что проще будет руками прописать нужные INCLUDEPATH и LIBS в профайле. Сказано сделано – комментим все вышеперечисленное, оставив токмо QT += widgets Проблемы с не найденными инклудами решаются строчками
Далее ругань на неразрешенные символы. Решение – добавить все cpp файлы из папки src Далее опять ругань на включение glib Лечим добавлением еще пары строчек к INCLUDEPATH
Далее я почувствовал что что-то идет совсем не так: В глубине сырцов qt-gstreamer в файле graphicsvideosurface.cpp нашлась пара необъявленных идентификаторов QTGLVIDEOSINK_NAME и QTVIDEOSINK_NAME Объявление нашлось в файле CMakeLists.txt Пролечилось
Далее еще несколько ненайденных включений
Далее пошло уж совсем нехорошее в plugin.moc (!) не нашлось объявления QDeclarativeExtensionPlugin… От безысходности я дрожащей лапкой все же прописал в moc файле.
И получил контрольный в голову в виде: Цитата C:\gstreamer\qt-gstreamer\examples\build-voip-5_3_1-Debug\debug\plugin.moc:80: ошибка: C2352: QDeclarativeExtensionPlugin::qt_metacast: недопустимый вызов нестатической функции-члена C:\Qt\Qt5.3.1\5.3\msvc2010_opengl\include\QtDeclarative/qdeclarativeextensionplugin.h(57): см. объявление "QDeclarativeExtensionPlugin::qt_metacast" Далее попробовал собрать qt-gstreamer cmake и обломился со следующей простынкой: Раскрывающийся текст Цитата The C compiler identification is MSVC 16.0.30319.1 The CXX compiler identification is MSVC 16.0.30319.1 Check for working C compiler using: Visual Studio 10 2010 Check for working C compiler using: Visual Studio 10 2010 -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Check for working CXX compiler using: Visual Studio 10 2010 Check for working CXX compiler using: Visual Studio 10 2010 -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done CMake Warning (dev) at CMakeLists.txt:49 (add_definitions): Policy CMP0005 is not set: Preprocessor definition values are now escaped automatically. Run "cmake --help-policy CMP0005" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMakeLists.txt:49 (add_definitions): Policy CMP0005 is not set: Preprocessor definition values are now escaped automatically. Run "cmake --help-policy CMP0005" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMakeLists.txt:49 (add_definitions): Policy CMP0005 is not set: Preprocessor definition values are now escaped automatically. Run "cmake --help-policy CMP0005" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. CMake Error at QGlib/CMakeLists.txt:49 (set_target_properties): set_target_properties called with incorrect number of arguments. CMake Warning (dev) at QGlib/CMakeLists.txt:52 (target_link_libraries): Cannot specify link libraries for target "LINK_PRIVATE" which is not built by this project. CMake does not support this but it used to work accidentally and is being allowed for compatibility. Policy CMP0016 is not set: target_link_libraries() reports error if its only argument is not a target. Run "cmake --help-policy CMP0016" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. CMake Error at QGlib/CMakeLists.txt:53 (qt4or5_use_modules): Unknown CMake command "qt4or5_use_modules". CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as cmake_minimum_required(VERSION 3.0) should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it. Configuring incomplete, errors occurred! See also "C:/gstreamer/qt-gstreamer/build/CMakeFiles/CMakeOutput.log". Цитата ...Make Error at QGlib/CMakeLists.txt:49 (set_target_properties): set_target_properties called with incorrect number of arguments. ...CMake Error at QGlib/CMakeLists.txt:53 (qt4or5_use_modules): Unknown CMake command "qt4or5_use_modules". |
|
|
Текстовая версия | Сейчас: 24.4.2024, 0:16 |