You may not need everything, but this will install all gstreamer plug-ins.
$ sudo apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio libgstreamer-plugins-base1.0-dev
You must adjust the C code for gst_viewer.c to match the /dev/video*
device of your particular setup. Likely, you need to set it to /dev/video0
. Alternately, you can use the tip by snaffu666 and use the video_nr option of v4l2loopback.