title: GStreamer gst_element_factory_make fails
body: <p>I'm trying out a GStreamer test application, but at runtime the following line fails:</p>
  
  <pre><code>demuxer = gst_element_factory_make ("oggdemux", "ogg-demuxer"); // returns NULL
  </code></pre>
  
  <p>I am using MacOSX and installed GStreamer, libogg and vorbis-tools through MacPorts. So I don't see why it fails.</p>
  
  <p>Any suggestions on how to make it work?</p>
  
  <p><strong>EDIT: SOLVED!</strong></p>
  
  <p>The problem was that I needed to install the autodetect plugin from the gst-plugins-good package.</p>
  
  <p>Here's a list of actions that made it work:</p>
  
  <p>Remove the MacPorts installation:</p>
  
  <p><code>sudo port uninstall gstreamer</code></p>
  
  <p>Add the following line to ~/.profile</p>
  
  <pre><code>export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
  </code></pre>
  
  <p>Download gstreamer, gstreamer-plugins-base and gstreamer-plugins-good sources.</p>
  
  <p>Build and install gstreamer (./configure, make, make install)</p>
  
  <p>Build and install gstreamer-plugins-base (./configure, make, make install)</p>
  
  <p>And for gstreamer-plugins-good I only built the autodetect package because building all resulted in errors for some plugins that I don't need or care about now. I did it like this:</p>
  
  <pre><code>./configure
  cd gst/autodetect/
  make
  sudo make install
  </code></pre>
  
  <p>Right now the program builds and runs. I don't seem to be getting any audio output however :( but that's another issue.</p>