Restart Pipeline
killerrats
koreysjunkmail at gmail.com
Thu Dec 21 17:28:20 UTC 2017
I found out that if I grabbed out the element from the pipeline and assigned
it like i just created it in the beginning it will reset the depays (example
below). the only problem is that it gets to a point where it says internal
stream error after awhile. I don't understand that.
if i don't do this it will come up with the cannot link the audio and video
pads to each of the depays. the first marks are from the "pad-removed"
signal which show the pads are unlinked from the previous play. marks below
are the new ones coming in after a restart.
<http://gstreamer-devel.966125.n4.nabble.com/file/t377034/rtspsrc_link_error.jpg>
GstElement* pipe,* source,* depay;
void unlink();
int main()
{
GMainLoop* loop;
pipe = gst_pipeline_new("pipeline");
source = gst_element_factory_make("rtspsrc", "source");
depay = = gst_element_factory_make("rtph264depay", "depay");
gst_element_set_state(pipe, GST_STATE_PLAYING);
do
{
g_main_loop_run(loop);
unlink();
}
}
void unlink()
{
depay = gst_bin_get_by_name(GST_BIN(pipe), "depay");
gst_element_set_state(pipe, GST_STATE_NULL);
gst_bin_remove(GST_BIN(pipe),depay);
gst_bin_add(GST_BIN(pipe),depay);
}
-----
------------------------------
Gstreamer 1.12.4
------------------------------
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list