Пример #1
0
/**
* gst_niimaqsrc_stop:
* src: #GstBaseSrc instance
*
* Close resources opened by gst_niimaqsrc_start
*
* Returns: TRUE on success
*/
static gboolean
gst_niimaqsrc_stop (GstBaseSrc * bsrc)
{
  GstNiImaqSrc *src = GST_NIIMAQSRC (bsrc);
  Int32 rval;
  gboolean result = TRUE;

  /* stop IMAQ session */
  if (src->session_started) {
    rval = imgSessionStopAcquisition (src->sid);
    if (rval != IMG_ERR_GOOD) {
      gst_niimaqsrc_report_imaq_error (rval);
      GST_ELEMENT_ERROR (src, RESOURCE, FAILED,
          ("Unable to stop acquisition"), ("Unable to stop acquisition"));
      result = FALSE;
    }
    src->session_started = FALSE;
    GST_DEBUG_OBJECT (src, "Acquisition stopped");
  }

  result &= gst_niimaqsrc_close_interface (src);

  gst_niimaqsrc_reset (src);

  return result;
}
Пример #2
0
void FastCMOS::stop()
{
	checkIMAQ(imgSessionStopAcquisition(session));
}