platform/upstream/v4l-utils.git
11 years agolibv4lconvert: Reject too short source buffer before accessing it
Gregor Jasny [Thu, 15 Aug 2013 20:40:39 +0000 (22:40 +0200)]
libv4lconvert: Reject too short source buffer before accessing it

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agolibv4lconvert: Support for RGB32 and BGR32 format
Ricardo Ribalda Delgado [Fri, 2 Aug 2013 22:42:52 +0000 (00:42 +0200)]
libv4lconvert: Support for RGB32 and BGR32 format

This patch adds support for V4L2_PIX_FMT_RGB32 and V4L2_PIX_FMT_BGR32
formats.

Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agolibv4lconvert: Support for Y16 pixel format
Ricardo Ribalda Delgado [Fri, 2 Aug 2013 22:42:51 +0000 (00:42 +0200)]
libv4lconvert: Support for Y16 pixel format

This patch adds support for V4L2_PIX_FMT_Y16 format.

Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agov4l2-ctl: fix '--set-dv-bt-timings query' option.
Hans Verkuil [Thu, 15 Aug 2013 12:50:38 +0000 (14:50 +0200)]
v4l2-ctl: fix '--set-dv-bt-timings query' option.

An earlier bug fix in parse_subopt broke the '--set-dv-bt-timings query' parsing.
The way it was parsed was also buggy, but the parse_subopt bug hid that.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agords-ctl: fix segfault in list_devices()
Hans Verkuil [Thu, 15 Aug 2013 08:29:22 +0000 (10:29 +0200)]
rds-ctl: fix segfault in list_devices()

You can't use files.erase() in list_devices, since if the last element
is removed, then the for-loop will still do a ++iter, which will cause
a segfault the next time iter is derefenced.

This situation happens if there are radio *transmitter* devices, which
do not support G_TUNER.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: call setFrame before resize to get correct frame size calculation
Hans Verkuil [Mon, 12 Aug 2013 08:36:22 +0000 (10:36 +0200)]
qv4l2: call setFrame before resize to get correct frame size calculation

Going from PAL to NTSC and back to PAL would cause an incorrect size
calculation since resize was called without the capture window being
informed about the new frame size.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: fix GeneralTab layout
Bård Eirik Winther [Fri, 9 Aug 2013 12:03:22 +0000 (12:03 +0000)]
qv4l2: fix GeneralTab layout

This moves the layout items for cropping, scaling and ALSA
to not interfere with driver specific controls.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: updated about window
Bård Eirik Winther [Fri, 9 Aug 2013 11:12:12 +0000 (11:12 +0000)]
qv4l2: updated about window

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: add manpage
Bård Eirik Winther [Fri, 9 Aug 2013 11:12:11 +0000 (11:12 +0000)]
qv4l2: add manpage

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: fix program input parameters
Bård Eirik Winther [Fri, 9 Aug 2013 11:12:10 +0000 (11:12 +0000)]
qv4l2: fix program input parameters

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: fix missing status tips
Bård Eirik Winther [Fri, 9 Aug 2013 11:12:09 +0000 (11:12 +0000)]
qv4l2: fix missing status tips

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: add cropping to CaptureWin and Qt render
Hans Verkuil [Mon, 12 Aug 2013 08:16:31 +0000 (10:16 +0200)]
qv4l2: add cropping to CaptureWin and Qt render

Allows for removal of letterboxes from common video formats.
The Qt renderer has been rewritten to increase performance required
when applying cropping. No longer uses memcpy.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
[hans.verkuil@cisco.com: fix crop calculation when cropcap is unsupported]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: change m_scaledFrame to m_scaledSize
Bård Eirik Winther [Fri, 9 Aug 2013 11:12:07 +0000 (11:12 +0000)]
qv4l2: change m_scaledFrame to m_scaledSize

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: add pixel aspect ratio support for CaptureWin
Bård Eirik Winther [Thu, 8 Aug 2013 11:31:27 +0000 (11:31 +0000)]
qv4l2: add pixel aspect ratio support for CaptureWin

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: add hotkey for reset scaling to frame size
Bård Eirik Winther [Thu, 8 Aug 2013 11:31:26 +0000 (11:31 +0000)]
qv4l2: add hotkey for reset scaling to frame size

