[banshee] [libbanshee] Go back to notify::volume usage
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [libbanshee] Go back to notify::volume usage
- Date: Thu, 17 Jun 2010 21:47:53 +0000 (UTC)
commit 0d80c8e9e75baa72eedc9ad49bf6413a32f6843c
Author: Gabriel Burt <gabriel burt gmail com>
Date: Thu Jun 17 14:45:47 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 b12202c..773f568 100644
--- a/libbanshee/banshee-player-pipeline.c
+++ b/libbanshee/banshee-player-pipeline.c
@@ -258,7 +258,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)
{
gdouble volume;
@@ -309,7 +309,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);
g_signal_connect (player->playbin, "video-changed", G_CALLBACK (playbin_stream_changed_cb), player);
g_signal_connect (player->playbin, "audio-changed", G_CALLBACK (playbin_stream_changed_cb), player);
g_signal_connect (player->playbin, "text-changed", G_CALLBACK (playbin_stream_changed_cb), player);
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 7c3c650..5a4cc9d 100644
--- a/libbanshee/banshee-player.c
+++ b/libbanshee/banshee-player.c
@@ -273,10 +273,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),
@@ -286,7 +282,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]