summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatricia Muscalu <patricia@axis.com>2017-11-23 18:39:44 +0100
committerEdward Hervey <bilboed@bilboed.com>2017-11-24 10:52:36 +0100
commit132e00adfd0333be082594bf7e64d3b96d95d263 (patch)
treeeff10d7c59ef3ab0fd1d809ec0e3f672f2cec22d
parentac6169d50a6e1bf03323b7bada4bd43f4126b012 (diff)
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
-rw-r--r--gst/rtsp-server/rtsp-media.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/gst/rtsp-server/rtsp-media.c b/gst/rtsp-server/rtsp-media.c
index d4e4282..6d2d113 100644
--- a/gst/rtsp-server/rtsp-media.c
+++ b/gst/rtsp-server/rtsp-media.c
@@ -116,7 +116,6 @@ struct _GstRTSPMediaPrivate
/* the pipeline for the media */
GstElement *pipeline;
- GstElement *fakesink; /* protected by lock */
GSource *source;
guint id;
GstRTSPThread *thread;
@@ -2720,37 +2719,14 @@ pad_removed_cb (GstElement * element, GstPad * pad, GstRTSPMedia * media)
}
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;