11 #include <QStringList> 20 explicit V4L2util(
const QString& dev_name);
21 V4L2util(
const QString& dev_name,
const QString& vbi_dev_name);
24 bool Open(
const QString& device_name,
const QString& vbi_device_name =
"");
26 int FD(
void)
const {
return m_fd; }
29 bool IsOpen(
void)
const {
return m_fd >= 0; }
33 bool GetFormats(QStringList&
formats);
34 bool GetVideoStandard(QString&
name)
const;
35 int GetSignalStrength(
void)
const;
36 bool GetResolution(
int& width,
int& height)
const;
38 bool HasTuner(
void)
const;
39 bool HasAudioSupport(
void)
const;
40 bool HasStreaming(
void)
const;
41 bool HasSlicedVBI(
void)
const;
42 bool IsEncoder(
void)
const;
43 bool UserAdjustableResolution(
void)
const;
46 QString
CardName(
void)
const {
return m_card_name; }
47 QString
ProfileName(
void)
const {
return "V4L2:" + m_driver_name; }
49 int GetStreamType(
void)
const;
50 bool SetStreamType(
int value);
52 bool SetVideoAspect(
int value);
53 bool SetVideoBitrateMode(
int value);
54 bool SetVideoBitrate(
int value);
55 bool SetVideoBitratePeak(
int value);
56 bool SetResolution(uint32_t width, uint32_t height);
58 bool SetAudioInput(
int value);
59 bool SetAudioCodec(
int value);
60 bool SetVolume(
int volume);
61 bool SetLanguageMode(
int mode);
62 bool SetAudioSamplingRate(
int value);
63 bool SetAudioBitrateL2(
int value);
66 bool StartEncoding(
void);
67 bool StopEncoding(
void);
68 bool PauseEncoding(
void);
69 bool ResumeEncoding(
void);
71 static QString StreamTypeDesc(
int value);
75 bool OpenVBI(
const QString& vbi_dev_name);
78 int GetExtControl(
int request,
const QString& ctrl_desc =
"")
const;
79 bool SetExtControl(
int request,
int value,
const QString& ctrl_desc,
80 const QString& value_desc);
81 bool SetEncoderState(
int mode,
const QString& desc);
84 static void bitmask_toString(QString& result, uint32_t flags,
85 uint32_t mask,
const QString& desc);
86 static QString ctrlflags_toString(uint32_t flags);
87 static QString queryctrl_toString(
int type);
89 void log_qctrl(
struct v4l2_queryctrl& queryctrl,
DriverOption& drv_opt,
91 bool log_control(
struct v4l2_queryctrl& qctrl,
DriverOption& drv_opt,
93 void log_controls(
bool show_menus);
QMap< category_t, DriverOption > Options
DriverOption::Options m_options
QString ProfileName(void) const
bool operator!(void) const
bool m_have_query_ext_ctrl
QString DriverName(void) const
QString CardName(void) const