[farsight2/master] Hide the pad blocking when there is no codec bin inside the substream
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:20:17 PST 2008
---
gst/fsrtpconference/fs-rtp-session.c | 2 --
gst/fsrtpconference/fs-rtp-substream.c | 22 +++-------------------
gst/fsrtpconference/fs-rtp-substream.h | 6 ------
3 files changed, 3 insertions(+), 27 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index 6f221f7..effda74 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -1493,8 +1493,6 @@ fs_rtp_session_new_recv_pad (FsRtpSession *session, GstPad *new_pad,
fs_session_emit_error (FS_SESSION (session), FS_ERROR_CONSTRUCTION,
"Could not add the codec bin to the new substream",
"No error details returned");
-
- fs_rtp_sub_stream_block (substream, NULL, NULL);
}
g_clear_error (&error);
diff --git a/gst/fsrtpconference/fs-rtp-substream.c b/gst/fsrtpconference/fs-rtp-substream.c
index ce17c74..b02485c 100644
--- a/gst/fsrtpconference/fs-rtp-substream.c
+++ b/gst/fsrtpconference/fs-rtp-substream.c
@@ -388,25 +388,6 @@ _blocked_cb (GstPad *pad, gboolean blocked, gpointer user_data)
}
/**
- * fs_rtp_sub_stream_block:
- *
- * Blocks the src pad of this new substream until
- *
- * MT safe.
- */
-
-void
-fs_rtp_sub_stream_block (FsRtpSubStream *substream,
- GstPadBlockCallback callback, gpointer user_data)
-{
- if (!callback)
- callback = _blocked_cb;
-
- gst_pad_set_blocked_async (substream->priv->rtpbin_pad, TRUE, callback,
- user_data);
-}
-
-/**
* fs_rtp_session_add_codecbin_locked:
* @substream: a #FsRtpSubStream
*
@@ -497,6 +478,9 @@ fs_rtp_sub_stream_add_codecbin_locked (FsRtpSubStream *substream,
fs_codec_destroy (substream->priv->codec);
substream->priv->codec = NULL;
+ gst_pad_set_blocked_async (substream->priv->rtpbin_pad, TRUE, _blocked_cb,
+ NULL);
+
return FALSE;
}
diff --git a/gst/fsrtpconference/fs-rtp-substream.h b/gst/fsrtpconference/fs-rtp-substream.h
index 9bf971e..07fc23d 100644
--- a/gst/fsrtpconference/fs-rtp-substream.h
+++ b/gst/fsrtpconference/fs-rtp-substream.h
@@ -84,15 +84,9 @@ gboolean fs_rtp_sub_stream_add_codecbin (FsRtpSubStream *substream,
void fs_rtp_sub_stream_stop (FsRtpSubStream *substream);
-void fs_rtp_sub_stream_block (FsRtpSubStream *substream,
- GstPadBlockCallback callback,
- gpointer user_data);
-
-
GstPad *fs_rtp_sub_stream_get_output_ghostpad (FsRtpSubStream *substream,
GError **error);
-
void fs_rtp_sub_stream_invalidate_codec_locked (FsRtpSubStream *substream,
gint pt,
const FsCodec *codec);
--
1.5.6.5
More information about the farsight-commits
mailing list