diff options
author | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2017-04-12 11:07:44 -0300 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2017-04-12 11:28:50 -0300 |
commit | 26b388c349fe5ba59820a4a25d09a7532a8f3b47 (patch) | |
tree | f8d8795f988153cbc603305fb056083bfdf5738b | |
parent | 91d2d2dc2befabc8d40580094241cfc9fb7ea284 (diff) |
validate: Do not expect track switch to be synchronous for playbin3
And let following actions to be executed (setting the action as
INTERLACED) which will make sure the track switch happened at some
point. It means the user has to set the pipeline to PLAYING so we can
make it works but we do not have choice here I think
https://bugzilla.gnome.org/show_bug.cgi?id=781213
-rw-r--r-- | validate/gst/validate/gst-validate-scenario.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/validate/gst/validate/gst-validate-scenario.c b/validate/gst/validate/gst-validate-scenario.c index 1d8faf9..3272e72 100644 --- a/validate/gst/validate/gst-validate-scenario.c +++ b/validate/gst/validate/gst-validate-scenario.c @@ -1184,6 +1184,7 @@ static gboolean execute_switch_track_pb3 (GstValidateScenario * scenario, GstValidateAction * action) { + GstValidateExecuteActionReturn res = GST_VALIDATE_EXECUTE_ACTION_ERROR; GstValidateScenarioPrivate *priv = scenario->priv; gint index; GstStreamType stype; @@ -1195,12 +1196,12 @@ execute_switch_track_pb3 (GstValidateScenario * scenario, if (!monitor->stream_collection) { GST_ERROR ("No stream collection message received on the bus"); - return GST_VALIDATE_EXECUTE_ACTION_ERROR; + return res; } if (!monitor->streams_selected) { GST_ERROR ("No streams selected message received on the bus"); - return GST_VALIDATE_EXECUTE_ACTION_ERROR; + return res; } type = gst_structure_get_string (action->structure, "type"); @@ -1230,15 +1231,22 @@ execute_switch_track_pb3 (GstValidateScenario * scenario, ACTION_EXPECTED_STREAM_QUARK, g_list_copy (new_streams), (GDestroyNotify) g_list_free); - priv->pending_switch_track = action; - if (!gst_element_send_event (scenario->pipeline, gst_event_new_select_streams (new_streams))) { GST_ERROR ("select-streams event not handled"); - return GST_VALIDATE_EXECUTE_ACTION_ERROR; + return res; } - return GST_VALIDATE_EXECUTE_ACTION_ASYNC; + priv->pending_switch_track = action; + if (scenario->priv->target_state > GST_STATE_PAUSED) { + res = GST_VALIDATE_EXECUTE_ACTION_ASYNC; + } else { + gst_mini_object_ref ((GstMiniObject *) action); + res = GST_VALIDATE_EXECUTE_ACTION_INTERLACED; + } + + + return res; } static gboolean |