From patchwork Sat Aug 20 16:52:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 9291777 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EFCE2600CB for ; Sat, 20 Aug 2016 16:52:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCD4528C46 for ; Sat, 20 Aug 2016 16:52:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABE6D28C48; Sat, 20 Aug 2016 16:52:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA7CF28C46 for ; Sat, 20 Aug 2016 16:52:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752900AbcHTQwk (ORCPT ); Sat, 20 Aug 2016 12:52:40 -0400 Received: from mail-qk0-f178.google.com ([209.85.220.178]:34962 "EHLO mail-qk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752796AbcHTQwj (ORCPT ); Sat, 20 Aug 2016 12:52:39 -0400 Received: by mail-qk0-f178.google.com with SMTP id v123so63287366qkh.2 for ; Sat, 20 Aug 2016 09:52:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur-com-ar.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=RCe4psGT58IY7arUj4FCl/FINyiyaE/9Ry459hWdBuk=; b=qv0hO2hab4JHS4DX6x49yoZ3rqG1uUuVnCYZACvuwuCMRITlV308ITWegDECr2m/op ggcdeR/C7nibITbdMOmlUbPFM4mPoLYdBkLhsQTTjWtptNhIYOB5exTlggHC41r5AoYg AkOb2prb5JaSH9nDZWK07H1sXvW3a5pikh9UFs1VMAuq4uFWMlwDISW5S2wh+PmIa7t3 wDVv5l/snfrbIrg8S4TwmmpandX9cydHPbCrOcC661DbRFnNAKq6vR1M8Bz+tSPB2BNF Njnix1WznC+f6Z4GCiEaYStnHy5moIkEp/UX5LhUCOJJGZVkbz6E3NoibvB1Ww3ZLMK9 RIZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=RCe4psGT58IY7arUj4FCl/FINyiyaE/9Ry459hWdBuk=; b=QoQlVtaSYJCCDMovuRLdb7XMGDiRuA8l6WCX0PnNQ/xPxk0+r6w/YE02koPFCTe6Pd u3wPf8z22QLFdOu+CvksZ/1jn7+eQhTArhT4tJBuQfspz18Fsi5na74AMDW33Jmwe5b5 d7rSJy5ckP6jrYoe2y9uX179jWiD+HpJc5WuqPmPHgXOtUUu29gj2ha5ezPW3Grp2n9D i1PsrMR+fr606npuD+2+wjkr++/SXS8OD2hv7NtME0RT0j/gUojOjJoMdfdaWKTIWa+y BQTVpb1fJzA7GYO9gckORTkh1V1olif+ru7OtUYoKxIX6PyuT78apHX9C1Q0CGi8rd6j eIuw== X-Gm-Message-State: AEkoouu0SOKhxPgt/sVdUGZvV6j2WjYIlbtmAogxs6Xmzthsu9xyvPx46ylbufAvJsQJAA== X-Received: by 10.55.159.82 with SMTP id i79mr15429216qke.192.1471711958599; Sat, 20 Aug 2016 09:52:38 -0700 (PDT) Received: from localhost.localdomain ([190.2.114.44]) by smtp.gmail.com with ESMTPSA id l42sm5200054qtb.43.2016.08.20.09.52.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Aug 2016 09:52:37 -0700 (PDT) From: Ezequiel Garcia To: Cc: Hans Verkuil , Ezequiel Garcia Subject: [PATCH] RFC: Show frame size widgets (width, height, size and rate) Date: Sat, 20 Aug 2016 13:52:21 -0300 Message-Id: <20160820165221.2946-1-ezequiel@vanguardiasur.com.ar> X-Mailer: git-send-email 2.9.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While using the qv4l2 tool as a quick test for frame rate setting on tw686x, I found that it has two possible interfaces for frame size. One interface shows frame width and height, while the other shows frame size and frame rate. This patch is probably wrong, but hopefully it makes the report clear: some devices haven't a frame size discrete enumeration, but have discrete frame rate. Having a way to set the frame rate from the qv4l2 tool would be very useful. Signed-off-by: Ezequiel Garcia --- utils/qv4l2/general-tab.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/utils/qv4l2/general-tab.cpp b/utils/qv4l2/general-tab.cpp index c74847935194..0b5126f6c806 100644 --- a/utils/qv4l2/general-tab.cpp +++ b/utils/qv4l2/general-tab.cpp @@ -467,11 +467,8 @@ void GeneralTab::inputSection(v4l2_input vin) return; QWidget *wFrameWH = new QWidget(); - QWidget *wFrameSR = new QWidget(); QGridLayout *m_wh = new QGridLayout(wFrameWH); - QGridLayout *m_sr = new QGridLayout(wFrameSR); m_grids.append(m_wh); - m_grids.append(m_sr); m_wh->addWidget(new QLabel("Frame Width", parentWidget()), 0, 0, Qt::AlignLeft); m_frameWidth = new QSpinBox(parentWidget()); @@ -483,18 +480,17 @@ void GeneralTab::inputSection(v4l2_input vin) m_wh->addWidget(m_frameHeight, 0, 3, Qt::AlignLeft); connect(m_frameHeight, SIGNAL(editingFinished()), SLOT(frameHeightChanged())); - m_sr->addWidget(new QLabel("Frame Size", parentWidget()), 0, 0, Qt::AlignLeft); + m_wh->addWidget(new QLabel("Frame Size", parentWidget()), 1, 0, Qt::AlignLeft); m_frameSize = new QComboBox(parentWidget()); - m_sr->addWidget(m_frameSize, 0, 1, Qt::AlignLeft); + m_wh->addWidget(m_frameSize, 1, 1, Qt::AlignLeft); connect(m_frameSize, SIGNAL(activated(int)), SLOT(frameSizeChanged(int))); - m_sr->addWidget(new QLabel("Frame Rate", parentWidget()), 0, 2, Qt::AlignLeft); + m_wh->addWidget(new QLabel("Frame Rate", parentWidget()), 1, 2, Qt::AlignLeft); m_frameInterval = new QComboBox(parentWidget()); - m_sr->addWidget(m_frameInterval, 0, 3, Qt::AlignLeft); + m_wh->addWidget(m_frameInterval, 1, 3, Qt::AlignLeft); connect(m_frameInterval, SIGNAL(activated(int)), SLOT(frameIntervalChanged(int))); m_stackedFrameSettings->addWidget(wFrameWH); - m_stackedFrameSettings->addWidget(wFrameSR); QGridLayout::addWidget(m_stackedFrameSettings, m_row, 0, 1, m_cols, Qt::AlignVCenter); m_row++; @@ -1188,7 +1184,7 @@ void GeneralTab::updateGUIInput(__u32 input) m_stackedStandards->show(); m_stackedFrequency->hide(); } else { - m_stackedFrameSettings->setCurrentIndex(1); + m_stackedFrameSettings->setCurrentIndex(0); m_stackedFrameSettings->show(); m_stackedStandards->hide(); m_stackedFrequency->hide();