[banshee/stable-1.6] [libbanshee] Go back to notify::volume usage
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/stable-1.6] [libbanshee] Go back to notify::volume usage
- Date: Thu, 17 Jun 2010 21:48:50 +0000 (UTC)
commit 52fd7b302b92358c63acf30047d9e39a2dbff347
Author: Gabriel Burt <gabriel burt gmail com>
Date: Thu Jun 17 14:48:37 2010 -0700
[libbanshee] Go back to notify::volume usage
The deep-notify::volume was causing a native crash, and it's not
needed anyway since playbin2 itself has the volume property.
libbanshee/banshee-player-pipeline.c | 4 ++--
libbanshee/banshee-player-pipeline.h | 1 -
libbanshee/banshee-player.c | 5 -----
3 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/libbanshee/banshee-player-pipeline.c b/libbanshee/banshee-player-pipeline.c
index 07567fb..a051d9e 100644
--- a/libbanshee/banshee-player-pipeline.c
+++ b/libbanshee/banshee-player-pipeline.c
@@ -234,7 +234,7 @@ static void bp_about_to_finish_callback (GstElement *playbin, BansheePlayer *pla
}
#endif //ENABLE_GAPLESS
-void bp_volume_changed_callback (GstElement *playbin, GParamSpec *spec, BansheePlayer *player)
+static void bp_volume_changed_callback (GstElement *playbin, GParamSpec *spec, BansheePlayer *player)
{
g_return_if_fail (IS_BANSHEE_PLAYER (player));
g_return_if_fail (GST_IS_ELEMENT (playbin));
@@ -284,7 +284,7 @@ _bp_pipeline_construct (BansheePlayer *player)
g_return_val_if_fail (player->playbin != NULL, FALSE);
- g_signal_connect (player->playbin, "deep-notify::volume", G_CALLBACK (bp_volume_changed_callback), player);
+ g_signal_connect (player->playbin, "notify::volume", G_CALLBACK (bp_volume_changed_callback), player);
// Try to find an audio sink, prefer gconf, which typically is set to auto these days,
// fall back on auto, which should work on windows, and as a last ditch, try alsa
diff --git a/libbanshee/banshee-player-pipeline.h b/libbanshee/banshee-player-pipeline.h
index b449aa8..7f5c00f 100644
--- a/libbanshee/banshee-player-pipeline.h
+++ b/libbanshee/banshee-player-pipeline.h
@@ -34,6 +34,5 @@
gboolean _bp_pipeline_construct (BansheePlayer *player);
void _bp_pipeline_destroy (BansheePlayer *player);
void _bp_pipeline_rebuild (BansheePlayer* player);
-void bp_volume_changed_callback (GstElement *playbin, GParamSpec *spec, BansheePlayer *player);
#endif /* _BANSHEE_PLAYER_PIPELINE_H */
diff --git a/libbanshee/banshee-player.c b/libbanshee/banshee-player.c
index 4a6f919..ad56bfb 100644
--- a/libbanshee/banshee-player.c
+++ b/libbanshee/banshee-player.c
@@ -313,10 +313,6 @@ bp_set_volume (BansheePlayer *player, gdouble volume)
g_return_if_fail (IS_BANSHEE_PLAYER (player));
g_return_if_fail (GST_IS_ELEMENT (player->playbin));
- // Idea taken from RB: ignore the deep-notify we get directly from the sink, as it causes deadlock, and we'll
- // get another anyway
- g_signal_handlers_block_by_func (player->playbin, bp_volume_changed_callback, player);
-
if (bp_supports_stream_volume (player)) {
#if BANSHEE_CHECK_GST_VERSION(0,10,25)
gst_stream_volume_set_volume (GST_STREAM_VOLUME (player->playbin),
@@ -326,7 +322,6 @@ bp_set_volume (BansheePlayer *player, gdouble volume)
g_object_set (player->playbin, "volume", CLAMP (volume, 0.0, 1.0), NULL);
}
- g_signal_handlers_unblock_by_func (player->playbin, bp_volume_changed_callback, player);
_bp_rgvolume_print_volume (player);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]