1
/* qv4l2: a control panel controlling v4l2 devices.
3
* Copyright (C) 2006 Hans Verkuil <hverkuil@xs4all.nl>
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26
#include <linux/videodev2.h>
33
class GeneralTab: public QGridLayout, public v4l2
38
GeneralTab(const QString &device, v4l2 &fd, int n, QWidget *parent = 0);
39
virtual ~GeneralTab() {}
41
CapMethod capMethod();
42
int width() const { return m_width; }
43
int height() const { return m_height; }
46
void inputChanged(int);
47
void outputChanged(int);
48
void inputAudioChanged(int);
49
void outputAudioChanged(int);
50
void standardChanged(int);
51
void freqTableChanged(int);
52
void freqChannelChanged(int);
53
void freqChanged(int);
54
void vidCapFormatChanged(int);
55
void frameWidthChanged();
56
void frameHeightChanged();
57
void frameSizeChanged(int);
58
void frameIntervalChanged(int);
59
void vidOutFormatChanged(int);
62
void updateVideoInput();
63
void updateVideoOutput();
64
void updateAudioInput();
65
void updateAudioOutput();
66
void updateStandard();
68
void updateFreqChannel();
69
void updateVidCapFormat();
70
void updateFrameSize(unsigned w, unsigned h);
71
void updateFrameInterval(unsigned w, unsigned h);
72
void updateVidOutFormat();
74
void addWidget(QWidget *w, Qt::Alignment align = Qt::AlignLeft);
75
void addLabel(const QString &text, Qt::Alignment align = Qt::AlignRight)
77
addWidget(new QLabel(text, parentWidget()), align);
79
void info(const QString &info)
83
virtual void error(const QString &error)
91
struct v4l2_tuner m_tuner;
92
struct v4l2_capability m_querycap;
94
__u32 m_width, m_height;
97
QComboBox *m_videoInput;
98
QComboBox *m_videoOutput;
99
QComboBox *m_audioInput;
100
QComboBox *m_audioOutput;
101
QComboBox *m_tvStandard;
103
QComboBox *m_freqTable;
104
QComboBox *m_freqChannel;
105
QComboBox *m_vidCapFormats;
106
QComboBox *m_frameSize;
107
QSpinBox *m_frameWidth;
108
QSpinBox *m_frameHeight;
109
QComboBox *m_frameInterval;
110
QComboBox *m_vidOutFormats;
111
QComboBox *m_capMethods;
112
QGridLayout *m_layout;