Simple GStreamer Program Error on Crostini Debian

65 views Asked by At

I'm following the "Hello World" GStreamer tutorial from here. I first installed GStreamer via sudo apt-get install libgstreamer1.0-dev, and I compile the program using g++ -Wall gstreamer-hello-world.cpp $(pkg-config --cflags --libs gstreamer-1.0) with no problem. I downloaded a sample ogg file from here, and run the program using ./a.out Sample.ogg. The program outputs the error message: "One element could not be created. Exiting.". I can see at that point in the C program that 6 GstElement pointers are being checked. One of them is NULL: sink. The statement which tried to initialise sink is shown below:

sink = gst_element_factory_make("autoaudiosink", "audio-output");

I am working on the virtual machine running Debian available within ChromeOS (often called Crostini). I can run other programs on Crostini which play audio. For example, VLC works, and has "VirtIO SoundCard" listed as the Audio Device.

1

There are 1 answers

0
user2023370 On

The solution is to install the gstreamer1.0-plugins-good package:

sudo apt-get install gstreamer1.0-plugins-good