Adds hotkey CTRL + F for both CaptureWin and main Capture menu.
Resets the scaling of CaptureWin to fit frame size.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: added resize to frame size in Capture menu
Bård Eirik Winther [Thu, 8 Aug 2013 11:31:25 +0000 (11:31 +0000)]
qv4l2: added resize to frame size in Capture menu

This will resize the CaptureWin to the original frame size.
It also works with maximized windows.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: add video scaling for CaptureWin
Bård Eirik Winther [Thu, 8 Aug 2013 11:31:24 +0000 (11:31 +0000)]
qv4l2: add video scaling for CaptureWin

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: create function getMargins
Bård Eirik Winther [Thu, 8 Aug 2013 11:31:23 +0000 (11:31 +0000)]
qv4l2: create function getMargins

Created a function to get the total margins (window frame) in pixels
outside the actual video frame beeing displayed.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: show frames option can be toggled during capture
Bård Eirik Winther [Thu, 8 Aug 2013 11:31:22 +0000 (11:31 +0000)]
qv4l2: show frames option can be toggled during capture

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: fix black screen with opengl after capture
Bård Eirik Winther [Thu, 8 Aug 2013 11:31:21 +0000 (11:31 +0000)]
qv4l2: fix black screen with opengl after capture

Fixes the issue when the window was beeing resized/moved
and the frame image would become black.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: fix YUY2 shader
Bård Eirik Winther [Thu, 8 Aug 2013 11:31:20 +0000 (11:31 +0000)]
qv4l2: fix YUY2 shader

Fixed the YUY2 shaders to support scaling.
The new solution has cleaner shader code and texture upload
uses a better format for OpenGL.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: generalized opengl include guards
Bård Eirik Winther [Thu, 8 Aug 2013 11:31:19 +0000 (11:31 +0000)]
qv4l2: generalized opengl include guards

Created a general QtGL makefile condition and using config.h
to check in code if QtGL is present.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoRevert "qv4l2: fix YUY2 shader"
Hans Verkuil [Thu, 8 Aug 2013 11:51:33 +0000 (13:51 +0200)]
Revert "qv4l2: fix YUY2 shader"

This reverts commit bd0acd541929d4bbdd52a96791cdd01fe71b087f.

I unfortunately merged the wrong patch series, so all 7 patches are now
reverted.

11 years agoRevert "qv4l2: fix black screen with opengl after capture"
Hans Verkuil [Thu, 8 Aug 2013 11:51:28 +0000 (13:51 +0200)]
Revert "qv4l2: fix black screen with opengl after capture"

This reverts commit 5c1ee0137709ea1091c108ad771cf1a7c5b8a267.

11 years agoRevert "qv4l2: show frames option can be toggled during capture"
Hans Verkuil [Thu, 8 Aug 2013 11:51:22 +0000 (13:51 +0200)]
Revert "qv4l2: show frames option can be toggled during capture"

This reverts commit d8310e6898578807a5fb60e347084514c3b10ded.

11 years agoRevert "qv4l2: add function getMargins"
Hans Verkuil [Thu, 8 Aug 2013 11:51:12 +0000 (13:51 +0200)]
Revert "qv4l2: add function getMargins"

This reverts commit 603229f177942d47f9de3fcfb748143ec8a8fb92.

11 years agoRevert "qv4l2: add video scaling for CaptureWin"
Hans Verkuil [Thu, 8 Aug 2013 11:51:04 +0000 (13:51 +0200)]
Revert "qv4l2: add video scaling for CaptureWin"

This reverts commit 5c4ae96417ef434444d8bf93a0b135d0d5aa9013.

11 years agoRevert "qv4l2: add hotkey for reset scaling to frame size"
Hans Verkuil [Thu, 8 Aug 2013 11:50:57 +0000 (13:50 +0200)]
Revert "qv4l2: add hotkey for reset scaling to frame size"

This reverts commit 2171fb34bca67004e843c6b6ae4cf2be809f0315.

11 years agoRevert "qv4l2: add aspect ratio support"
Hans Verkuil [Thu, 8 Aug 2013 11:50:46 +0000 (13:50 +0200)]
Revert "qv4l2: add aspect ratio support"

This reverts commit 6b6a5ec8e0b1caa9f4f87b4aa7397b869bdd6f69.

11 years agoqv4l2: add aspect ratio support
Bård Eirik Winther [Mon, 5 Aug 2013 07:56:57 +0000 (07:56 +0000)]
qv4l2: add aspect ratio support

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: add hotkey for reset scaling to frame size
Bård Eirik Winther [Mon, 5 Aug 2013 07:56:56 +0000 (07:56 +0000)]
qv4l2: add hotkey for reset scaling to frame size

