mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 05:45:58 +00:00
rtsp-media: Removed fakesink elements
There is not need of adding fakesink elements to the media pipeline in the dynamic-payloader case. The media pipeline itself is dynamically updated with the receiver and sender parts that are based on the client transport information known after SETUP has been received. Change-Id: I4e88c9b500c04030669822f0d03b1842913f6cb9 https://bugzilla.gnome.org/show_bug.cgi?id=790674
This commit is contained in:
parent
ac6169d50a
commit
132e00adfd
1 changed files with 0 additions and 33 deletions
|
@ -116,7 +116,6 @@ struct _GstRTSPMediaPrivate
|
|||
|
||||
/* the pipeline for the media */
|
||||
GstElement *pipeline;
|
||||
GstElement *fakesink; /* protected by lock */
|
||||
GSource *source;
|
||||
guint id;
|
||||
GstRTSPThread *thread;
|
||||
|
@ -2719,38 +2718,15 @@ pad_removed_cb (GstElement * element, GstPad * pad, GstRTSPMedia * media)
|
|||
gst_rtsp_media_remove_stream (media, stream);
|
||||
}
|
||||
|
||||
static void
|
||||
remove_fakesink (GstRTSPMediaPrivate * priv)
|
||||
{
|
||||
GstElement *fakesink;
|
||||
|
||||
g_mutex_lock (&priv->lock);
|
||||
if ((fakesink = priv->fakesink))
|
||||
gst_object_ref (fakesink);
|
||||
priv->fakesink = NULL;
|
||||
g_mutex_unlock (&priv->lock);
|
||||
|
||||
if (fakesink) {
|
||||
gst_bin_remove (GST_BIN (priv->pipeline), fakesink);
|
||||
gst_element_set_state (fakesink, GST_STATE_NULL);
|
||||
gst_object_unref (fakesink);
|
||||
GST_INFO ("removed fakesink");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
no_more_pads_cb (GstElement * element, GstRTSPMedia * media)
|
||||
{
|
||||
GstRTSPMediaPrivate *priv = media->priv;
|
||||
gboolean remaining_dynamic;
|
||||
|
||||
GST_INFO_OBJECT (element, "no more pads");
|
||||
g_mutex_lock (&priv->lock);
|
||||
priv->no_more_pads_pending--;
|
||||
remaining_dynamic = priv->no_more_pads_pending;
|
||||
g_mutex_unlock (&priv->lock);
|
||||
if (remaining_dynamic == 0)
|
||||
remove_fakesink (priv);
|
||||
}
|
||||
|
||||
typedef struct _DynPaySignalHandlers DynPaySignalHandlers;
|
||||
|
@ -2893,13 +2869,6 @@ start_prepare (GstRTSPMedia * media)
|
|||
(GCallback) no_more_pads_cb, media);
|
||||
|
||||
g_object_set_data (G_OBJECT (elem), "gst-rtsp-dynpay-handlers", handlers);
|
||||
|
||||
if (!priv->fakesink) {
|
||||
/* we add a fakesink here in order to make the state change async. We remove
|
||||
* the fakesink again in the no-more-pads callback. */
|
||||
priv->fakesink = gst_element_factory_make ("fakesink", "fakesink");
|
||||
gst_bin_add (GST_BIN (priv->pipeline), priv->fakesink);
|
||||
}
|
||||
}
|
||||
|
||||
if (!start_preroll (media))
|
||||
|
@ -3154,8 +3123,6 @@ finish_unprepare (GstRTSPMedia * media)
|
|||
if (priv->status != GST_RTSP_MEDIA_STATUS_UNPREPARING)
|
||||
return;
|
||||
|
||||
remove_fakesink (priv);
|
||||
|
||||
for (i = 0; i < priv->streams->len; i++) {
|
||||
GstRTSPStream *stream;
|
||||
|
||||
|
|
Loading…
Reference in a new issue