[rhythmbox] player-gst: remove cdda hackery, emit prepare-source instead
- From: Jonathan Matthew <jmatthew src gnome org>
- To: svn-commits-list gnome org
- Subject: [rhythmbox] player-gst: remove cdda hackery, emit prepare-source instead
- Date: Tue, 2 Jun 2009 06:47:48 -0400 (EDT)
commit 20bc487fd727e4984c20eac0585023acf93670ce
Author: Jonathan Matthew <jonathan d14n org>
Date: Tue Jun 2 20:34:22 2009 +1000
player-gst: remove cdda hackery, emit prepare-source instead
---
backends/gstreamer/rb-player-gst.c | 20 +++++++-------------
1 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/backends/gstreamer/rb-player-gst.c b/backends/gstreamer/rb-player-gst.c
index 6657341..1e87467 100644
--- a/backends/gstreamer/rb-player-gst.c
+++ b/backends/gstreamer/rb-player-gst.c
@@ -342,24 +342,14 @@ bus_cb (GstBus *bus, GstMessage *message, RBPlayerGst *mp)
}
static void
-cdda_got_source_cb (GObject *object, GParamSpec *pspec, char *device)
+source_notify_cb (GObject *object, GParamSpec *pspec, RBPlayerGst *player)
{
GstElement *source;
-
g_object_get (object, "source", &source, NULL);
- rb_debug ("got source %p", source);
- if (source) {
- g_signal_handlers_disconnect_by_func (object, cdda_got_source_cb, device);
-
- g_object_set (G_OBJECT (source), "device", device, NULL);
- g_free (device);
- if (g_object_class_find_property (G_OBJECT_GET_CLASS (source), "paranoia-mode"))
- g_object_set (G_OBJECT (source), "paranoia-mode", 0, NULL);
+ g_signal_emit (player, signals[PREPARE_SOURCE], 0, player->priv->uri, source);
- if (g_object_class_find_property (G_OBJECT_GET_CLASS (source), "read-speed"))
- g_object_set (G_OBJECT (source), "read-speed", 1, NULL);
- }
+ g_object_unref (source);
}
static gboolean
@@ -383,6 +373,10 @@ construct_pipeline (RBPlayerGst *mp, GError **error)
"notify::volume",
G_CALLBACK (volume_notify_cb),
mp, 0);
+ g_signal_connect_object (G_OBJECT (mp->priv->playbin),
+ "notify::source",
+ G_CALLBACK (source_notify_cb),
+ mp, 0);
if (mp->priv->buffer_size != 0) {
g_object_set (mp->priv->playbin, "buffer-size", mp->priv->buffer_size * 1024, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]