Adds hotkey CTRL + F for both CaptureWin and main Capture menu.
Resets the scaling of CaptureWin to fit frame size.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: add video scaling for CaptureWin
Bård Eirik Winther [Mon, 5 Aug 2013 07:56:55 +0000 (07:56 +0000)]
qv4l2: add video scaling for CaptureWin

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: add function getMargins
Bård Eirik Winther [Mon, 5 Aug 2013 07:56:54 +0000 (07:56 +0000)]
qv4l2: add function getMargins

Created a function to get the total margins (window frame) in pixels
outside the actual video frame beeing displayed.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: show frames option can be toggled during capture
Bård Eirik Winther [Mon, 5 Aug 2013 07:56:53 +0000 (07:56 +0000)]
qv4l2: show frames option can be toggled during capture

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: fix black screen with opengl after capture
Bård Eirik Winther [Mon, 5 Aug 2013 07:56:52 +0000 (07:56 +0000)]
qv4l2: fix black screen with opengl after capture

Fixes the issue when the window was beeing resized/moved
and the frame image would become black.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: fix YUY2 shader
Bård Eirik Winther [Mon, 5 Aug 2013 07:56:51 +0000 (07:56 +0000)]
qv4l2: fix YUY2 shader

Fixed the YUY2 shaders to support scaling.
The new solution has cleaner shader code and texture upload
uses a better format for OpenGL.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: add ALSA audio playback
Bård Eirik Winther [Tue, 6 Aug 2013 09:18:46 +0000 (09:18 +0000)]
qv4l2: add ALSA audio playback

The qv4l2 test utility now supports ALSA playback of audio.
This allows for PCM playback during capture for supported devices.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: add ALSA stream to qv4l2
Bård Eirik Winther [Tue, 6 Aug 2013 09:18:45 +0000 (09:18 +0000)]
qv4l2: add ALSA stream to qv4l2

Changes the ALSA streaming code to work with qv4l2 and allows it to
be compiled in. qv4l2 does not use the streaming function yet.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: fix a bug where the alsa thread never stops
Bård Eirik Winther [Tue, 6 Aug 2013 09:18:44 +0000 (09:18 +0000)]
qv4l2: fix a bug where the alsa thread never stops

If the output audio device never read the buffer then the alsa thread
would continue to fill it up and never stop when the capture stops.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: new ALSA stream source code
Bård Eirik Winther [Tue, 6 Aug 2013 09:18:43 +0000 (09:18 +0000)]
qv4l2: new ALSA stream source code

Code copied from xawtv3

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: alter capture menu
Bård Eirik Winther [Tue, 6 Aug 2013 09:18:42 +0000 (09:18 +0000)]
qv4l2: alter capture menu

Corrected Use OpenGL Render to Rendering and removed the separation line.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: fix a segfault for native 32 bpp formats
Hans Verkuil [Sat, 3 Aug 2013 13:27:06 +0000 (15:27 +0200)]
qv4l2: fix a segfault for native 32 bpp formats

If the native image format is 32 bits per pixels, then the QImage that
provides the initial black image is too small since the QImage format was
fixed at 24 bpp.

Change it to 32 bpp for this particular corner case.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: add OpenGL rendering
Bård Eirik Winther [Tue, 30 Jul 2013 08:15:24 +0000 (10:15 +0200)]
qv4l2: add OpenGL rendering

Adds OpenGL-accelerated display of video.
This allows for using the graphics card to render
the video content to screen and to perform color space conversion.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: new modular capture window design
Bård Eirik Winther [Tue, 30 Jul 2013 08:15:23 +0000 (10:15 +0200)]
qv4l2: new modular capture window design

The display of video has been divided into classes to
easier implement other ways to render frames on screen.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: add Capture menu
Bård Eirik Winther [Tue, 30 Jul 2013 08:15:22 +0000 (10:15 +0200)]
qv4l2: add Capture menu

Created a new Capture menu that contains both capture controls and audio/video settings for capture.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: fix minimum size in capture win to frame size
Bård Eirik Winther [Tue, 30 Jul 2013 08:15:21 +0000 (10:15 +0200)]
qv4l2: fix minimum size in capture win to frame size

