qv4l2: moved frame/rate count assignment to common class
authorOve Brynestad <ovebryne@cisco.com>
Mon, 7 Jul 2014 13:55:29 +0000 (15:55 +0200)
committerHans Verkuil <hans.verkuil@cisco.com>
Fri, 11 Jul 2014 13:31:57 +0000 (15:31 +0200)
Ongoing work to move aspect/crop/scale calculations from individual render
classes to the common capture-win class. Currently different renderers use
slightly different code to calculate the various cropping/scaling/etc. data.
This makes it hard to maintain.

Signed-off-by: Ove Brynestad <ovebryne@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
utils/qv4l2/capture-win-gl.cpp
utils/qv4l2/capture-win-qt.cpp
utils/qv4l2/capture-win.cpp

index 4d9be57..49ebc9c 100644 (file)
@@ -66,7 +66,6 @@ void CaptureWinGL::setRenderFrame()
                                m_frameInfo.planeData[0],
                                m_frameInfo.planeData[1]);
 #endif
-       m_information.setText(m_frameInfo.info);
 }
 
 bool CaptureWinGL::hasNativeFormat(__u32 format)
index 858ed53..eb1a0c4 100644 (file)
@@ -67,7 +67,6 @@ void CaptureWinQt::setRenderFrame()
                CaptureWin::resizeScaleCrop();
        }
 
-       m_information.setText(m_frameInfo.info);
        paintFrame();
 }
 
index 04aa6e8..ad769bc 100644 (file)
@@ -79,6 +79,8 @@ void CaptureWin::setFrame(int width, int height, __u32 format,
         m_frameInfo.planeData[1] = data2;
         m_frameInfo.info        = info;
 
+       m_information.setText(m_frameInfo.info);
+
        setRenderFrame();
 }