diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2007-02-06 15:56:14 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2007-02-06 15:56:14 +0000 |
commit | 881308d5c58f0b4c8a5cd3b32f924c03af12ee0d (patch) | |
tree | 6ad736e957a2aee18b733e6a181e3cbe9e9f46e9 /ext/gconf/gstgconfaudiosink.c | |
parent | cdba2c4219705c69fffb7bc5c08bc1ffdd3a75b4 (diff) |
ext/gconf/: In gconfaudiosink, get the right key as the old key in do_toggle (ie. one dependent on the profile select...
Original commit message from CVS:
* ext/gconf/gconf.c: (gst_gconf_get_key_for_sink_profile),
(gst_gconf_render_bin_from_key),
(gst_gconf_get_default_audio_sink):
* ext/gconf/gconf.h:
* ext/gconf/gstgconfaudiosink.c: (get_gconf_key_for_profile),
(do_toggle_element), (gst_gconf_audio_sink_set_property),
(gst_gconf_audio_sink_get_property):
In gconfaudiosink, get the right key as the old key in do_toggle
(ie. one dependent on the profile selected). Log some more stuff so
we can see what's actually going on.
Diffstat (limited to 'ext/gconf/gstgconfaudiosink.c')
-rw-r--r-- | ext/gconf/gstgconfaudiosink.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ext/gconf/gstgconfaudiosink.c b/ext/gconf/gstgconfaudiosink.c index 77297af6..375c2ede 100644 --- a/ext/gconf/gstgconfaudiosink.c +++ b/ext/gconf/gstgconfaudiosink.c @@ -136,11 +136,11 @@ get_gconf_key_for_profile (int profile) { switch (profile) { case GCONF_PROFILE_SOUNDS: - return GST_GCONF_DIR "/default/audiosink"; + return GST_GCONF_DIR GST_GCONF_AUDIOSINK_KEY; case GCONF_PROFILE_MUSIC: - return GST_GCONF_DIR "/default/musicaudiosink"; + return GST_GCONF_DIR GST_GCONF_MUSIC_AUDIOSINK_KEY; case GCONF_PROFILE_CHAT: - return GST_GCONF_DIR "/default/chataudiosink"; + return GST_GCONF_DIR GST_GCONF_CHAT_AUDIOSINK_KEY; default: g_return_val_if_reached (NULL); } @@ -189,11 +189,17 @@ gst_gconf_audio_sink_dispose (GObject * object) static gboolean do_toggle_element (GstGConfAudioSink * sink) { + const gchar *key; GstPad *targetpad; gchar *new_gconf_str; GstState cur, next; - new_gconf_str = gst_gconf_get_string (GST_GCONF_AUDIOSINK_KEY); + key = gst_gconf_get_key_for_sink_profile (sink->profile); + new_gconf_str = gst_gconf_get_string (key); + + GST_LOG_OBJECT (sink, "old gconf string: %s", GST_STR_NULL (sink->gconf_str)); + GST_LOG_OBJECT (sink, "new gconf string: %s", GST_STR_NULL (new_gconf_str)); + if (new_gconf_str != NULL && sink->gconf_str != NULL && (strlen (new_gconf_str) == 0 || strcmp (sink->gconf_str, new_gconf_str) == 0)) { @@ -257,8 +263,6 @@ gst_gconf_audio_sink_set_property (GObject * object, guint prop_id, { GstGConfAudioSink *sink; - g_return_if_fail (GST_IS_GCONF_AUDIO_SINK (object)); - sink = GST_GCONF_AUDIO_SINK (object); switch (prop_id) { @@ -282,8 +286,6 @@ gst_gconf_audio_sink_get_property (GObject * object, guint prop_id, { GstGConfAudioSink *sink; - g_return_if_fail (GST_IS_GCONF_AUDIO_SINK (object)); - sink = GST_GCONF_AUDIO_SINK (object); switch (prop_id) { |