CaptureWin's setMinimumSize() sets the minimum size for the video frame viewport
and not for the window itself. If the minimum size is larger than the monitor resolution,
it will reduce the minimum size to match this.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: add hotkeys for common operations
Bård Eirik Winther [Tue, 30 Jul 2013 08:15:20 +0000 (10:15 +0200)]
qv4l2: add hotkeys for common operations

CTRL + V : When main window is selected start capture.
           This gives an option other than the button to start recording,
           as this is a frequent operation when using the utility.
CTRL + W : When CaptureWin is selected close capture window
           It makes it easier to deal with high resolutions video on
           small screen, especially when the window close button may
           be outside the monitor when repositioning the window.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: move function ctrlEvent
Bård Eirik Winther [Tue, 30 Jul 2013 08:15:19 +0000 (10:15 +0200)]
qv4l2: move function ctrlEvent

Moved the ctrlEvent() function in qv4l2.cpp to be grouped with GUI function
and to group capFrame() and capVbiFrame() together.

Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoStart v4l-utils 1.1.x development branch
Gregor Jasny [Fri, 2 Aug 2013 21:51:57 +0000 (23:51 +0200)]
Start v4l-utils 1.1.x development branch

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agoPrepare for 1.0.0 release v4l-utils-1.0.0
Gregor Jasny [Fri, 2 Aug 2013 20:09:26 +0000 (22:09 +0200)]
Prepare for 1.0.0 release

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agoChange Readme and Copying suffix from lib to libv4l
Gregor Jasny [Fri, 2 Aug 2013 20:12:58 +0000 (22:12 +0200)]
Change Readme and Copying suffix from lib to libv4l

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agov4l2-ctl: (*XX).Foo -> XX->Foo
Hans Verkuil [Thu, 1 Aug 2013 10:22:37 +0000 (12:22 +0200)]
v4l2-ctl: (*XX).Foo -> XX->Foo

When possible we should try to use the simpler C++ construct.
XX->Foo is simpler than (*XX).Foo.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agolibdvbv5: Remove dead code in read_dvb_file.
Gregor Jasny [Wed, 31 Jul 2013 21:06:33 +0000 (23:06 +0200)]
libdvbv5: Remove dead code in read_dvb_file.

Detected by Coverity.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agolibdvbv5: Properly free temporary variables at end of parse_string
Gregor Jasny [Wed, 31 Jul 2013 20:37:58 +0000 (22:37 +0200)]
libdvbv5: Properly free temporary variables at end of parse_string

Detected by Coverity.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
CC: Mauro Carvalho Chehab <mchehab@infradead.org>
11 years agolibdvbv5: Free tbl in dvb_read_section_with_id error paths
Gregor Jasny [Wed, 31 Jul 2013 20:31:29 +0000 (22:31 +0200)]
libdvbv5: Free tbl in dvb_read_section_with_id error paths

Detected by Coverity.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
CC: Mauro Carvalho Chehab <mchehab@infradead.org>
11 years agolibdvbv5: Free all memory in parse_format_oneline error path
Gregor Jasny [Wed, 31 Jul 2013 20:22:13 +0000 (22:22 +0200)]
libdvbv5: Free all memory in parse_format_oneline error path

Detected by Coverity.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agolibdvbv5: Free all memory in read_dvb_file error path
Gregor Jasny [Wed, 31 Jul 2013 20:19:56 +0000 (22:19 +0200)]
libdvbv5: Free all memory in read_dvb_file error path

Detected by Coverity.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agolibdvbv5: Actually check for lock
Gregor Jasny [Wed, 31 Jul 2013 19:44:11 +0000 (21:44 +0200)]
libdvbv5: Actually check for lock

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
CC: Mauro Carvalho Chehab <mchehab@infradead.org>
11 years agoxc3028: Remove duplicate const
Gregor Jasny [Wed, 31 Jul 2013 19:37:39 +0000 (21:37 +0200)]
xc3028: Remove duplicate const

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agolibv4lconvert: Fix resource leak in sq905 error path
Gregor Jasny [Wed, 31 Jul 2013 19:32:49 +0000 (21:32 +0200)]
libv4lconvert: Fix resource leak in sq905 error path

Detected by Coverity.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
CC: Hans de Goede <hdegoede@redhat.com>
11 years agov4l2-ctl: Do not read past end of num_planes array
Gregor Jasny [Thu, 25 Jul 2013 21:27:17 +0000 (23:27 +0200)]
v4l2-ctl: Do not read past end of num_planes array

