[farsight2/master] Put the ghostpad on the valve in the substream and make sure its active
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:20:17 PST 2008
---
gst/fsrtpconference/fs-rtp-substream.c | 25 ++++++++++++++++---------
1 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-substream.c b/gst/fsrtpconference/fs-rtp-substream.c
index 6ba0d24..ce17c74 100644
--- a/gst/fsrtpconference/fs-rtp-substream.c
+++ b/gst/fsrtpconference/fs-rtp-substream.c
@@ -584,7 +584,7 @@ GstPad *
fs_rtp_sub_stream_get_output_ghostpad (FsRtpSubStream *substream,
GError **error)
{
- GstPad *codecbin_srcpad;
+ GstPad *valve_srcpad;
gchar *padname = NULL;
guint session_id;
GstPad *ghostpad = NULL;
@@ -598,18 +598,16 @@ fs_rtp_sub_stream_get_output_ghostpad (FsRtpSubStream *substream,
substream->priv->ssrc,
substream->priv->pt);
- FS_RTP_SESSION_LOCK (substream->priv->session);
- codecbin_srcpad = gst_element_get_static_pad (substream->priv->codecbin,
+ valve_srcpad = gst_element_get_static_pad (substream->priv->valve,
"src");
- FS_RTP_SESSION_UNLOCK (substream->priv->session);
- g_assert (codecbin_srcpad);
+ g_assert (valve_srcpad);
- ghostpad = gst_ghost_pad_new_from_template (padname, codecbin_srcpad,
+ ghostpad = gst_ghost_pad_new_from_template (padname, valve_srcpad,
gst_element_class_get_pad_template (
- GST_ELEMENT_GET_CLASS (substream->priv->conference), "src_%d_%d_%d"));
-
+ GST_ELEMENT_GET_CLASS (substream->priv->conference),
+ "src_%d_%d_%d"));
- gst_object_unref (codecbin_srcpad);
+ gst_object_unref (valve_srcpad);
g_free (padname);
if (!ghostpad)
@@ -620,6 +618,15 @@ fs_rtp_sub_stream_get_output_ghostpad (FsRtpSubStream *substream,
return NULL;
}
+ if (!gst_pad_set_active (ghostpad, TRUE))
+ {
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
+ "Could not activate the src_%u_%u_%d", session_id,
+ substream->priv->ssrc, substream->priv->pt);
+ gst_object_unref (ghostpad);
+ return NULL;
+ }
+
if (!gst_element_add_pad (GST_ELEMENT (substream->priv->conference),
ghostpad))
{
--
1.5.6.5
More information about the farsight-commits
mailing list