scret = gst_element_set_state (p->element, GST_STATE_PAUSED);
if (scret == GST_STATE_CHANGE_FAILURE) {
g_mutex_unlock (&p->lock);
+ ml_loge ("Failed to wait until state changed PLAYING to PAUSED. For the detail, please check the GStreamer log messages.");
return ML_ERROR_STREAMS_PIPE;
}
}
scret = gst_element_set_state (p->element, GST_STATE_NULL);
if (scret != GST_STATE_CHANGE_SUCCESS) {
g_mutex_unlock (&p->lock);
+ ml_loge ("Failed to wait until state changed to NULL(STOP). For the detail, please check the GStreamer log messages.");
return ML_ERROR_STREAMS_PIPE;
}
scret = gst_element_get_state (p->element, &_state, NULL, GST_MSECOND); /* Do it within 1ms! */
g_mutex_unlock (&p->lock);
- if (scret == GST_STATE_CHANGE_FAILURE)
+ if (scret == GST_STATE_CHANGE_FAILURE) {
+ ml_loge ("Failed to get the state of the pipeline. For the detail, please check the GStreamer log messages.");
return ML_ERROR_STREAMS_PIPE;
+ }
*state = (ml_pipeline_state_e) _state;
return ML_ERROR_NONE;
}
scret = gst_element_set_state (p->element, GST_STATE_PLAYING);
- if (scret == GST_STATE_CHANGE_FAILURE)
+ if (scret == GST_STATE_CHANGE_FAILURE) {
+ ml_loge ("Failed to set the state of the pipeline to PLAYING. For the detail, please check the GStreamer log messages.");
status = ML_ERROR_STREAMS_PIPE;
+ }
done:
g_mutex_unlock (&p->lock);
scret = gst_element_set_state (p->element, GST_STATE_PAUSED);
g_mutex_unlock (&p->lock);
- if (scret == GST_STATE_CHANGE_FAILURE)
+ if (scret == GST_STATE_CHANGE_FAILURE) {
+ ml_loge ("Failed to set the state of the pipeline to PAUSED. For the detail, please check the GStreamer log messages.");
return ML_ERROR_STREAMS_PIPE;
+ }
return ML_ERROR_NONE;
}
elem->size = 0;
if (elem->src == NULL) {
+ ml_loge ("Failed to get the src pad of the element[%s]. For the detail, please check the GStreamer log messages.", elem->name);
ret = ML_ERROR_STREAMS_PIPE;
} else {
GstCaps *caps = gst_pad_get_allowed_caps (elem->src);
/** invoke the thread */
if (!single_h->klass->invoke (single_h->filter, in_tensors, out_tensors,
single_h->free_output)) {
+ ml_loge ("Failed to invoke the tensors.");
status = ML_ERROR_STREAMS_PIPE;
if (single_h->free_output)
ml_tensors_data_destroy (single_h->output);
/* 4. Start the nnfw to get inout configurations if needed */
if (!single_h->klass->start (single_h->filter)) {
+ ml_loge ("Failed to start NNFW to get inout configurations.");
status = ML_ERROR_STREAMS_PIPE;
goto error;
}