[banshee] libbanshee: Fix the audiotee's alloc-pad property



commit 260ab643c0e3401acd86055a6560005bbbd13b68
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Thu Mar 31 10:37:54 2011 -0500

    libbanshee: Fix the audiotee's alloc-pad property
    
    According to Sebastian, "setting it to audiosinkqueue's never had any
    effect (and when running with GST_DEBUG=tee:3 you would get a warning)"
    and "the only difference will be that the audio decoders will allocate
    the buffers from the audio sink instead of allocating them themselves
    (and in the future they could get hardware memory but currently no
    audio sink implements that, only video sinks do)."

 libbanshee/banshee-player-pipeline.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/libbanshee/banshee-player-pipeline.c b/libbanshee/banshee-player-pipeline.c
index 71f221d..d98c165 100644
--- a/libbanshee/banshee-player-pipeline.c
+++ b/libbanshee/banshee-player-pipeline.c
@@ -273,7 +273,6 @@ static void bp_volume_changed_callback (GstElement *playbin, GParamSpec *spec, B
 gboolean 
 _bp_pipeline_construct (BansheePlayer *player)
 {
-    GValue value = {0};
     GstBus *bus;
     GstPad *teepad;
     GstPad *pad;
@@ -406,15 +405,10 @@ _bp_pipeline_construct (BansheePlayer *player)
     bus = gst_pipeline_get_bus (GST_PIPELINE (player->playbin));    
     gst_bus_add_watch (bus, bp_pipeline_bus_callback, player);
 
-    
-    GstPad *sinkpad = gst_element_get_pad (audiosinkqueue, "sink");
-    g_value_init (&value, G_OBJECT_TYPE (sinkpad));
-    g_value_set_instance (&value, sinkpad);
-    g_object_set_property (G_OBJECT (player->audiotee), "alloc-pad", &value);
-    g_value_unset (&value);
-
     // Link the first tee pad to the primary audio sink queue
+    GstPad *sinkpad = gst_element_get_pad (audiosinkqueue, "sink");
     pad = gst_element_get_request_pad (player->audiotee, "src%d");
+    g_object_set(player->audiotee, "alloc-pad", pad, NULL);
     gst_pad_link (pad, sinkpad);
     gst_object_unref (GST_OBJECT (pad));
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]