[Farsight-devel] Modifications to ghostpad creation inside rtpbin

2007-06-05 Thread SP GLE
Hi,
here is a patch for handling ghostpad creation differently (unref of
the internal pad). Regards.




  


___ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com--- gstrtpbin.c.05062007	2007-06-01 16:11:08.0 +0200
+++ gstrtpbin.c	2007-06-05 14:09:11.765663232 +0200
@@ -604,16 +604,20 @@ gst_rtp_bin_setup_elements (GstRTPBin * 
 /* Let's just ghost pad rtcpsink on rtpbin */
 GstPad *newpad1 = NULL;
 GstPad *newpad2 = NULL;
-newpad1 = gst_ghost_pad_new ("rtcpsink",
-gst_element_get_pad (rtp_bin->rtprecv, "rtcpsink"));
+	GstPad *tmppad = NULL;
+	
+	tmppad = gst_element_get_pad (rtp_bin->rtprecv, "rtcpsink");
+newpad1 = gst_ghost_pad_new ("rtcpsink", tmppad );
+	gst_object_unref (tmppad);
 
 if (!gst_element_add_pad (GST_ELEMENT (rtp_bin), newpad1)) {
 gst_object_unref (newpad1);
 GST_DEBUG ("Could not setup rtcpsink ghost pad");
 return FALSE;
 }
-newpad2 = gst_ghost_pad_new ("rtcpsrc",
-gst_element_get_pad (rtp_bin->rtpsend, "rtcpsrc"));
+	tmppad = gst_element_get_pad (rtp_bin->rtpsend, "rtcpsrc");
+newpad2 = gst_ghost_pad_new ("rtcpsrc", tmppad);
+	gst_object_unref (tmppad);
 
 if (!gst_element_add_pad (GST_ELEMENT (rtp_bin), newpad2)) {
 gst_object_unref (newpad2);
@@ -839,9 +843,12 @@ gst_rtp_bin_setup_rtpsend_pads(GstRTPBin
 GST_DEBUG ("Using bypass_udp to create ghostpads for rtpsend");
 /* Let's just ghost pad rtpsrc on rtpbin */
 GstPad *bypass_pad = NULL;
-bypass_pad = gst_ghost_pad_new ("rtpsrc",
-gst_element_get_pad (rtp_bin->rtpsend, "rtpsrc"));
+	GstPad *tmppad = NULL;
 
+	tmppad = gst_element_get_pad (rtp_bin->rtpsend, "rtpsrc");
+bypass_pad = gst_ghost_pad_new ("rtpsrc", tmppad);
+	gst_object_unref (tmppad);
+	
 gst_pad_set_active (bypass_pad, TRUE);
 
 if (!gst_element_add_pad (GST_ELEMENT (rtp_bin), bypass_pad)) {
@@ -857,9 +864,12 @@ static GstPad *
 gst_rtp_bin_setup_rtprecv_pads(GstRTPBin * rtp_bin)
 {
 GstPad *newpad = NULL;
-newpad = gst_ghost_pad_new ("src",
-gst_element_get_pad (rtp_bin->jbuf, "src"));
-
+GstPad *tmppad = NULL;
+
+tmppad = gst_element_get_pad (rtp_bin->jbuf, "src");
+newpad = gst_ghost_pad_new ("src",tmppad);
+gst_object_unref (tmppad);
+
 gst_pad_set_active (newpad, TRUE);
 
 if (!gst_element_add_pad (GST_ELEMENT (rtp_bin), newpad)) {
@@ -872,8 +882,11 @@ gst_rtp_bin_setup_rtprecv_pads(GstRTPBin
 GST_DEBUG ("Using bypass_udp to create ghostpads on rtprecv");
 /* Let's just ghost pad rtpsink on rtpbin */
 GstPad *newpad = NULL;
-newpad = gst_ghost_pad_new ("rtpsink",
-gst_element_get_pad (rtp_bin->rtprecv, "rtpsink"));
+	GstPad *tmppad = NULL;
+	
+	tmppad = gst_element_get_pad (rtp_bin->rtprecv, "rtpsink");
+newpad = gst_ghost_pad_new ("rtpsink",tmppad);
+	gst_object_unref (tmppad);
 
 gst_pad_set_active (newpad, TRUE);
 
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Farsight-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/farsight-devel


[Farsight-devel] Modifications to ghostpad creation inside rtpbin

2007-06-05 Thread SP GLE
Hi,



  
_ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Farsight-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/farsight-devel