summaryrefslogtreecommitdiff
path: root/v4l2-apps/util/qv4l2/general-tab.cpp
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-01-02 13:28:52 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-02 13:28:52 -0200
commit55da391ab67c98f9a35581a880ceadf1574b10da (patch)
treebb62cd29ff775ca6d3d1332fcd7fd32b61717a37 /v4l2-apps/util/qv4l2/general-tab.cpp
parent20873ae35cca55b14a5932093524e38945be87b9 (diff)
downloadmediapointer-dvb-s2-55da391ab67c98f9a35581a880ceadf1574b10da.tar.gz
mediapointer-dvb-s2-55da391ab67c98f9a35581a880ceadf1574b10da.tar.bz2
Show board id at general tab on qv4l2
From: Mauro Carvalho Chehab <mchehab@infradead.org> When you have several boards inside a machine, you need to know what board qv4l2 is using. This patch presents driver, board name and bus id, to help identifying the board. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l2-apps/util/qv4l2/general-tab.cpp')
-rw-r--r--v4l2-apps/util/qv4l2/general-tab.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/v4l2-apps/util/qv4l2/general-tab.cpp b/v4l2-apps/util/qv4l2/general-tab.cpp
index 93ab329ba..e00a968f7 100644
--- a/v4l2-apps/util/qv4l2/general-tab.cpp
+++ b/v4l2-apps/util/qv4l2/general-tab.cpp
@@ -39,6 +39,28 @@ GeneralTab::GeneralTab(int _fd, int n, QWidget *parent) :
setSpacing(3);
+ memset(&querycap, 0, sizeof(querycap));
+ if (ioctl(fd, VIDIOC_QUERYCAP, &querycap) >=0) {
+ QLabel *l1 = new QLabel("Driver:", this);
+ l1->setAlignment(Qt::AlignRight);
+
+ QLabel *l1t = new QLabel((char *)querycap.driver, this);
+
+ QLabel *l2 = new QLabel("Card: ", this);
+ l2->setAlignment(Qt::AlignRight);
+
+ QLabel *l2t = new QLabel((char *)querycap.card, this);
+
+ QLabel *l3 = new QLabel("Bus: ", this);
+ l3->setAlignment(Qt::AlignRight);
+
+ QLabel *l3t = new QLabel((char *)querycap.bus_info, this);
+
+ QLabel *l4 = new QLabel("", this);
+ QLabel *l4t = new QLabel("", this);
+
+ }
+
memset(&tuner, 0, sizeof(tuner));
ioctl(fd, VIDIOC_G_TUNER, &tuner);
if (tuner.rangehigh>INT_MAX)