FACT++  1.0
Bool_t MVideo::CaptureStart ( unsigned int  frame) const

Definition at line 736 of file MVideo.cc.

References fBuffers, first, gLog, and Ioctl().

Referenced by Camera::Thread().

737 {
738  frame %= fBuffers.size();
739 
740 // cout << "*** CaptureStart " << frame << endl;
741 
742  if (Ioctl(VIDIOC_QBUF, const_cast<v4l2_buffer*>(&fBuffers[frame].first))==-1)
743  {
744  gLog << err << "ERROR - Couldn't buffer " << frame << "." << endl;
745  return kFALSE;
746  }
747 
748 // cout << "*** " << errno << endl;
749 
750  return kTRUE;
751 
752  /*
753  struct video_mmap gb =
754  {
755  frame, // frame
756  fCaps.maxheight, fCaps.maxwidth, // height, width
757  VIDEO_PALETTE_RGB24 // palette
758  };
759 
760 #ifdef DEBUG
761  gLog << dbg << "CapturStart(" << frame << ")" << endl;
762 #endif
763 
764  //
765  // capture frame
766  //
767  if (Ioctl(VIDIOCMCAPTURE, &gb) != -1)
768  return kTRUE;
769 
770 // if (errno == EAGAIN)
771  gLog << err;
772  gLog << "ERROR - Couldn't start capturing frame " << frame << "." << endl;
773  gLog << " Maybe your card doesn't support VIDEO_PALETTE_RGB24." << endl;
774  return kFALSE;
775  */
776 }
int Ioctl(int req, void *opt, bool allowirq=true, bool force=false) const
Definition: MVideo.cc:108
int64_t first
Size of this column in the tile.
Definition: zofits.h:26
#define gLog
Definition: fits.h:36
std::vector< std::pair< v4l2_buffer, void * > > fBuffers
Definition: MVideo.h:69

+ Here is the call graph for this function:

+ Here is the caller graph for this function: