I have the following pipeline in C to play video files: filesrc ! decodebin ! videoconvert ! glimagesink
, after getting EOS signal, I try to modify the pipeline to show images (gapless):
gst_element_set_state(player->src, GST_STATE_READY); // filesrc
gst_element_set_state(player->vid_bin, GST_STATE_NULL); // decodebin
gst_element_unlink(player->src, player->vid_bin);
gst_bin_remove(GST_BIN (player->pipe), player->vid_bin);
gst_bin_add(GST_BIN (player->pipe), player->img_bin); // bin: jpegdec ! imagefreeze
gst_element_link_many(player->src, player->img_bin, player->video_out, NULL);
g_object_set(G_OBJECT (player->src), "location", next.path.c_str(), NULL);
gst_element_set_state(player->img_bin, GST_STATE_PLAYING);
gst_element_set_state(player->src, GST_STATE_PLAYING);
gst_element_set_state(player->video_out, GST_STATE_PLAYING); // bin: videoconvert ! glimagesink
GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (player->pipe), GST_DEBUG_GRAPH_SHOW_ALL, "gst-play.eos.final");
But there is no output in the window. the graph of the pipeline shows that the glimagesink is in the paused state. Could it be the reason for missing output and how to fix it? Setting the pipeline to ready state at the beginning and to play state at the end works, but leads to a gap that I would like to avoid.