aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-07-23 13:35:15 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2014-07-23 13:35:15 +0200
commit340a7da4a051573d4b67116b465f89d01a7806e7 (patch)
treec5a16238350d25861a9a53964c088d8e51ba3344
parent0b7a5f8b8f6bb2e2ef8c09a6253e9312a5814b58 (diff)
qv4l2: fix querystd and query_dv_timings
Error messages in case of a missing signal were not displayed, and the querystd return code check was inverted. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--utils/qv4l2/general-tab.cpp19
-rw-r--r--utils/qv4l2/general-tab.h4
2 files changed, 21 insertions, 2 deletions
diff --git a/utils/qv4l2/general-tab.cpp b/utils/qv4l2/general-tab.cpp
index 49895cf7..74534d06 100644
--- a/utils/qv4l2/general-tab.cpp
+++ b/utils/qv4l2/general-tab.cpp
@@ -1750,7 +1750,7 @@ void GeneralTab::qryStdClicked()
{
v4l2_std_id std;
- if (!query_std(std))
+ if (query_std(std))
return;
if (std == V4L2_STD_UNKNOWN) {
@@ -1813,10 +1813,25 @@ void GeneralTab::updateTimings()
void GeneralTab::qryTimingsClicked()
{
v4l2_dv_timings timings;
+ int err = query_dv_timings(timings);
- if (!query_dv_timings(timings)) {
+ switch (err) {
+ case ENOLINK:
+ info("No signal found\n");
+ break;
+ case ENOLCK:
+ info("Could not lock to signal\n");
+ break;
+ case ERANGE:
+ info("Frequency out of range\n");
+ break;
+ case 0:
s_dv_timings(timings);
updateTimings();
+ break;
+ default:
+ error(err);
+ break;
}
}
diff --git a/utils/qv4l2/general-tab.h b/utils/qv4l2/general-tab.h
index b1b2e5b8..ac9868ed 100644
--- a/utils/qv4l2/general-tab.h
+++ b/utils/qv4l2/general-tab.h
@@ -182,6 +182,10 @@ private:
{
g_mw->error(error);
}
+ virtual void error(int error)
+ {
+ g_mw->error(error);
+ }
v4l_fd *g_v4l_fd() { return m_fd->g_v4l_fd(); }
__u32 g_type() const { return m_fd->g_type(); }

Privacy Policy