Transplantation, installation and use of qt-gstreamer plug-ins

1. Installation environment preparation

Material preparation: It is necessary to establish a gstreamer plug-in environment. Anyone who has used gstreamer plug-ins knows this. You can refer to the link: https://blog.csdn.net/u011625775/article/details/81836880

Source code download: http://gstreamer.freedesktop.org/src/     select qt-gstreamer

Preparation for compiling the source code dependent environment:

1,gstreamer-1.0

2. The operating environment of Qt5 (I have transplanted Qt5.9)

Second, source code compilation

$ tar -xvf  qt-gstreamer-1.2.0.tar.gz 

$ cd qt-gstreamer-1.2.0  

$ mkdir build && cd build
 

When building, write the configuration items into the bash file:

./runShell.sh
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/qt5-gstreamer \

         -DCMAKE_BUILD_TYPE=Release \

         -DQT_VERSION=5 \

         -DQTGSTREAMER_STATIC=OFF \

         -DQTGSTREAMER_EXAMPLES=OFF \

         -DQTGSTREAMER_TESTS=ON \

         -DQTGSTREAMER_CODEGEN=ON       \

         -DUSE_GST_PLUGIN_DIR=ON        \

         -Wno-dev \

         -DCMAKE_PREFIX_PATH=/usr/local/qt5.9.1_local/lib

 

The above configuration is only for reference, you can practice according to README

When compiling for the first time, it may fail to compile. At this time, some dependencies need to be resolved before the build can continue.

Add dependencies:

sudo apt-get install qtquick1-5-dev qtscript5-dev
sudo apt-get install doxygen
sudo apt-get install libboost-all-dev

Some students may have some other dependencies that need to be installed. Here, everyone adapts to the situation; because everyone's compilation environment is different, and the problems encountered are also different, but there is only one solution, that is to find the cause of the error, install Dependencies missing at build time.


$ make

Some functions cannot be found on tegra-TX1

There may be libGL.so and libEGL.so library version problems during make.

Solution:

cd /usr/lib/gcc/aarch64-linux-gnu/5/../../aarch64-linux-gnu/
cd /usr/lib/aarch64-linux-gnu

sudo rm libEGL.so

sudo ln -s /usr/lib/aarch64-linux-gnu/tegra-egl/libEGL.so libEGL.so

sudo rm libGL.so

sudo ln -s /usr/lib/aarch64-linux-gnu/tegra/libGL.so libGL.so


$ make install

Or build with cmake in qtcreator

3. Compile and run the example

Copy the sample project to your own project directory and open it with qtcreator

Configure the pro file.

 

 

 

 

               

Guess you like

Origin blog.csdn.net/wfjdemmye/article/details/83242334