yavta.git
12 months agoAdd meta-data capture support master
Laurent Pinchart [Tue, 12 Apr 2016 22:58:57 +0000 (01:58 +0300)]
Add meta-data capture support

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
12 months agoUpdate kernel headers to v4.12
Laurent Pinchart [Thu, 24 Aug 2017 09:17:14 +0000 (12:17 +0300)]
Update kernel headers to v4.12

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
22 months agoAdd YVU 3-planar formats support
Laurent Pinchart [Mon, 24 Oct 2016 13:02:52 +0000 (16:02 +0300)]
Add YVU 3-planar formats support

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
22 months agoAdd HSV24 and HSV32 formats support
Laurent Pinchart [Tue, 6 Sep 2016 23:14:39 +0000 (02:14 +0300)]
Add HSV24 and HSV32 formats support

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
22 months agoUpdate headers from upstream kernel
Laurent Pinchart [Mon, 24 Oct 2016 12:59:44 +0000 (15:59 +0300)]
Update headers from upstream kernel

Upstream commit 3907fae86ebabd622bd8265285d5b612d5958948

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agoFix handling of last buffers before end of capture
Laurent Pinchart [Fri, 17 Jun 2016 23:20:29 +0000 (02:20 +0300)]
Fix handling of last buffers before end of capture

yavta is supposed not to requeue the last buffers before end of capture
(unless requested to do so with the --requeue-last option). However, the
logic is wrong, and only one of the last buffers is not requeued. Fix it
by skipping all of the last buffers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agoAdd YUV422M and YUV444M support
Laurent Pinchart [Wed, 15 Jun 2016 22:35:27 +0000 (01:35 +0300)]
Add YUV422M and YUV444M support

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agoUpdate headers from upstream kernel
Laurent Pinchart [Wed, 15 Jun 2016 22:41:43 +0000 (01:41 +0300)]
Update headers from upstream kernel

Upstream commit 5edb56491d4812c42175980759da53388e5d86f5.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agoPrint driver name when querying capabilities
Laurent Pinchart [Fri, 13 May 2016 18:15:18 +0000 (21:15 +0300)]
Print driver name when querying capabilities

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agoReturn proper error code if STREAMON fails
Tuukka Toivonen [Mon, 14 Dec 2015 07:49:57 +0000 (09:49 +0200)]
Return proper error code if STREAMON fails

Return the error code if video_enable() and VIDIOC_STREAMON
fails.

Signed-off-by: Tuukka Toivonen <tuukka.toivonen@intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agoPrint the number of frames and bytes captured when the interval is null
Laurent Pinchart [Sat, 12 Dec 2015 15:50:38 +0000 (17:50 +0200)]
Print the number of frames and bytes captured when the interval is null

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agoList supported formats with -f help
Sakari Ailus [Thu, 10 Sep 2015 12:19:20 +0000 (15:19 +0300)]
List supported formats with -f help

Passing format "help" to the -f option will list the supported formats and
exit.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
3 years agoZero the planes array before queuing buffers
Laurent Pinchart [Tue, 5 May 2015 07:36:35 +0000 (10:36 +0300)]
Zero the planes array before queuing buffers

V4L2 requires reserved fields to be zeroed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoyavta: Fix printing of device capabilities
Laurent Pinchart [Mon, 16 Mar 2015 15:27:13 +0000 (17:27 +0200)]
yavta: Fix printing of device capabilities

Commit d029d1d5bba831b9 ("Separate querying capabilities and determining
buffer queue type") broke capabilities printing. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
3 years agoPrints bytes used for all planes
Laurent Pinchart [Wed, 25 Feb 2015 22:43:00 +0000 (00:43 +0200)]
Prints bytes used for all planes

When using the multiplanar API the v4l2_buffer bytesused field is
documented as ignored, and the planes array should be used instead.
Compute the total number of bytes used to be printed during capture
based on the planes array when using the multiplanar API.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoFix data offset config option parsing
Sakari Ailus [Mon, 5 Jan 2015 23:50:15 +0000 (01:50 +0200)]
Fix data offset config option parsing

The option itself was considered correctly, but a small but crucial break
statement was missing. --data-offset option does not take an argument
either.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoRename buffer prefix as data prefix
Sakari Ailus [Mon, 5 Jan 2015 23:50:14 +0000 (01:50 +0200)]
Rename buffer prefix as data prefix

Data prefix is a much better name for this (think of data_offset, for
instance).

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoyavta: Add support for 10-bit packed raw bayer formats
Sakari Ailus [Mon, 15 Dec 2014 16:26:49 +0000 (18:26 +0200)]
yavta: Add support for 10-bit packed raw bayer formats

Add support for these pixel formats:

V4L2_PIX_FMT_SBGGR10P
V4L2_PIX_FMT_SGBRG10P
V4L2_PIX_FMT_SGRBG10P
V4L2_PIX_FMT_SRGGB10P

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoUpdate headers from upstream kernel
Laurent Pinchart [Fri, 2 Jan 2015 12:23:23 +0000 (14:23 +0200)]
Update headers from upstream kernel

Upstream commit 99f3cd52aee21091ce62442285a68873e3be833f.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoUpdate headers from upstream kernel
Laurent Pinchart [Thu, 11 Dec 2014 22:14:47 +0000 (00:14 +0200)]
Update headers from upstream kernel

Upstream commit 71947828caef0c83d4245f7d1eaddc799b4ff1d1

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoyavta: Implement data_offset support for multi plane buffers
Sakari Ailus [Mon, 15 Dec 2014 16:26:47 +0000 (18:26 +0200)]
yavta: Implement data_offset support for multi plane buffers

Support data_offset for multi plane buffers. Also add an option to write the
data in the buffer before data offset (--buffer-prefix).

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoyavta: Set plane size for mplane buffers in qbuf
Sakari Ailus [Mon, 15 Dec 2014 15:27:44 +0000 (17:27 +0200)]
yavta: Set plane size for mplane buffers in qbuf

The plane size was left zero for mplane buffers when queueing a buffer. Fix
this.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
[For consistency set buf.length for USERPTR buffers only]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoyavta: Add --queue-late option for delay queueing buffers over streaming start
Sakari Ailus [Fri, 24 Oct 2014 14:23:58 +0000 (17:23 +0300)]
yavta: Add --queue-late option for delay queueing buffers over streaming start

Queue buffers to the device after VIDIOC_STREAMON, not before. This does not
affect queueing behaviour otherwise.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoAdd support for premultiplied formats
Laurent Pinchart [Wed, 25 Jun 2014 20:03:10 +0000 (22:03 +0200)]
Add support for premultiplied formats

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoAdd --buffer-size argument
Laurent Pinchart [Tue, 30 Sep 2014 21:51:18 +0000 (00:51 +0300)]
Add --buffer-size argument

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoAdd support for missing RGB formats
Laurent Pinchart [Mon, 23 Jun 2014 14:32:25 +0000 (16:32 +0200)]
Add support for missing RGB formats

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoUpdate headers from upstream kernel
Laurent Pinchart [Mon, 23 Jun 2014 14:32:17 +0000 (16:32 +0200)]
Update headers from upstream kernel

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 years agoAdd support for printing string controls
Laurent Pinchart [Sat, 21 Jun 2014 09:41:39 +0000 (11:41 +0200)]
Add support for printing string controls

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 years agoAdd log status support
Laurent Pinchart [Fri, 31 Jan 2014 00:39:06 +0000 (01:39 +0100)]
Add log status support

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 years agoAdd support for interlaced formats
Laurent Pinchart [Sat, 24 May 2014 16:58:54 +0000 (18:58 +0200)]
Add support for interlaced formats

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 years agoSet timestamp for output buffers if the timestamp type is copy
Sakari Ailus [Sat, 12 Apr 2014 13:24:03 +0000 (16:24 +0300)]
Set timestamp for output buffers if the timestamp type is copy

Copy timestamp type will mean the timestamp is be copied from the source to
the destination buffer on mem-to-mem devices.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
4 years agoSupport copy timestamps
Sakari Ailus [Sat, 12 Apr 2014 13:24:02 +0000 (16:24 +0300)]
Support copy timestamps

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
4 years agoShorten dequeued buffer info print
Sakari Ailus [Sat, 12 Apr 2014 13:24:01 +0000 (16:24 +0300)]
Shorten dequeued buffer info print

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
4 years agoPrint timestamp type and source for dequeued buffers
Sakari Ailus [Sat, 12 Apr 2014 13:24:00 +0000 (16:24 +0300)]
Print timestamp type and source for dequeued buffers

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
4 years agoTimestamp source for output buffers
Sakari Ailus [Sat, 12 Apr 2014 13:23:59 +0000 (16:23 +0300)]
Timestamp source for output buffers

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
4 years agoAllow passing file descriptors to yavta
Sakari Ailus [Sat, 12 Apr 2014 13:23:58 +0000 (16:23 +0300)]
Allow passing file descriptors to yavta

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
4 years agoProvide -B option for setting the buffer type
Sakari Ailus [Sat, 12 Apr 2014 13:23:57 +0000 (16:23 +0300)]
Provide -B option for setting the buffer type

Instead of guessing the buffer type, allow setting it explicitly.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
4 years agoMake struct for buffer type and name mapping usable elsewhere
Sakari Ailus [Sat, 12 Apr 2014 13:23:56 +0000 (16:23 +0300)]
Make struct for buffer type and name mapping usable elsewhere

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
4 years agoSeparate querying capabilities and determining buffer queue type
Sakari Ailus [Sat, 12 Apr 2014 13:23:55 +0000 (16:23 +0300)]
Separate querying capabilities and determining buffer queue type

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
4 years agoProvide functions for setting the buffer type and checking its validity
Sakari Ailus [Sat, 12 Apr 2014 13:23:54 +0000 (16:23 +0300)]
Provide functions for setting the buffer type and checking its validity

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
4 years agoSeparate device object initialisation and opening
Sakari Ailus [Sat, 12 Apr 2014 13:23:53 +0000 (16:23 +0300)]
Separate device object initialisation and opening

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
4 years agoPrint timestamp source (start-of-exposure or end-of-frame)
Sakari Ailus [Sat, 1 Mar 2014 16:18:03 +0000 (18:18 +0200)]
Print timestamp source (start-of-exposure or end-of-frame)

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
4 years agoUpdate headers from upstream kernel, including timestamp source patches
Sakari Ailus [Sat, 1 Mar 2014 16:18:02 +0000 (18:18 +0200)]
Update headers from upstream kernel, including timestamp source patches

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
4 years agoAdd YV420M support
Laurent Pinchart [Thu, 27 Jun 2013 10:22:08 +0000 (12:22 +0200)]
Add YV420M support

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 years agoAdd NV16M and NV61M support
Laurent Pinchart [Wed, 26 Jun 2013 12:22:03 +0000 (14:22 +0200)]
Add NV16M and NV61M support

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 years agoAdd NV12M and NV21M support
Laurent Pinchart [Wed, 26 Jun 2013 08:53:02 +0000 (10:53 +0200)]
Add NV12M and NV21M support

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 years agoUpdate videodev2.h kernel header file
Laurent Pinchart [Thu, 27 Jun 2013 10:22:34 +0000 (12:22 +0200)]
Update videodev2.h kernel header file

We need NV16M and NV61M support.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 years agoSupport multiplanar buffers verification
Laurent Pinchart [Thu, 22 Aug 2013 21:27:58 +0000 (23:27 +0200)]
Support multiplanar buffers verification

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 years agoLoad multiplane files
Detlev Casanova [Wed, 26 Jun 2013 08:26:31 +0000 (10:26 +0200)]
Load multiplane files

Signed-off-by: Detlev Casanova <detlev.casanova@gmail.com>
4 years agoAdd multi-plane support
Detlev Casanova [Wed, 26 Jun 2013 08:31:23 +0000 (10:31 +0200)]
Add multi-plane support

Signed-off-by: Detlev Casanova <detlev.casanova@gmail.com>
4 years agoAdd video_is_output() and video_is_capture() helper functions
Laurent Pinchart [Wed, 26 Jun 2013 08:12:40 +0000 (10:12 +0200)]
Add video_is_output() and video_is_capture() helper functions

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 years agoUse format information structure directly
Laurent Pinchart [Wed, 26 Jun 2013 07:51:23 +0000 (09:51 +0200)]
Use format information structure directly

Replace the v4l2_format_code() function by functions to retrieve format
information by fourcc or name, and access the format information
structure directly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 years agoMake buffer structure multiplane aware
Detlev Casanova [Tue, 25 Jun 2013 18:34:52 +0000 (20:34 +0200)]
Make buffer structure multiplane aware

Signed-off-by: Detlev Casanova <detlev.casanova@gmail.com>
4 years agoMark current menu value with a (*) when querying controls
Laurent Pinchart [Thu, 9 Jan 2014 14:57:33 +0000 (15:57 +0100)]
Mark current menu value with a (*) when querying controls

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 years agoInteger64 and string controls can't be accessed using VIDIOC_[GS]_CTRL
Sakari Ailus [Thu, 5 Dec 2013 16:44:29 +0000 (18:44 +0200)]
Integer64 and string controls can't be accessed using VIDIOC_[GS]_CTRL

So don't even try.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 years agoMake VIDIOC_[GS]_CTRL work
Sakari Ailus [Thu, 5 Dec 2013 12:35:27 +0000 (14:35 +0200)]
Make VIDIOC_[GS]_CTRL work

v4l2_control.value was left uninitialised for the VIDIOC_S_CTRL IOCTL. Fix
that.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 years agoSupport additional dpcm compressed bayer formats.
Sakari Ailus [Thu, 12 Apr 2012 08:41:35 +0000 (11:41 +0300)]
Support additional dpcm compressed bayer formats.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
5 years agoSupport device caps
Laurent Pinchart [Thu, 22 Aug 2013 21:20:43 +0000 (23:20 +0200)]
Support device caps

Use the V4L2 video device caps instead of the global caps when
available.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
5 years agoTruncate existing files when writing frames to memory
Laurent Pinchart [Tue, 25 Jun 2013 12:47:24 +0000 (14:47 +0200)]
Truncate existing files when writing frames to memory

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
5 years agoAdd support for VYUY and YVYU formats
Laurent Pinchart [Tue, 25 Jun 2013 12:45:41 +0000 (14:45 +0200)]
Add support for VYUY and YVYU formats

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
5 years agoPrint v4l2_buffer timestamp type
Sakari Ailus [Tue, 27 Nov 2012 21:57:34 +0000 (23:57 +0200)]
Print v4l2_buffer timestamp type

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
5 years agoUpdate kernel header files
Sakari Ailus [Thu, 15 Nov 2012 22:09:43 +0000 (00:09 +0200)]
Update kernel header files

Update videodev2.h and move it under include/linux. v4l2-common.h and
v4l2-controls.h are now required by videodev2.h as well --- they're really
the reason for moving videodev2.h. The two required headers are added, too.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoSupport extended controls, including 64-bit integers
Sakari Ailus [Fri, 13 Apr 2012 20:34:21 +0000 (23:34 +0300)]
Support extended controls, including 64-bit integers

Fall back to regular S_CTRL / G_CTRL if extended controls aren't available.

Also don't try to get value for classes.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoSupport integer menus
Sakari Ailus [Fri, 13 Apr 2012 20:34:19 +0000 (23:34 +0300)]
Support integer menus

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoAdd videodev2.h to allow building on systems without latest kernel headers
Sakari Ailus [Fri, 13 Apr 2012 20:34:20 +0000 (23:34 +0300)]
Add videodev2.h to allow building on systems without latest kernel headers

Add videodev2.h as part of yavta. The file is to be updated from linux-media
tree manually in the future.

Remove existing format definitions in yavta.c since they are no longer
needed.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoAdd --stride argument
Laurent Pinchart [Wed, 25 Jan 2012 15:44:17 +0000 (16:44 +0100)]
Add --stride argument

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agowarn if written size is different to original one
Andy Shevchenko [Tue, 24 Jan 2012 11:43:21 +0000 (13:43 +0200)]
warn if written size is different to original one

This patch also eliminates compiler warning:
 yavta.c: In function ‘video_save_image’:
 yavta.c:974:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[Print different messages depending on whether the return value is
negative or positive]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoAdd NV pixel formats
Jacob Pan [Tue, 24 Jan 2012 11:43:20 +0000 (13:43 +0200)]
Add NV pixel formats

Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[Add NV21, NV16, NV61, NV24 and NV42 formats]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoAdd support for Y10 and Y12 pixel formats
Laurent Pinchart [Wed, 21 Dec 2011 10:54:04 +0000 (11:54 +0100)]
Add support for Y10 and Y12 pixel formats

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoAdd missing header file sys/stat.h
Giorgio Vazzana [Fri, 9 Dec 2011 15:26:45 +0000 (16:26 +0100)]
Add missing header file sys/stat.h

This file defines the initial permission flags used by open when we
create a file using O_CREAT flag.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoSupport writing all frames to a single file
Laurent Pinchart [Fri, 25 Nov 2011 12:02:42 +0000 (13:02 +0100)]
Support writing all frames to a single file

When using the -F/--file argument to capture frames to files, the file
name given as argument is now a pattern. If the pattern contains '#',
the first '#' character will be expanded to the frame number. Otherwise
all frames will be written to the same file.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoExit when VIDIOC_STREAMON fails.
Laurent Pinchart [Tue, 25 Oct 2011 11:59:45 +0000 (13:59 +0200)]
Exit when VIDIOC_STREAMON fails.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoPrint both error text and error code in error messages.
Laurent Pinchart [Tue, 25 Oct 2011 11:41:55 +0000 (13:41 +0200)]
Print both error text and error code in error messages.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoUse monotonic clock to retrieve timestamps
Laurent Pinchart [Tue, 25 Oct 2011 08:14:22 +0000 (10:14 +0200)]
Use monotonic clock to retrieve timestamps

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoAdd support for RGB formats
Laurent Pinchart [Tue, 25 Oct 2011 08:14:13 +0000 (10:14 +0200)]
Add support for RGB formats

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd buffer overrun checks
Laurent Pinchart [Mon, 21 Mar 2011 16:33:26 +0000 (17:33 +0100)]
Add buffer overrun checks

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoFree userspace buffers when freeing video buffers
Laurent Pinchart [Mon, 11 Jul 2011 20:09:29 +0000 (22:09 +0200)]
Free userspace buffers when freeing video buffers

Memory allocated with posix_memalign() must be freed with free().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd --realtime option to switch to RR scheduling
Laurent Pinchart [Mon, 11 Apr 2011 15:29:46 +0000 (17:29 +0200)]
Add --realtime option to switch to RR scheduling

The optional argument selects the static priority. If omitted, the
priority is set to 1.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd support for missing Bayer formats
Laurent Pinchart [Sat, 14 May 2011 13:06:23 +0000 (15:06 +0200)]
Add support for missing Bayer formats

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoPrint class controls as headers
Laurent Pinchart [Wed, 4 May 2011 10:39:17 +0000 (12:39 +0200)]
Print class controls as headers

This improves the controls list readability.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoIgnore failed VIDIOC_QUERYCAP.
Sakari Ailus [Wed, 4 May 2011 09:18:51 +0000 (12:18 +0300)]
Ignore failed VIDIOC_QUERYCAP.

This is not a fatal error, and especially subdevs do not support it. If
VIDIOC_QUERY returns an error, assume the device is a V4L2 subdev and
set the --no-query option.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoSupport holes in menu indices
Laurent Pinchart [Sat, 30 Apr 2011 12:43:16 +0000 (14:43 +0200)]
Support holes in menu indices

When querying menu entries, don't stop at the first error returned by
the driver but loop over the [min,max] range and print supported menu
entries only.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoSupport pattern files for compressed formats
Laurent Pinchart [Mon, 21 Mar 2011 16:27:46 +0000 (17:27 +0100)]
Support pattern files for compressed formats

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoDisplay the instant frame rate for each frame during capture
Laurent Pinchart [Sun, 23 Jan 2011 01:06:19 +0000 (02:06 +0100)]
Display the instant frame rate for each frame during capture

This helps debugging framerate related problems.

Thanks to Martin Hostettler for submitting a first version of this
patch.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd support for GREY/Y8 format
Martin Hostettler [Fri, 21 Jan 2011 00:14:47 +0000 (01:14 +0100)]
Add support for GREY/Y8 format

7 years agoFix an off-by-one bug in frame count
Laurent Pinchart [Thu, 23 Dec 2010 08:49:48 +0000 (09:49 +0100)]
Fix an off-by-one bug in frame count

Thanks to Stefan Steuerwald for pointing out the issue and providing an
initial patch.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd support for the V4L2_PIX_FMT_SGRBG12 format
Laurent Pinchart [Thu, 2 Dec 2010 23:16:50 +0000 (00:16 +0100)]
Add support for the V4L2_PIX_FMT_SGRBG12 format

The format isn't available in the mainline kernel yet, so guard it with
conditional compilation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd support for SGRBG10_DPCM8 format
Laurent Pinchart [Fri, 26 Nov 2010 15:25:25 +0000 (16:25 +0100)]
Add support for SGRBG10_DPCM8 format

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd struct buffer object
Laurent Pinchart [Fri, 26 Nov 2010 15:20:25 +0000 (16:20 +0100)]
Add struct buffer object

Use the new buffer object to hold the buffer size and memory pointer.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoFix uninitialized variable warning in video_do_capture()
Laurent Pinchart [Fri, 26 Nov 2010 15:19:34 +0000 (16:19 +0100)]
Fix uninitialized variable warning in video_do_capture()

Make sure the variable won't be use uninitialized and silent the
warning.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd buffer error flag to information printed after VIDIOC_DQBUF
Laurent Pinchart [Fri, 26 Nov 2010 14:58:32 +0000 (15:58 +0100)]
Add buffer error flag to information printed after VIDIOC_DQBUF

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd option to make requeue of last buffers configurable
Laurent Pinchart [Wed, 29 Sep 2010 08:32:14 +0000 (10:32 +0200)]
Add option to make requeue of last buffers configurable

When capturing n image with p buffers, dequeued buffers don't need to be
requeued in the last n - p iterations. Don't requeue them by default,
and add a --requeue-last option to force the old behaviour.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoPrint device bus info when opening the device
Laurent Pinchart [Wed, 29 Sep 2010 08:37:29 +0000 (10:37 +0200)]
Print device bus info when opening the device

To differentiate between identically named devices, print the bus info
reported by VIDIOC_QUERYCAP.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agoDo not divide by zero.
Sakari Ailus [Fri, 6 Aug 2010 13:03:35 +0000 (16:03 +0300)]
Do not divide by zero.

If only one buffer was processed the performance measurement calculation
caused a division by zero. Do not do show measurements if they are bad.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
8 years agoBasic test pattern support for video output devices
Laurent Pinchart [Fri, 6 Aug 2010 13:10:37 +0000 (15:10 +0200)]
Basic test pattern support for video output devices

Instead of filling video output buffers with 0s, generate and user a
test pattern.

If the -F argument is given, the test pattern is read from the specified
file. The file size must be at equal to or bigger than the image size.

If the -F argument is not given, a basic test pattern is generated
automatically. Every byte is set to the sum of its X and Y coordinates.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agoOptimise for safer free() usage.
Sakari Ailus [Sun, 1 Aug 2010 11:08:04 +0000 (14:08 +0300)]
Optimise for safer free() usage.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
8 years agoMake -c and -F options accept an optional argument
Laurent Pinchart [Fri, 30 Jul 2010 13:21:32 +0000 (15:21 +0200)]
Make -c and -F options accept an optional argument

The long --capture and --file options have an optional argument, fix the
short versions.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agoDo accept CFLAGS and LDFLAGS from environment.
Sakari Ailus [Thu, 29 Jul 2010 15:01:10 +0000 (18:01 +0300)]
Do accept CFLAGS and LDFLAGS from environment.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
8 years agoAdd support for the V4L2_PIX_FMT_Y16 format
Laurent Pinchart [Thu, 22 Jul 2010 20:09:28 +0000 (22:09 +0200)]
Add support for the V4L2_PIX_FMT_Y16 format

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agoAdd --offset option to select userspace buffer alignment
Laurent Pinchart [Wed, 23 Jun 2010 07:30:41 +0000 (09:30 +0200)]
Add --offset option to select userspace buffer alignment

For driver testing purpose the --offset option can be used to modify the
userspace buffers alignment. Instead of a fixed page-boundary alignment,
buffers can now be aligned to a fixed offset starting to the beginning
of the page.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>