[farsight2/master] Remove filter with sink
Olivier Crête
olivier.crete at collabora.co.uk
Thu Feb 5 06:32:07 PST 2009
---
transmitters/multicast/fs-multicast-transmitter.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/transmitters/multicast/fs-multicast-transmitter.c b/transmitters/multicast/fs-multicast-transmitter.c
index d82fcb9..136c2e8 100644
--- a/transmitters/multicast/fs-multicast-transmitter.c
+++ b/transmitters/multicast/fs-multicast-transmitter.c
@@ -485,6 +485,7 @@ struct _UdpSock {
GstPad *udpsrc_requested_pad;
GstElement *udpsink;
+ GstElement *udpsink_filter;
GstPad *udpsink_requested_pad;
gchar *local_ip;
@@ -1031,6 +1032,19 @@ fs_multicast_transmitter_put_udpsock (FsMulticastTransmitter *trans,
GST_ERROR ("Could not remove udpsink element from transmitter source");
}
+ if (udpsock->udpsink_filter)
+ {
+ GstStateChangeReturn ret;
+ gst_element_set_locked_state (udpsock->udpsink_filter, TRUE);
+ ret = gst_element_set_state (udpsock->udpsink_filter, GST_STATE_NULL);
+ if (ret != GST_STATE_CHANGE_SUCCESS)
+ GST_ERROR ("Error changing state of udpsink filter: %s",
+ gst_element_state_change_return_get_name (ret));
+ if (!gst_bin_remove (GST_BIN (trans->priv->gst_sink),
+ udpsock->udpsink_filter))
+ GST_ERROR ("Could not remove sink filter element from transmitter sink");
+ }
+
if (udpsock->fd >= 0)
close (udpsock->fd);
--
1.5.6.5
More information about the farsight-commits
mailing list