Detected by Coverity.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
CC: Hans Verkuil <hverkuil@xs4all.nl>
11 years agopixfmt-test: Explicitely mention fall-through
Gregor Jasny [Thu, 25 Jul 2013 21:00:20 +0000 (23:00 +0200)]
pixfmt-test: Explicitely mention fall-through

Spotted by Coverity.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agolibv4lconvert: Avoid division by 0 if gamma value is corrupted
Gregor Jasny [Thu, 25 Jul 2013 20:43:14 +0000 (22:43 +0200)]
libv4lconvert: Avoid division by 0 if gamma value is corrupted

Detected by Coverity.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
CC: Hans de Goede <hdegoede@redhat.com>
11 years agolibdvbv5: Fix copy and paste error in parse_service()
Gregor Jasny [Thu, 25 Jul 2013 12:46:58 +0000 (14:46 +0200)]
libdvbv5: Fix copy and paste error in parse_service()

Detected by Coverity.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
CC: Mauro Carvalho Chehab <mchehab@infradead.org>
CC: André Roth <neolynx@gmail.com>
11 years agords-ctl: Always terminate strings properly
Gregor Jasny [Mon, 22 Jul 2013 20:27:02 +0000 (22:27 +0200)]
rds-ctl: Always terminate strings properly

Detected by Coverity.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agolibdvbv5: Fix reallocation in parse_lcn
Gregor Jasny [Mon, 22 Jul 2013 20:08:09 +0000 (22:08 +0200)]
libdvbv5: Fix reallocation in parse_lcn

Detected by Coverity.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
CC: Mauro Carvalho Chehab <mchehab@infradead.org>
11 years agoxc3082: Fix use after free in free_firmware()
Gregor Jasny [Mon, 22 Jul 2013 19:52:52 +0000 (21:52 +0200)]
xc3082: Fix use after free in free_firmware()

Detected by Coverity Scanner.

CC: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agov4l2_compliance: -EINVAL is expected when ret is not 0
Ricardo Ribalda Delgado [Tue, 30 Jul 2013 12:59:23 +0000 (14:59 +0200)]
v4l2_compliance: -EINVAL is expected when ret is not 0

Otherwise the driver can never return a register

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agov4l2-ctl: fix coverity issues.
Hans Verkuil [Tue, 30 Jul 2013 12:01:15 +0000 (14:01 +0200)]
v4l2-ctl: fix coverity issues.

Fixed a number of obvious coding issues found by Coverity.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agov4l2-dbg: fix coverity issues.
Hans Verkuil [Tue, 30 Jul 2013 11:48:21 +0000 (13:48 +0200)]
v4l2-dbg: fix coverity issues.

Fixed a number of obvious coding issues found by Coverity.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agords-ctl: fix coverity issues.
Hans Verkuil [Tue, 30 Jul 2013 11:35:01 +0000 (13:35 +0200)]
rds-ctl: fix coverity issues.

Fixed a number of obvious coding issues found by Coverity.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agolibv4l2rds: fix coverity issues.
Hans Verkuil [Tue, 30 Jul 2013 11:16:56 +0000 (13:16 +0200)]
libv4l2rds: fix coverity issues.

Fixed a number of obvious coding issues found by Coverity.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: always update controls by default
Hans Verkuil [Mon, 29 Jul 2013 14:20:56 +0000 (16:20 +0200)]
qv4l2: always update controls by default

The 'Update on change' checkbox was by default only checked for the user controls
tab, not for the others. This is however very confusing and in general you always
want to update a control immediately once it is changed, unless you explicitly
uncheck the checkbox.

The original idea was that for e.g. the MPEG controls you want to set them all up
just the way you want it, and then press Update to update all the changes using
extended controls. This is particularly useful for controls that depend on one
another.

In practice however, and certanly with lots of the new controls that appeared,
you just want to have an immediate effect when changing a control.

Having 'Update on change' disabled just leads to confused users, which frankly
includes myself :-)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoSync with 3.11 kernel.
Hans Verkuil [Mon, 29 Jul 2013 14:16:59 +0000 (16:16 +0200)]
Sync with 3.11 kernel.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoparse_string: fix encodings for Taiwan
Mauro Carvalho Chehab [Fri, 26 Jul 2013 10:32:51 +0000 (07:32 -0300)]
parse_string: fix encodings for Taiwan

