After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 570378 - Weird bus messages after calling gst_mixer_set_volume()
Weird bus messages after calling gst_mixer_set_volume()
Status: RESOLVED DUPLICATE of bug 478512
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.21
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-02-03 15:18 UTC by Jannis Pohlmann
Modified: 2009-10-20 02:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test application which makes the bug visible (6.07 KB, text/plain)
2009-02-03 15:26 UTC, Jannis Pohlmann
Details

Description Jannis Pohlmann 2009-02-03 15:18:09 UTC
Please describe the problem:
I'm the author of xfce4-mixer which uses the GstMixer interface of GStreamer. Ever since I started working on it, one bug annoyed the hell out of me.

It appears in at least two variants:

1. 
After a call to gst_mixer_set_volume(), I receive a volume change message from the bus which belongs to the track I just changed. Let (10,10) be the volumes I've set with gst_mixer_set_volume(), then the message I receive would be something like (0,10). One channel is dropped to zero and I have no idea why. This only happens sometimes but often enough to be annoying. In xfce4-mixer it makes GtkScales jump around like crazy.

2. 
After a call to gst_mixer_set_volume() of a capture track and recording on that track is disabled, I suddenly receive a record toggled message which tells me that recording was enabled. Weird.

I've written a small test program for scenario 1 in order to make sure it's not a bug in xfce4-mixer and it's not caused by a race condition between the faders and the GstBus. I'll attach it to this bug report.

Steps to reproduce:
1. Call gst_mixer_set_volume() on a playback or capture track

Actual results:
The volume is applied but suddenly GStreamer freaks out,  drops some of the channels of the track (playback) or activates recording (capture) and sends out a bus message reflecting its weird behaviour.

Expected results:
The volume is applied inside GStreamer and no bus messages are sent back to the application that changed the volume.

Does this happen every time?
No, but quite often.

Other information:
I'm using gst-plugins-base 0.10.21 with the ALSA driver.
Comment 1 Jannis Pohlmann 2009-02-03 15:26:02 UTC
Created attachment 127849 [details]
Test application which makes the bug visible

This is an test application for scenario 1 which controls the ALSA PCM track. 
The GtkRange controls the volume of all channels at the same time (it always sets them to the same value). It does not interfere with the GstBus. It does not update its own value when there are bus messages.
There is a label for each channel of the PCM track. These labels are only changed by volume change bus messages. 
Now, if you keep adjusting the scale for a while you will notice that at some point, these labels will contain values like "CH 0: 0" and "CH 1: 15", which means that GStreamer has dropped the first channel to zero. But the GtkScale always sets the same volume for all channels.

The program can be compiled with:
gcc -o test test.c `pkg-config --cflags --libs gstreamer-plugins-base-0.10` `pkg-config --cflags --libs gtk+-2.0` -lgstaudio-0.10 -lgstinterfaces-0.10
Comment 2 Jannis Pohlmann 2009-10-20 02:53:59 UTC
I'm pretty sure this is a duplicate of #478512.

*** This bug has been marked as a duplicate of bug 478512 ***