Script to configure gstreamer for MATE Desktop

OSS specific Linux discussion (x86/amd64)

Moderators: hannu, dev, cesium

igorzwx
Known Member
Posts: 1247
Joined: Sun Jun 28, 2009 9:31 pm

Script to configure gstreamer for MATE Desktop

Postby igorzwx » Sat Apr 20, 2013 2:16 am

The original Temüjin's script is here: http://www.4front-tech.com/forum/viewto ... 324#p13516

To use gstreamer with OSS4 on Linux Mint 14 Mate, you may need to install some packages:

Code: Select all

$ sudo apt-get install gstreamer1.0-plugins-good gstreamer1.0-tools gstreamer0.10-plugins-good gstreamer0.10-tools
$ sudo apt-get install mate-conf gconf2


Gstreamer manual is here: http://gstreamer.freedesktop.org/data/d ... using.html

Magic script for MATE Desktop:

Code: Select all

#!/bin/bash
# Temüjin's script modified for MATE Desktop.
# Configures gstreamer for OSS4 if no GUI is available to do so. Assumes you have mate-conf, gconf2 and gstreamer0.10-tools packages installed.
# Change to the directory you saved this file to and:
# chmod +x oss4gstr.sh
# ./oss4gstr_mate.sh


PREFIX=''
if test "`gst-inspect-0.10 oss4 | grep oss4`"
then
   PREFIX='oss4'
else
   PREFIX='oss'
fi

MIXER=$PREFIX'mixer'
SINK=$PREFIX'sink'
SOURCE=$PREFIX'src'

# The following commands will set value "codec3.jack.green.front" for default_mixer_tracks key:

mateconftool-2 --type string --set /desktop/mate/sound/default_mixer_tracks codec3.jack.green.front
gconftool-2 --type string --set /desktop/gnome/sound/default_mixer_tracks codec3.jack.green.front

# You can change "codec3.jack.green.front" to "vol", or "pcm",  or "vmix0-outvol", or else (it depends on your ossmix).

# Sound events will be disabled. If you need them, set event_sounds to true

mateconftool-2 --type string --set /desktop/mate/sound/default_mixer_device $MIXER
mateconftool-2 --type bool --set /desktop/mate/sound/enable_esd false
mateconftool-2 --type bool --set /desktop/mate/sound/event_sounds false

mateconftool-2 --type string --set /system/gstreamer/0.10/default/audiosrc $SOURCE
mateconftool-2 --type string --set /system/gstreamer/0.10/default/audiosink $SINK
mateconftool-2 --type string --set /system/gstreamer/0.10/default/chataudiosink $SINK
mateconftool-2 --type string --set /system/gstreamer/0.10/default/musicaudiosink $SINK

gconftool-2 --type string --set /desktop/gnome/sound/default_mixer_device $MIXER
gconftool-2 --type bool --set /desktop/gnome/sound/enable_esd false
gconftool-2 --type bool --set /desktop/gnome/sound/event_sounds false

gconftool-2 --type string --set /system/gstreamer/0.10/default/audiosrc $SOURCE
gconftool-2 --type string --set /system/gstreamer/0.10/default/audiosink $SINK
gconftool-2 --type string --set /system/gstreamer/0.10/default/chataudiosink $SINK
gconftool-2 --type string --set /system/gstreamer/0.10/default/musicaudiosink $SINK

echo "New settings for GNOME/gstreamer:"
 gconftool --recursive-list /desktop/gnome/sound
 gconftool --recursive-list /system/gstreamer/0.10/default
echo " "
echo "_________________________________________________________"
echo " "
echo "New settings for MATE/gstreamer:"
 mateconftool-2 --recursive-list /desktop/mate/sound
 mateconftool-2 --recursive-list /system/gstreamer/0.10/default
echo " "

# return 0


Make it executable, and run:

Code: Select all

$ ./oss4gstr_mate.sh


The output should be like this:

Code: Select all

$ ./oss4gstr_mate.sh
New settings for GNOME/gstreamer:
 default_mixer_tracks = codec3.jack.green.front
 default_mixer_device = oss4mixer
 enable_esd = false
 event_sounds = false
 theme_name = freedesktop
 input_feedback_sounds = false
 videosink = autovideosink
 chataudiosink = oss4sink
 audiosink = oss4sink
 videosrc = v4l2src
 visualization = goom
 audiosink_description = Default
 musicaudiosink = oss4sink
 chataudiosink_description = Default
 audiosrc_description = Default
 audiosrc = oss4src
 musicaudiosink_description = Default
 
_________________________________________________________
 
New settings for MATE/gstreamer:
 default_mixer_tracks = codec3.jack.green.front
 default_mixer_device = oss4mixer
 enable_esd = false
 event_sounds = false
 theme_name = LinuxMint
 input_feedback_sounds = false
 videosink = autovideosink
 audiosrc = oss4src
 audiosink = oss4sink
 musicaudiosink = oss4sink
 videosrc = v4l2src
 chataudiosink = oss4sink

NOTE: You can also set the value of "default_mixer_tracks" to "vol", or "pcm", or "vmix0-outvol", or else (it depends on your ossmix).

On, Linux Mint 14 Mate, "default_mixer_tracks" and "default_mixer_device" seem to be "deprecated". They can be set to arbitrary values. It does not change everything.

On a notebook, special multimedia keys may work, or may not work (this is usually the case).
If they do not work, you may try to fix them yourself:
https://wiki.ubuntu.com/Hotkeys/Troubleshooting
https://wiki.archlinux.org/index.php/Acpid
https://wiki.archlinux.org/index.php/Ex ... board_Keys

mate-settings-daemon-gstreamer is patched to support notification with multimedia keys.
It works, but it seems to be extremely buggy, especially with Intel HDA codecs.
It is usable with old AC'97 codecs.
For Intel HDA codecs, you may prefer "custom keys" without notification.

Custom hotkeys (example):

Code: Select all

$ mate-keybinding-properties

$ ossmix vol +2
$ ossmix -- vol -2
$ ossmix vol 0:0


Instead of "vol", you can use "pcm", or "codec3.jack.green.front", or "vmix0-outvol", or else (it depends on your ossmix).

Code: Select all

$ ossmix codec3.jack.green.front +2
$ ossmix -- codec3.jack.green.front -2
$ ossmix codec3.jack.green.front-mute TOGGLE
Attachments
oss4gstr_mate.sh.tar.gz
Script to configure gstreamer for MATE Desktop
(854 Bytes) Downloaded 1133 times

Return to “Linux”

Who is online

Users browsing this forum: No registered users and 4 guests