Commit d6a7b6f7 authored by Lori Anderson's avatar Lori Anderson

Issue seek (not just query duration) on the source if requested via...

Issue seek (not just query duration) on the source if requested via seek_source cmd line using seek_secs or seek_percent.
parent 0cbf3295
......@@ -1708,13 +1708,37 @@ static gboolean perform_test_seek(CustomData* data, gint64 start_position, GstFo
}
// Initiate seek
if (!gst_element_seek (data->pipeline, rate,
format, GST_SEEK_FLAG_FLUSH,
GST_SEEK_TYPE_SET, start_position,
GST_SEEK_TYPE_NONE, stop_position))
if (g_seek_source)
{
g_printerr("%s - Problems seeking.\n", __FUNCTION__);
return FALSE;
if (g_source)
{
g_print("%s - Sending seek to source\n", __FUNCTION__);
if (!gst_element_seek (g_source, rate,
format, GST_SEEK_FLAG_FLUSH,
GST_SEEK_TYPE_SET, start_position,
GST_SEEK_TYPE_NONE, stop_position))
{
g_printerr("%s - Problems seeking.\n", __FUNCTION__);
return FALSE;
}
}
else
{
g_printerr("%s - Unable to seek on NULL source\n", __FUNCTION__);
return FALSE;
}
}
else
{
g_print("%s - Sending seek to pipeline\n", __FUNCTION__);
if (!gst_element_seek (data->pipeline, rate,
format, GST_SEEK_FLAG_FLUSH,
GST_SEEK_TYPE_SET, start_position,
GST_SEEK_TYPE_NONE, stop_position))
{
g_printerr("%s - Problems seeking.\n", __FUNCTION__);
return FALSE;
}
}
g_print("%s - Seeking on pipeline element complete\n", __FUNCTION__);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment