GNOME Bugzilla – Bug 561752
GstRtpBin implement Release pad functions
Last modified: 2009-06-29 16:50:10 UTC
The release_pad function tries to compare its pad .. but what it stores is the pad it requested from the gstrtpsession (ie.. the ghost pad's target).. patch attached
Created attachment 123146 [details] [review] patch to fix the first step.. Also, it would be nice if the releasing was actually implemented, are you planning to do it in the short term, or should I try to do it ?
Patch by: Olivier Crete <tester at tester dot ca> * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_release_pad): Release the right pads on rtpbin. Fixes #561752.
Created attachment 134612 [details] [review] rtpbin: Remove src pad when it is unlinked from the pt demuxer Clean up the rtpbin ghost pad when its parent on the PT demuxer is unlinked.
Created attachment 134613 [details] [review] rtpbin: Implement releasing of rtcp src pad
Created attachment 134614 [details] [review] rtpbin: Implement releasing of rtp send pads
Created attachment 134615 [details] [review] rtpbin: Implement releasing of the recv rtcp request pad
Created attachment 134616 [details] [review] rtpbin: Implement relasing of the rtp recv pad
Created attachment 134617 [details] [review] rtpbin: Keep jb signals handler Keep the signal handlers so they can be disconnected at release time
Created attachment 134618 [details] [review] rtpbin: Implement releasing the streams
Created attachment 134619 [details] [review] rtpbin: Free session if all request pads have been released
All (expect unneeded pacth in Comment #3) commited along with some unit tests.
The patch in comment #3 is needed for the case where you do PLAYING->NULL->PLAYING on a pipeline containing a gstrtpbin. Otherwise it tries to re-add the existing pad (because the sometimes pad from the ptdemux are removed).
Created attachment 137442 [details] [review] rtpbin: Remove src pad when it is unlinked from the pt demuxer
Arg, that last patch is wrong too, taking the shutdown lock seems to deadlock somehow. Anyway, stream->pads should not be needed, they all be removed when the ptdemux is NULLed anyway.
commit 4bc5e2f61ed93072f3e96933af25b08fd6a2807f Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Mon Jun 29 18:48:33 2009 +0200 rtpbin: do better cleanup of the src ghostpads Connect to the pad-removed signal of the ptdemux elements so that we remove the ghostpads for them. Fixes cleanup when going to NULL as well as when releasing the sinkpads. Fixes #561752