jenerated

blog

Gstreamer0.10 without Pulseaudio

You used to be able to configure gstreamer0.10-using applications to output sound using OSSv4 via gconf; I had the following in $XDG_CONFIG_HOME/gconf/system/gstreamer/0.10/default/%gconf.xml:

<?xml version="1.0"?>
<gconf>
  <entry name="audiosrc" mtime="1390923248" type="string">
    <stringvalue>osssrc</stringvalue>
  </entry>
  <entry name="videosrc" mtime="1390923248" type="string">
    <stringvalue>v4l2src</stringvalue>
  </entry>
  <entry name="videosink" mtime="1390923248" type="string">
    <stringvalue>autovideosink</stringvalue>
  </entry>
  <entry name="audiosink" mtime="1390923248" type="string">
    <stringvalue>oss4sink</stringvalue>
  </entry>
</gconf>

It wasn't working after I reinstalled Linux on a new SSD (I suspected my old drive was starting to fail). It appears gstreamer now uses GSettings/dconf, so instead I ran the following in a bash prompt. music-audiosink was the only one I needed to get audio working in luakit, but I figured that setting the rest of them couldn't hurt.

gsettings set org.freedesktop.gstreamer-0.10.default-elements music-audiosink oss4sink
gsettings set org.freedesktop.gstreamer-0.10.default-elements chat-audiosink oss4sink
gsettings set org.freedesktop.gstreamer-0.10.default-elements sounds-audiosink oss4sink

If you're using plain old ALSA, you can replace that with the following.

gsettings set org.freedesktop.gstreamer-0.10.default-elements music-audiosink alsasink
gsettings set org.freedesktop.gstreamer-0.10.default-elements chat-audiosink alsasink
gsettings set org.freedesktop.gstreamer-0.10.default-elements sounds-audiosink alsasink

Also useful for exploration are list-keys and get, which are used in this manner:

gsettings list-keys org.freedesktop.gstreamer-0.10.default-elements
gsettings get org.freedesktop.gstreamer-0.10.default-elements music-audiosink