As reported on:
http://www.mail-archive.com/linux-media@vger.kernel.org/msg64804.html
by Huey-Horng Yo <hiroshiyui@gmail.com>, the proper handling for 0x14
region code is UTF-16BE. Fix it, in order to get the proper channel
names.

Reported-by: Huey-Horng Yo <hiroshiyui@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agodvbv5-zap: Parse the LNB from the channel file
Guy Martin [Tue, 18 Jun 2013 13:19:09 +0000 (10:19 -0300)]
dvbv5-zap: Parse the LNB from the channel file

Parsing the LNB needs to be done for proper tuning.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Acked-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agolibdvbv5: Use a temporary copy of the dvb parameters when tuning
Guy Martin [Tue, 18 Jun 2013 13:19:08 +0000 (10:19 -0300)]
libdvbv5: Use a temporary copy of the dvb parameters when tuning

This patch copies the parms provided into a temporary buffer. This buffer will then
be used for any modification that needs to be performed. It makes the function
dvb_fe_set_parms() thread-safe. Also, since the DTV_FREQUENCY is not modified, it fixes
a bug where dvbv5-scan retrieves the frequency from the parms and write it to the
channel file.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Acked-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agolibdvbv5: Fix satellite handling and apply polarization parameter to the frontend
Guy Martin [Tue, 18 Jun 2013 13:19:07 +0000 (10:19 -0300)]
libdvbv5: Fix satellite handling and apply polarization parameter to the frontend

Apply polarization parameters even if a satellite number is not provided. This allow
proper setup of the tone and voltage.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Acked-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agolibdvbv5: Export dvb_fe_is_satellite()
Guy Martin [Tue, 18 Jun 2013 13:19:06 +0000 (10:19 -0300)]
libdvbv5: Export dvb_fe_is_satellite()

This patch makes the function dvb_fe_is_satellite() availble from libdvbv5. This function is simple
but yet very handful to have around.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Acked-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agolibdvbv5: Add parsing of POLARIZATION
Guy Martin [Tue, 18 Jun 2013 13:19:05 +0000 (10:19 -0300)]
libdvbv5: Add parsing of POLARIZATION

This patch add parsing support for the POLARIZATION parameter for the DVBv5 file format.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Acked-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agolibdvbv5: Remove buggy parsing of extra DTV_foo parameters
Guy Martin [Tue, 18 Jun 2013 13:19:04 +0000 (10:19 -0300)]
libdvbv5: Remove buggy parsing of extra DTV_foo parameters

The parsing of those extra parameters is buggy and completely useless since they are parsed
individually later on in the code.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Acked-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agolibv4lconvert: Prevent integer overflow by checking width and height
Gregor Jasny [Thu, 27 Jun 2013 20:09:00 +0000 (22:09 +0200)]
libv4lconvert: Prevent integer overflow by checking width and height

The Mayhem Team found a crash caused by an integer overflow.
Details are here:
http://www.forallsecure.com/bug-reports/8aae67d864bce76993f3f9812b4a2aeea0eb38da/

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agokeytable: Always check if strtok return value is null
Gregor Jasny [Thu, 27 Jun 2013 20:57:53 +0000 (22:57 +0200)]
keytable: Always check if strtok return value is null

The Mayhem Team found a crash caused by a nullptr.
Details are here:
http://www.forallsecure.com/bug-reports/567323cd26f180910beb03ae26afb40c432a0c6a/

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoRemove committed v4l2-chip-ident.h headers.
Hans Verkuil [Fri, 28 Jun 2013 09:04:13 +0000 (11:04 +0200)]
Remove committed v4l2-chip-ident.h headers.

This header is no longer needed and will be removed altogether in kernel 3.11.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agolibv4l2/log.c: add entry for new VIDIOC_DBG_G_CHIP_INFO ioctl.
Hans Verkuil [Fri, 28 Jun 2013 09:03:48 +0000 (11:03 +0200)]
libv4l2/log.c: add entry for new VIDIOC_DBG_G_CHIP_INFO ioctl.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoSync with latest 3.10.0-rc7 kernel.
Hans Verkuil [Fri, 28 Jun 2013 08:50:39 +0000 (10:50 +0200)]
Sync with latest 3.10.0-rc7  kernel.

