Error GStreamer gst_element_factory_make

I am testing a test application GStreamer, but at runtime the following line does not work:

demuxer = gst_element_factory_make ("oggdemux", "ogg-demuxer"); // returns NULL

I use MacOSX and install GStreamer, libogg and vorbis-tools through MacPorts. Therefore, I do not understand why this fails.

Any suggestions on how to make it work?

EDIT: SOLVED!

The problem was that I needed to install the autodetect plugin from the gst-plugins-good package.

Here is a list of the actions that made it work:

Uninstall the MacPorts installation:

sudo port uninstall gstreamer

Add the following line to the ~ / .profile file

export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig

Download gstreamer, gstreamer-plugins-base, and gstreamer-plugins-good sources.

Create and install gstreamer (./configure, make, make install)

Create and install gstreamer-plugins-base (./configure, make, make install)

gstreamer-plugins-good autodetect, , . :

./configure
cd gst/autodetect/
make
sudo make install

. , :( .

+3
2

gstelementfactory.c ( GStreamer 0.10.25) 463 (gst_element_factory_make ), , NULL:

  • ('factoryname') - NULL (, )
  • factory ( gst_element_factory_find NULL)
  • ( gst_element_Factory_create NULL)

, , , .

oggdemux, :

gst-inspect oggdemux

, gst-register .

+3

ubuntu, :

sudo apt-get install gstreamer1.0 - *

.

+2

Source: https://habr.com/ru/post/1722560/


All Articles