mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
decklink: Remove in-same-pipeline detection code for audio/video elements of the same device
This causes deadlocks sometimes for some reason.
This commit is contained in:
parent
9c2e09cf39
commit
f9d16c5913
2 changed files with 14 additions and 2 deletions
|
@ -265,6 +265,7 @@ gst_decklink_audio_sink_ringbuffer_delay (GstAudioRingBuffer * rb)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static gboolean
|
static gboolean
|
||||||
in_same_pipeline (GstElement * a, GstElement * b)
|
in_same_pipeline (GstElement * a, GstElement * b)
|
||||||
{
|
{
|
||||||
|
@ -286,6 +287,7 @@ in_same_pipeline (GstElement * a, GstElement * b)
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_decklink_audio_sink_ringbuffer_start (GstAudioRingBuffer * rb)
|
gst_decklink_audio_sink_ringbuffer_start (GstAudioRingBuffer * rb)
|
||||||
|
@ -306,11 +308,15 @@ gst_decklink_audio_sink_ringbuffer_start (GstAudioRingBuffer * rb)
|
||||||
GST_ELEMENT_ERROR (self->sink, STREAM, FAILED,
|
GST_ELEMENT_ERROR (self->sink, STREAM, FAILED,
|
||||||
(NULL), ("Audio sink needs a video sink for its operation"));
|
(NULL), ("Audio sink needs a video sink for its operation"));
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
} else if (!in_same_pipeline (GST_ELEMENT_CAST (self->sink), videosink)) {
|
}
|
||||||
|
// FIXME: This causes deadlocks sometimes
|
||||||
|
#if 0
|
||||||
|
else if (!in_same_pipeline (GST_ELEMENT_CAST (self->sink), videosink)) {
|
||||||
GST_ELEMENT_ERROR (self->sink, STREAM, FAILED,
|
GST_ELEMENT_ERROR (self->sink, STREAM, FAILED,
|
||||||
(NULL), ("Audio sink and video sink need to be in the same pipeline"));
|
(NULL), ("Audio sink and video sink need to be in the same pipeline"));
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (videosink)
|
if (videosink)
|
||||||
gst_object_unref (videosink);
|
gst_object_unref (videosink);
|
||||||
|
|
|
@ -575,6 +575,7 @@ gst_decklink_audio_src_close (GstDecklinkAudioSrc * self)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static gboolean
|
static gboolean
|
||||||
in_same_pipeline (GstElement * a, GstElement * b)
|
in_same_pipeline (GstElement * a, GstElement * b)
|
||||||
{
|
{
|
||||||
|
@ -596,6 +597,7 @@ in_same_pipeline (GstElement * a, GstElement * b)
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static GstStateChangeReturn
|
static GstStateChangeReturn
|
||||||
gst_decklink_audio_src_change_state (GstElement * element,
|
gst_decklink_audio_src_change_state (GstElement * element,
|
||||||
|
@ -626,7 +628,10 @@ gst_decklink_audio_src_change_state (GstElement * element,
|
||||||
(NULL), ("Audio src needs a video src for its operation"));
|
(NULL), ("Audio src needs a video src for its operation"));
|
||||||
ret = GST_STATE_CHANGE_FAILURE;
|
ret = GST_STATE_CHANGE_FAILURE;
|
||||||
goto out;
|
goto out;
|
||||||
} else if (!in_same_pipeline (GST_ELEMENT_CAST (self), videosrc)) {
|
}
|
||||||
|
// FIXME: This causes deadlocks sometimes
|
||||||
|
#if 0
|
||||||
|
else if (!in_same_pipeline (GST_ELEMENT_CAST (self), videosrc)) {
|
||||||
GST_ELEMENT_ERROR (self, STREAM, FAILED,
|
GST_ELEMENT_ERROR (self, STREAM, FAILED,
|
||||||
(NULL),
|
(NULL),
|
||||||
("Audio src and video src need to be in the same pipeline"));
|
("Audio src and video src need to be in the same pipeline"));
|
||||||
|
@ -634,6 +639,7 @@ gst_decklink_audio_src_change_state (GstElement * element,
|
||||||
gst_object_unref (videosrc);
|
gst_object_unref (videosrc);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (videosrc)
|
if (videosrc)
|
||||||
gst_object_unref (videosrc);
|
gst_object_unref (videosrc);
|
||||||
|
|
Loading…
Reference in a new issue