9 #ifndef __LINUX_VIDEODEV_H 12 #ifndef __LINUX_VIDEODEV2_H 13 #include <linux/videodev2.h> 19 struct v4l2_queryctrl;
44 const char *
GetTitle()
const {
return Form(
"Range=[%d;%d] Step=%d Def=%d", fMinimum, fMaximum, fStep, fDefault); }
69 std::vector<std::pair<v4l2_buffer, void*> >
fBuffers;
74 int Ioctl(
int req,
void *opt,
bool allowirq=
true,
bool force=
false)
const;
78 Bool_t EnumerateControls(UInt_t
id);
79 Bool_t EnumerateControls();
80 Bool_t GetCapabilities();
81 Bool_t GetProperties();
82 Bool_t GetTunerAbilities();
83 Bool_t GetVideoStandard();
84 Bool_t Init(Int_t channel);
87 Bool_t Enumerate(std::vector<S> &s,
int request);
89 void PrintInputs()
const;
90 void PrintStandards()
const;
93 TString GetDevType(
int type)
const;
94 TString GetChannelFlags(Int_t
flags)
const;
95 TString GetChannelType(Int_t
type)
const;
96 TString GetTunerFlags(Int_t
type)
const;
97 TString GetTunerMode(Int_t
type)
const;
98 TString GetPalette(Int_t pal)
const;
101 MVideo(
const char *path=
"/dev/video0");
105 Bool_t
IsOpen()
const {
return fFileDesc>0 && fBuffers.size()>0; }
106 Bool_t CanCapture()
const;
107 Bool_t HasTuner()
const;
108 Int_t GetNumBuffers()
const;
110 Int_t GetWidth()
const;
111 Int_t GetHeight()
const;
114 Bool_t Open(Int_t channel=0);
117 Int_t SetChannel(Int_t chan);
119 Bool_t WriteControl(
MVideoCtrl &vctrl, Int_t val)
const;
120 Bool_t SetControls(TEnv &env)
const;
122 Bool_t ResetControls()
const;
125 Bool_t CaptureStart(
unsigned int frame)
const;
126 Int_t CaptureWait(
unsigned int frame,
unsigned char **ptr=0)
const;
std::vector< v4l2_standard > fStandards
const char * GetTitle() const
const char * GetName() const
std::vector< std::pair< v4l2_buffer, void * > > fBuffers
unsigned char * fMapBuffer
MVideoCtrl(const v4l2_queryctrl &ctrl)
std::vector< v4l2_input > fInputs