一种新的尝试
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
clist=$(apt-cache --names-only search ^gstreamer1.0-* | awk '{ print $1 }' | sed -e /-doc/d | grep -v gstreamer1.0-hybris)
sudo apt-get install $list
sudo apt-get install libgstreamer-plugins-base1.0-dev
sudo apt-get install libgstreamer-plugins-bad1.0-dev
sudo apt-get install libqt5glib-2.0-0
sudo apt-get install glib-2.0
sudo apt-get install libicu-dev
將gstreamer添加到pkgconfig
pkg-config --cflags --libs gstreamer-1.0
测试gstreamer是否可用
新建文件basic-tutorial-1.c
#include <gst/gst.h>
int
main (int argc, char *argv[])
{
GstElement *pipeline;
GstBus *bus;
GstMessage *msg;
/* Initialize GStreamer */
gst_init (&argc, &argv);
/* Build the pipeline */
pipeline =
gst_parse_launch
("playbin uri=https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm",
NULL);
/* Start playing */
gst_element_set_state (pipeline, GST_STATE_PLAYING);
/* Wait until error or EOS */
bus = gst_element_get_bus (pipeline);
msg =
gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
GST_MESSAGE_ERROR | GST_MESSAGE_EOS);
/* Free resources */
if (msg != NULL)
gst_message_unref (msg);
gst_object_unref (bus);
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (pipeline);
return 0;
}
编译
gcc basic-tutorial-1.c -o basic-tutorial-1 `pkg-config --cflags --libs gstreamer-1.0`
播放视频
./basic-tutorial-1
安装qtcreator
sudo apt install qt5-default qtcreator -y
sudo apt install libsdl2-dev libqt5svg5-dev libqt5texttospeech5-dev libqt5serialport5-dev libqt5charts5-dev libqt5x11extras5-dev libqt5waylandclient5-dev
sudo apt install qtmultimedia5-dev
sudo apt install qtquickcontrols2-5-dev