This also added two new keymaps.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoRemove references to v4l2-chip-ident.h
Hans Verkuil [Fri, 28 Jun 2013 08:49:25 +0000 (10:49 +0200)]
Remove references to v4l2-chip-ident.h

This header will be removed soon and v4l2-dbg no longer uses it.

So remove any references to it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agolibdvb: Disable library installation by default
Gregor Jasny [Sat, 22 Jun 2013 15:21:20 +0000 (17:21 +0200)]
libdvb: Disable library installation by default

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agov4l2-ctl: V4L2_BUF_TYPE_PRIVATE is no longer used.
Hans Verkuil [Fri, 21 Jun 2013 05:41:02 +0000 (07:41 +0200)]
v4l2-ctl: V4L2_BUF_TYPE_PRIVATE is no longer used.

Remove references to this obsolete buffer type.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agolibv4l2: do not log a ton of errors on device unplug
Hans de Goede [Wed, 19 Jun 2013 22:11:05 +0000 (00:11 +0200)]
libv4l2: do not log a ton of errors on device unplug

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
11 years agolibv4l2: Add V4L2_PERROR convenience macro
Hans de Goede [Wed, 19 Jun 2013 21:59:13 +0000 (23:59 +0200)]
libv4l2: Add V4L2_PERROR convenience macro

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
11 years agov4l2-ctl: fix wrong array accesses in selection code.
Hans Verkuil [Wed, 19 Jun 2013 15:43:19 +0000 (17:43 +0200)]
v4l2-ctl: fix wrong array accesses in selection code.

The code to print, get and set selections was broken: the while condition
increased the index as well, so when accessing elements inside the while the
array index was one too high.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agobuildsystem: Do not bootstrap complete gettext for testing iconv
Gregor Jasny [Tue, 18 Jun 2013 20:47:26 +0000 (22:47 +0200)]
buildsystem: Do not bootstrap complete gettext for testing iconv

Automake 1.14 will break with gettext older than 0.18.2 because the
deprecated AM_PROG_MKDIR_P has been removed.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agoqv4l2: Silence Qt build tools invocation if silent mode is enabled
Gregor Jasny [Tue, 18 Jun 2013 19:31:01 +0000 (21:31 +0200)]
qv4l2: Silence Qt build tools invocation if silent mode is enabled

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agov4l2-compliance: fix typo
Hans Verkuil [Sat, 15 Jun 2013 09:09:35 +0000 (11:09 +0200)]
v4l2-compliance: fix typo

fmt1 -> fmt2

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoDon't call G_TUNER unless actually performing a tuning related call
Devin Heitmueller [Fri, 14 Jun 2013 13:59:26 +0000 (09:59 -0400)]
Don't call G_TUNER unless actually performing a tuning related call

Making G_TUNER calls can take a long time on some tuners, in
particular those that load firmware or do power management.  As a
result, we don't want to call G_TUNER unless the user is actually
doing a tuning related call.  The current code makes a G_TUNER
call regardless of what command the user is attempting to perform.

Problem originally identified on the HVR-950q, where even doing
operations like toggling from the composite to the s-video input
would take over 1000ms.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agolibv4l2: Add logging of dqbuf timestamps to debug logging
Hans de Goede [Sun, 9 Jun 2013 14:31:55 +0000 (16:31 +0200)]
libv4l2: Add logging of dqbuf timestamps to debug logging

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
11 years agords-ctl: support -d10 to refer to radio10.
Hans Verkuil [Fri, 7 Jun 2013 08:22:51 +0000 (10:22 +0200)]
rds-ctl: support -d10 to refer to radio10.

In order to be consistent with other v4l utilities support the '-d<num>' option
for num >= 10.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agolibv4l2rds.c: moving functions to get rid of declarations
Konke Radlow [Tue, 4 Jun 2013 18:15:03 +0000 (18:15 +0000)]
libv4l2rds.c: moving functions to get rid of declarations

Signed-off-by: Konke Radlow <koradlow@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agords-ctl: support RDS-EON and TMC-tuning info
Konke Radlow [Tue, 4 Jun 2013 18:15:02 +0000 (18:15 +0000)]
rds-ctl: support RDS-EON and TMC-tuning info

- added functionality to print RDS-EON information
- added functionality to print RDS-TMC tuning information
- clarify option description, change
  trigger condition for printing TMC Tuning information

Signed-off-by: Konke Radlow <koradlow@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>