niimaq: return with flow error if acquisition fails to start
This commit is contained in:
parent
90d33fca27
commit
c3f2b1db5d
@ -699,10 +699,6 @@ gst_niimaqsrc_start_acquisition (GstNiImaqSrc * niimaqsrc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* we tried five times and failed, so we error */
|
/* we tried five times and failed, so we error */
|
||||||
GST_ELEMENT_ERROR (niimaqsrc, RESOURCE, FAILED,
|
|
||||||
("Camera doesn't seem to want to turn on!"),
|
|
||||||
("Camera doesn't seem to want to turn on!"));
|
|
||||||
|
|
||||||
gst_niimaqsrc_close_interface (niimaqsrc);
|
gst_niimaqsrc_close_interface (niimaqsrc);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -749,7 +745,11 @@ gst_niimaqsrc_create (GstPushSrc * psrc, GstBuffer ** buffer)
|
|||||||
|
|
||||||
/* start the IMAQ acquisition session if we haven't done so yet */
|
/* start the IMAQ acquisition session if we haven't done so yet */
|
||||||
if (!niimaqsrc->session_started) {
|
if (!niimaqsrc->session_started) {
|
||||||
gst_niimaqsrc_start_acquisition (niimaqsrc);
|
if (!gst_niimaqsrc_start_acquisition (niimaqsrc)) {
|
||||||
|
GST_ELEMENT_ERROR (niimaqsrc, RESOURCE, FAILED,
|
||||||
|
("Unable to start acquisition."), (NULL));
|
||||||
|
return GST_FLOW_ERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (no_copy) {
|
if (no_copy) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user