Obviously Qt's implementation of GStreamer is still buggy. In my case I want to have an H.264 Stream coming from the USB Grabber stored to a file AND shown in a Qt (Quick) Widget. Qt can't handle this by now. And I don't see a way of piping the right options through to GStreamer.
Nevertheless, GStreamer implementation itself (1.0) ist working perfectly. Examples for gst-launch to store the stream as file:
Code: Select all
$ gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-h264,format=MP42,width=704,height=576,framerate=25/1,pixelformat=uyvy' ! filesink location=test_h264.mp4
Or with MPEG4 codec:
Code: Select all
$ gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/mpeg,mpegversion=4,format=MP42,width=704,height=576,framerate=25/1,pixelformat=uyvy' ! filesink location=test_mpeg4.mp4
Even showing the stream on the HDMI Display with HW acceleration works great (5% ARM CPU usage):
Code: Select all
$ gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-h264,format=MP42,width=704,height=576,framerate=25/1,pixelformat=uyvy,profile=constrained-baseline' ! h264parse ! omxh264dec ! autovideosink
Combing these with the "tee" element should work also.
But cross-compiling a simple application (GStreamer 1.4 hello world example) against the gstreamer libraries fails right now - and Google didn't help me, yet.
Code: Select all
/opt/rpi/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: main.o: undefined reference to symbol 'g_print'
/opt/rpi/sysroot/lib/arm-linux-gnueabihf/libglib-2.0.so.0: error adding symbols: DSO missing from command line
My INCLUDEPATH variable looks as follows:
Code: Select all
INCLUDEPATH += "/opt/rpi/sysroot/opt/vc/lib/" \ # libGLESv2
"/opt/rpi/sysroot/usr/include/gstreamer-1.0/" \ # GStreamer-1.0
"/opt/rpi/sysroot/usr/include/glib-2.0/" \ # GLib-2.0
"/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/glib-2.0/include/" \ # GLib-2.0 Includes
Anybody out there who can point me in the right direction?
Include path order, missing libraries?
Best regards,
Florian