mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-04 13:32:29 +00:00
Make vis_video_thread play when connected afterwards
Original commit message from CVS: Make vis_video_thread play when connected afterwards This generates some segfaults in gst_thread but we need to fix that
This commit is contained in:
parent
077be4ccbd
commit
d06b679133
1 changed files with 8 additions and 0 deletions
|
@ -1176,6 +1176,7 @@ gst_play_connect_visualisation ( GstPlay *play,
|
||||||
gboolean connect)
|
gboolean connect)
|
||||||
{
|
{
|
||||||
GstPad *tee_vis_pad, *vis_video_thread_pad;
|
GstPad *tee_vis_pad, *vis_video_thread_pad;
|
||||||
|
GstElement *vis_video_thread;
|
||||||
gboolean connected = FALSE;
|
gboolean connected = FALSE;
|
||||||
|
|
||||||
g_return_val_if_fail (play != NULL, FALSE);
|
g_return_val_if_fail (play != NULL, FALSE);
|
||||||
|
@ -1185,6 +1186,8 @@ gst_play_connect_visualisation ( GstPlay *play,
|
||||||
"tee_vis_pad");
|
"tee_vis_pad");
|
||||||
vis_video_thread_pad = g_hash_table_lookup( play->other_elements,
|
vis_video_thread_pad = g_hash_table_lookup( play->other_elements,
|
||||||
"vis_video_thread_pad");
|
"vis_video_thread_pad");
|
||||||
|
vis_video_thread = g_hash_table_lookup( play->other_elements,
|
||||||
|
"vis_video_thread");
|
||||||
|
|
||||||
if (gst_pad_get_peer (vis_video_thread_pad) != NULL)
|
if (gst_pad_get_peer (vis_video_thread_pad) != NULL)
|
||||||
connected = TRUE;
|
connected = TRUE;
|
||||||
|
@ -1198,6 +1201,11 @@ gst_play_connect_visualisation ( GstPlay *play,
|
||||||
gst_pad_unlink (tee_vis_pad, vis_video_thread_pad);
|
gst_pad_unlink (tee_vis_pad, vis_video_thread_pad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( GST_IS_ELEMENT(vis_video_thread) && GST_IS_ELEMENT(play->pipeline) ) {
|
||||||
|
gst_element_set_state ( vis_video_thread,
|
||||||
|
gst_element_get_state (play->pipeline));
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue