Age | Commit message (Collapse) | Author |
|
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>
|
|
Signed-off-by: Detlev Casanova <detlev.casanova@gmail.com>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
So don't even try.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
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>
|
|
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Use the V4L2 video device caps instead of the global caps when
available.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
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>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Memory allocated with posix_memalign() must be freed with free().
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The optional argument selects the static priority. If omitted, the
priority is set to 1.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
This improves the controls list readability.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
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>
|
|
|
|
Thanks to Stefan Steuerwald for pointing out the issue and providing an
initial patch.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
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>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Use the new buffer object to hold the buffer size and memory pointer.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Make sure the variable won't be use uninitialized and silent the
warning.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
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>
|
|
To differentiate between identically named devices, print the bus info
reported by VIDIOC_QUERYCAP.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
|
|
The long --capture and --file options have an optional argument, fix the
short versions.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
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>
|
|
Userspace buffers size needs to be passed to drivers on VIDIOC_QBUF. Set
the v4l2_buffer::length field to the size of the allocated buffer before
calling VIDIOC_QBUF.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Some devices need userspace buffers to be page-aligned. Use the
posix_memalign function instead of malloc to allocate page-aligned
buffers.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|