platform/upstream/v4l-utils.git
13 years agov4l2-ctl: fix -w support.
Hans Verkuil [Sat, 2 Jul 2011 10:04:36 +0000 (12:04 +0200)]
v4l2-ctl: fix -w support.

The -w option (use the libv4l2 wrapper library) never worked since the v4l2_open
and v4l2_close functions were never called. Fixed this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
13 years agov4l2-ctl: print the v4l2_fmtdesc flags field.
Hans Verkuil [Sat, 2 Jul 2011 10:01:59 +0000 (12:01 +0200)]
v4l2-ctl: print the v4l2_fmtdesc flags field.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
13 years agov4l2-ctl: move the doioctl_name function up to a more logical place.
Hans Verkuil [Sat, 2 Jul 2011 10:00:01 +0000 (12:00 +0200)]
v4l2-ctl: move the doioctl_name function up to a more logical place.

doioctl_name was defined fairly late in the source, limiting where it
could be used. Move it up.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
13 years agov4l2-compliance: add VIDIOC_SLICED_VBI_CAP compliance test.
Hans Verkuil [Tue, 28 Jun 2011 10:07:26 +0000 (12:07 +0200)]
v4l2-compliance: add VIDIOC_SLICED_VBI_CAP compliance test.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
13 years agov4l2-compliance: add file/line for all fails. Do some cleanups.
Hans Verkuil [Mon, 27 Jun 2011 12:47:47 +0000 (14:47 +0200)]
v4l2-compliance: add file/line for all fails. Do some cleanups.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
13 years agov4l2-compliance: add VIDIOC_G_FBUF compliance test.
Hans Verkuil [Mon, 27 Jun 2011 12:25:10 +0000 (14:25 +0200)]
v4l2-compliance: add VIDIOC_G_FBUF compliance test.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
13 years agov4l2-compliance: add VIDIOC_G_FMT compliance tests.
Hans Verkuil [Mon, 27 Jun 2011 09:36:09 +0000 (11:36 +0200)]
v4l2-compliance: add VIDIOC_G_FMT compliance tests.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
13 years agov4l2-compliance: add VIDIOC_ENUM_FRAMESIZES and VIDIOC_ENUM_FRAMEINTERVALS tests.
Hans Verkuil [Fri, 24 Jun 2011 10:34:28 +0000 (12:34 +0200)]
v4l2-compliance: add VIDIOC_ENUM_FRAMESIZES and VIDIOC_ENUM_FRAMEINTERVALS tests.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
13 years agolibv4lconvert.c: fix memset bug discovered by v4l2-compliance.
Hans Verkuil [Thu, 23 Jun 2011 14:13:37 +0000 (16:13 +0200)]
libv4lconvert.c: fix memset bug discovered by v4l2-compliance.

The size of the reserved array is 4 * sizeof(u32) = 16. So only the first
element is now zeroed. Use sizeof(reserved) instead.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
13 years agov4l2-compliance: add VIDIOC_ENUM_FMT tests.
Hans Verkuil [Thu, 23 Jun 2011 14:13:18 +0000 (16:13 +0200)]
v4l2-compliance: add VIDIOC_ENUM_FMT tests.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
13 years agov4l2-compliance: fix QUERYCTRL test when there are no controls.
Hans Verkuil [Wed, 22 Jun 2011 14:27:52 +0000 (16:27 +0200)]
v4l2-compliance: fix QUERYCTRL test when there are no controls.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
13 years agoget_media_devices: white space fixup
Hans de Goede [Sat, 18 Jun 2011 14:03:10 +0000 (16:03 +0200)]
get_media_devices: white space fixup

My bad.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoget_media_devices: Get rid if asprintf
Hans de Goede [Sat, 18 Jun 2011 13:58:43 +0000 (15:58 +0200)]
get_media_devices: Get rid if asprintf

It is a GNU extension and thus not declared in the std headers when
compiling without _GNU_SOURCE

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoget_media_devices: Consider multiple functions on the same pci dev as one dev
Hans de Goede [Sat, 18 Jun 2011 13:42:22 +0000 (15:42 +0200)]
get_media_devices: Consider multiple functions on the same pci dev as one dev

This fixes get_media_devices not seeing the video and the alsa input on
my bt878 card as associated devices.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoget_media_devices: Only strip usb interface from usb device path
Hans de Goede [Sat, 18 Jun 2011 13:38:08 +0000 (15:38 +0200)]
get_media_devices: Only strip usb interface from usb device path

The old code would strip to much, leading to different usb devices on the
same hub getting seen as the same device.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoget_media_devices: Don't complain if there are no devices of a certain class
Hans de Goede [Sat, 18 Jun 2011 13:29:45 +0000 (15:29 +0200)]
get_media_devices: Don't complain if there are no devices of a certain class

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoget_meda_devices: more robust detection of device bus
Hans de Goede [Sat, 18 Jun 2011 13:27:57 +0000 (15:27 +0200)]
get_meda_devices: more robust detection of device bus

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoget_media_device: Continue with the next dir entry on a sysfs parse error
Hans de Goede [Sat, 18 Jun 2011 13:13:40 +0000 (15:13 +0200)]
get_media_device: Continue with the next dir entry on a sysfs parse error

Rather then completely aborting the sysfs-scanning.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoget_media_devices: Properly canonicalize names
Hans de Goede [Sat, 18 Jun 2011 11:52:37 +0000 (13:52 +0200)]
get_media_devices: Properly canonicalize names

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoget_medida_devices: use strdup
Hans de Goede [Sat, 18 Jun 2011 11:39:40 +0000 (13:39 +0200)]
get_medida_devices: use strdup

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoget_meda_devices: Use PATH_MAX rather then some arbritary limit
Hans de Goede [Sat, 18 Jun 2011 11:36:21 +0000 (13:36 +0200)]
get_meda_devices: Use PATH_MAX rather then some arbritary limit

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoget_media_devices: Remove unnecessary class_node parsing
Hans de Goede [Sat, 18 Jun 2011 11:29:15 +0000 (13:29 +0200)]
get_media_devices: Remove unnecessary class_node parsing

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoAdd support for SE401 pixelformat
Hans de Goede [Tue, 7 Jun 2011 14:38:31 +0000 (16:38 +0200)]
Add support for SE401 pixelformat

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agov4l2-ctl: if V4L2_CTRL_DRIVER_PRIV(id) then use EXT_CTRLS API.
Hans Verkuil [Tue, 7 Jun 2011 14:47:05 +0000 (16:47 +0200)]
v4l2-ctl: if V4L2_CTRL_DRIVER_PRIV(id) then use EXT_CTRLS API.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
13 years agov4l2-ctl: Add support for multi-planar API
Hans Verkuil [Wed, 8 Jun 2011 12:44:41 +0000 (14:44 +0200)]
v4l2-ctl: Add support for multi-planar API

Based on a patch from Sylwester Nawrocki <snjw23@gmail.com>.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
13 years agovideodev2.h: update to latest version.
Hans Verkuil [Wed, 8 Jun 2011 11:31:13 +0000 (13:31 +0200)]
videodev2.h: update to latest version.

Needed for the multiplanar support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
13 years agolibv4l: autogain tweaks
Hans de Goede [Sat, 4 Jun 2011 09:09:23 +0000 (11:09 +0200)]
libv4l: autogain tweaks

-Take a bit larger steps when modifying very fine grain controls, even when
 steps < 3
-Don't do step multiplication when changing exposure in the exposure low
 range

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoFix the highest bit of IR keytable util
Darren Tucker [Sat, 4 Jun 2011 01:50:07 +0000 (22:50 -0300)]
Fix the highest bit of IR keytable util

I have a Nuvoton IR interface (part of an ION board) which has scancodes
with the high bit set, and ir-keytable won't accept these (since strtol
doesn't).  Since "codes" is an unsigned, using strtoul fixes this.
I also added a signedness fix in debug output and fixed a typo.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agokeytable: fix segfault when RC driver's module_name is null
Cédric Schieli [Sat, 28 May 2011 09:35:16 +0000 (09:35 +0000)]
keytable: fix segfault when RC driver's module_name is null

Some dvb-usb drivers do not set a proper module_name in their rc.core struct
(e.g. the ttusb2 module and various dib0700 submodules as of 2.6.39).
Auto-load mode was segfaulting if trying to match those drivers with a * value.

Signed-off-by: Cédric Schieli <cschieli@gmail.com>
13 years agoRelease 0.8.4 v4l-utils-0.8.4
Hans de Goede [Wed, 1 Jun 2011 10:47:02 +0000 (12:47 +0200)]
Release 0.8.4

13 years agoAll: update FSF address to their latest address
Hans de Goede [Wed, 1 Jun 2011 11:08:40 +0000 (13:08 +0200)]
All: update FSF address to their latest address

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoqv4l2: Add rules to Makefile to actually install the desktop and icon file
Hans de Goede [Wed, 1 Jun 2011 10:55:05 +0000 (12:55 +0200)]
qv4l2: Add rules to Makefile to actually install the desktop and icon file

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoqv4l2.desktop: fix desktop-file-validate warnings
Hans de Goede [Wed, 1 Jun 2011 10:51:19 +0000 (12:51 +0200)]
qv4l2.desktop: fix desktop-file-validate warnings

[hans@shalem v4l-utils]$ desktop-file-validate utils/qv4l2/qv4l2.desktop
utils/qv4l2/qv4l2.desktop: warning: key "Encoding" in group "Desktop Entry" is deprecated
utils/qv4l2/qv4l2.desktop: warning: value "Application;AudioVideo;" for key "Categories" in group "Desktop Entry" contains a deprecated value "Application"

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4l: Remove lenovo x201 from upside down list
Hans de Goede [Wed, 1 Jun 2011 10:14:12 +0000 (12:14 +0200)]
libv4l: Remove lenovo x201 from upside down list

It is a laptop / tablet convertible, and the webcam is not upside
down when used normally in laptop mode, when holding it upside down
in tablet mode, yes the webcam will be upside down, but that does not count.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoget_media_devices: Add types for sound sequencer/timer
Mauro Carvalho Chehab [Sun, 29 May 2011 14:18:44 +0000 (11:18 -0300)]
get_media_devices: Add types for sound sequencer/timer

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: Prints also device major/minor
Mauro Carvalho Chehab [Sun, 29 May 2011 14:16:18 +0000 (11:16 -0300)]
get_media_devices: Prints also device major/minor

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agov4l2-sysfs-path: Allow choosing the display mode
Mauro Carvalho Chehab [Sun, 29 May 2011 14:13:34 +0000 (11:13 -0300)]
v4l2-sysfs-path: Allow choosing the display mode

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: don't discard virtual devices
Mauro Carvalho Chehab [Sun, 29 May 2011 13:58:51 +0000 (10:58 -0300)]
get_media_devices: don't discard virtual devices

Instead of discarding virtual devices, just consider each of
them as a new hardware.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: Constify arguments
Mauro Carvalho Chehab [Sun, 29 May 2011 13:54:09 +0000 (10:54 -0300)]
get_media_devices: Constify arguments

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: drop a note that some alsa interfaces are missing
Mauro Carvalho Chehab [Sun, 29 May 2011 13:44:47 +0000 (10:44 -0300)]
get_media_devices: drop a note that some alsa interfaces are missing

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: Add the remaining DVB nodes
Mauro Carvalho Chehab [Sun, 29 May 2011 13:33:59 +0000 (10:33 -0300)]
get_media_devices: Add the remaining DVB nodes

From drivers/media/dvb/dvb-core/dvbdev.c

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: Implement the remaining V4L nodes
Mauro Carvalho Chehab [Sun, 29 May 2011 13:26:30 +0000 (10:26 -0300)]
get_media_devices: Implement the remaining V4L nodes

in order to match drivers/media/video/v4l2-dev.c

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: Reserve space for new devices on each type
Mauro Carvalho Chehab [Sun, 29 May 2011 13:17:47 +0000 (10:17 -0300)]
get_media_devices: Reserve space for new devices on each type

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoutils/libmedia_dev/README: add an example to list all video nodes
Mauro Carvalho Chehab [Sun, 29 May 2011 00:55:09 +0000 (21:55 -0300)]
utils/libmedia_dev/README: add an example to list all video nodes

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: Add a proper documentation about the library
Mauro Carvalho Chehab [Sun, 29 May 2011 00:51:59 +0000 (21:51 -0300)]
get_media_devices: Add a proper documentation about the library

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: increment API version
Mauro Carvalho Chehab [Sun, 29 May 2011 00:12:10 +0000 (21:12 -0300)]
get_media_devices: increment API version

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: get associated devices from a filestream
Mauro Carvalho Chehab [Sun, 29 May 2011 00:04:51 +0000 (21:04 -0300)]
get_media_devices: get associated devices from a filestream

Sometimes, it is useful to get the alsa device associated with
a filestream. A new function adds this feature, using fstat()
call: fget_associated_device().

Tested with the code bellow:

int fd = open("/dev/video0", O_RDWR);
if (fd < 0)
perror("Couldn't open");
char *alsa = fget_associated_device(md, NULL, MEDIA_SND_CAP, fd, MEDIA_V4L_VIDEO);
printf("\n\nAlsa device = %s\n", alsa);
close(fd);

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: code cleanup
Mauro Carvalho Chehab [Sat, 28 May 2011 21:02:37 +0000 (18:02 -0300)]
get_media_devices: code cleanup

whitespacing & coding style fixes, and a few trivial cleanups.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: While not too late, change enum definitions
Mauro Carvalho Chehab [Sat, 28 May 2011 20:53:22 +0000 (17:53 -0300)]
get_media_devices: While not too late, change enum definitions

Enum definitions like "NONE" and "UNKNOWN" are dangerous, as
they may conflict with something else. So add MEDIA_ prefix
to all enums to avoid it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: Extract major/minor info from the uevent nodes
Mauro Carvalho Chehab [Sat, 28 May 2011 20:45:25 +0000 (17:45 -0300)]
get_media_devices: Extract major/minor info from the uevent nodes

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: fix get_associated_device() logic
Mauro Carvalho Chehab [Sat, 28 May 2011 20:00:33 +0000 (17:00 -0300)]
get_media_devices: fix get_associated_device() logic

If both last_seek and seek_device is specified and there are multiple
matches, an endless loop were happening.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agov4l2-sysfs-path: Show devices ordered by the video node number
Mauro Carvalho Chehab [Sat, 28 May 2011 19:49:57 +0000 (16:49 -0300)]
v4l2-sysfs-path: Show devices ordered by the video node number

Instead of calling the default print function, it implements its
own logic that will print all devices video ordered, plus the
audio playback devices. The output will be something like:

Video device: video0
vbi: vbi0
dvb frontend: dvb0.frontend0
dvb demux: dvb0.demux0
dvb dvr: dvb0.dvr0
dvb net: dvb0.net0
sound card: hw:2
pcm capture: hw:2,0
mixer: hw:2
Video device: video1
sound card: hw:1
pcm capture: hw:1,0
mixer: hw:1
Alsa playback device(s): hw:0,0 hw:0,1

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: fix device enumberation routines
Mauro Carvalho Chehab [Sat, 28 May 2011 19:40:57 +0000 (16:40 -0300)]
get_media_devices: fix device enumberation routines

When called inside a loop, the get_* functions weren't working.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: Use a more generic way to get associated devices
Mauro Carvalho Chehab [Sat, 28 May 2011 16:13:01 +0000 (13:13 -0300)]
get_media_devices: Use a more generic way to get associated devices

Instead of having a method that works just for alsa, extend them
to be generic enough to show all types of devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: Improve usecase example and put it at the beginning
Mauro Carvalho Chehab [Sat, 28 May 2011 14:09:00 +0000 (11:09 -0300)]
get_media_devices: Improve usecase example and put it at the beginning

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: Discard path when handling a video node name
Mauro Carvalho Chehab [Sat, 28 May 2011 14:08:31 +0000 (11:08 -0300)]
get_media_devices: Discard path when handling a video node name

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: fix a typo and remove an unused var
Mauro Carvalho Chehab [Sat, 28 May 2011 13:54:00 +0000 (10:54 -0300)]
get_media_devices: fix a typo and remove an unused var

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: Make internal structs opaque
Mauro Carvalho Chehab [Sat, 28 May 2011 13:48:21 +0000 (10:48 -0300)]
get_media_devices: Make internal structs opaque

The internal structs used to retrieve sysfs information were
designed to fulfill internal design requirements in a way that
the data is easily stored inside it. They're not meant to
be used outside the library. Other methods will export the
retrieved information in a way that they'll be useful for
the applications.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agolibv4l: update upside down device list
Hans de Goede [Sat, 28 May 2011 08:10:00 +0000 (10:10 +0200)]
libv4l: update upside down device list

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoqv4l2: filter unknown control types.
Hans Verkuil [Fri, 27 May 2011 09:59:51 +0000 (11:59 +0200)]
qv4l2: filter unknown control types.

qv4l2 would crash if it encounters a control of an unknown (new?) type.

Skip such controls instead.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
13 years agoqv4l2: fix handling of private controls
Hans Verkuil [Fri, 27 May 2011 09:53:10 +0000 (11:53 +0200)]
qv4l2: fix handling of private controls

Extended controls should be used for the user class if there are string
controls, integer64 controls or if V4L2_CTRL_DRIVER_PRIV(id) is true.

That last test was missing.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
13 years agov4l2-compliance: fix S_CTRL test for read-only controls.
Hans Verkuil [Fri, 27 May 2011 09:49:40 +0000 (11:49 +0200)]
v4l2-compliance: fix S_CTRL test for read-only controls.

Fix a faulty failure report for setting read-only controls with
S_CTRL that correctly returned -EACCES.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
13 years agolibv4l: update upside down device list
Hans de Goede [Fri, 27 May 2011 09:39:24 +0000 (11:39 +0200)]
libv4l: update upside down device list

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4l: update upside down device list
Hans de Goede [Thu, 26 May 2011 10:46:09 +0000 (12:46 +0200)]
libv4l: update upside down device list

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibmedia_dev: Comment the install methods for now
Mauro Carvalho Chehab [Tue, 24 May 2011 10:57:14 +0000 (07:57 -0300)]
libmedia_dev: Comment the install methods for now

As a new version of v4l-utils is about to be released, for now, comment
the install procedure for the new library, as it is just too new.

I'd like to keep this library being tested for a while before exporting
it on a version release.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agolibmedia_dev: Create a new library to handle media devices
Mauro Carvalho Chehab [Tue, 24 May 2011 10:41:15 +0000 (07:41 -0300)]
libmedia_dev: Create a new library to handle media devices

The libmedia_dev library contains API's meant to be used by media
applications that needs to share some common code.

For now, it contains the routines that enumerates the media devices
and provides the associated audio devices that are needed in order
to allow playing audio for a given V4L source.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoAdd proper documentation to get_media_devices API
Mauro Carvalho Chehab [Tue, 24 May 2011 10:35:40 +0000 (07:35 -0300)]
Add proper documentation to get_media_devices API

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: Fix a small typo at alsa hw descriptors
Mauro Carvalho Chehab [Mon, 23 May 2011 13:07:12 +0000 (10:07 -0300)]
get_media_devices: Fix a small typo at alsa hw descriptors

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoAdd an install target to libv4l2util
Mauro Carvalho Chehab [Mon, 23 May 2011 10:00:00 +0000 (07:00 -0300)]
Add an install target to libv4l2util

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: add a function to provide an audio output device
Mauro Carvalho Chehab [Mon, 23 May 2011 09:43:01 +0000 (06:43 -0300)]
get_media_devices: add a function to provide an audio output device

Provide the first audio output device not related to a v4l device, assuming
that the sound card is a different device. If none found, just get any
output device, even it inside the same board that provides video4linux
interface.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: Provide alsa names as expected by userspace
Mauro Carvalho Chehab [Mon, 23 May 2011 09:34:04 +0000 (06:34 -0300)]
get_media_devices: Provide alsa names as expected by userspace

Instead of using card0, controlC2, etc, use the proper hw:0, hw:2, etc
names, as expected by userspace.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: Find an alsa capture device associated with a video node
Mauro Carvalho Chehab [Mon, 23 May 2011 09:24:21 +0000 (06:24 -0300)]
get_media_devices: Find an alsa capture device associated with a video node

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: don't bail out if one of the clases is not available
Mauro Carvalho Chehab [Mon, 23 May 2011 09:11:31 +0000 (06:11 -0300)]
get_media_devices: don't bail out if one of the clases is not available

For now, it requires that all dvb, v4l and sound classes to be available,
otherwise, an error happens.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoget_media_devices: return alsa hw as expected by alsa utilities
Mauro Carvalho Chehab [Mon, 23 May 2011 09:10:14 +0000 (06:10 -0300)]
get_media_devices: return alsa hw as expected by alsa utilities

Instead of using the internal HWC?D? representation, convert alsa hw type
into hw:?.?. This makes easier for other utils to use it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agolibv4l: update upside down device list
Hans de Goede [Mon, 23 May 2011 08:06:47 +0000 (10:06 +0200)]
libv4l: update upside down device list

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agov4l2-sysfs-path: Rewrite it to get better results
Mauro Carvalho Chehab [Sun, 22 May 2011 16:16:32 +0000 (13:16 -0300)]
v4l2-sysfs-path: Rewrite it to get better results

From the old v4l2-sysfs-path, we've kept just the name. The
entire old code were sent to /dev/null. On its place, a new
code were added, that reads direcly the /sys/class/<subsystem>
device links, and associates devices from video4linux, alsa
and dvb subsystems.

Also, to make easier to be used inside applications, the
discover methods were added under a LGPL library. The end
result is that v4l2-sysfs-path is now just 3 function calls.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agolibv4l: update upside down device list
Hans de Goede [Fri, 20 May 2011 11:40:55 +0000 (13:40 +0200)]
libv4l: update upside down device list

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4lconvert: Add Y10B, a 10 bpp bit-packed greyscale format.
Antonio Ospite [Fri, 20 May 2011 07:43:50 +0000 (09:43 +0200)]
libv4lconvert: Add Y10B, a 10 bpp bit-packed greyscale format.

Add a 10 bits per pixel greyscale format in a bit-packed array representation,
naming it Y10B. Such pixel format is supplied for instance by the Kinect
sensor device.

Cc: Steven Toth<stoth@kernellabs.com>
Signed-off-by: Antonio Ospite<ospite@studenti.unina.it>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4l: update upside down device table
Hans de Goede [Fri, 20 May 2011 07:23:00 +0000 (09:23 +0200)]
libv4l: update upside down device table

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4l: update TODO
Hans de Goede [Tue, 17 May 2011 19:27:16 +0000 (21:27 +0200)]
libv4l: update TODO

13 years agolibv4l: update upside down device table
Hans de Goede [Tue, 17 May 2011 18:59:38 +0000 (20:59 +0200)]
libv4l: update upside down device table

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4l: Add error handling to libjpeg calling code
Hans de Goede [Sat, 14 May 2011 15:15:25 +0000 (17:15 +0200)]
libv4l: Add error handling to libjpeg calling code

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4l: use libjpeg[-turbo] for decompressing jpeg-s
Hans de Goede [Sat, 14 May 2011 05:29:03 +0000 (07:29 +0200)]
libv4l: use libjpeg[-turbo] for decompressing jpeg-s

libjpeg-turbo is much faster then tinyjpeg, and with modern cameras
doing 1920x1080@30fps with jpeg compression, we really need that speed.

Todo: libjpeg error handling (fixed by next patch in series)

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4l: Move tinyjpeg invocation to helper function
Hans de Goede [Fri, 13 May 2011 13:51:33 +0000 (15:51 +0200)]
libv4l: Move tinyjpeg invocation to helper function

Preperation patch for adding support for decoding JPEG-s using libjpeg
(which is faster).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4lconvert: s/jdev/tinyjpeg/
Hans de Goede [Fri, 13 May 2011 13:53:43 +0000 (15:53 +0200)]
libv4lconvert: s/jdev/tinyjpeg/

Preperation patch for adding support for decoding JPEG-s using libjpeg
(which is faster).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4l: detect (usb) connection speed
Hans de Goede [Wed, 11 May 2011 19:23:23 +0000 (21:23 +0200)]
libv4l: detect (usb) connection speed

And use it for determining the optimal source format.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoqv4l2: remove some redundancy from inputChanged
Hans de Goede [Tue, 10 May 2011 08:55:56 +0000 (10:55 +0200)]
qv4l2: remove some redundancy from inputChanged

updateAudioInput already does a g_audio and m_audioInput->setCurrentIndex,
no need to do it twice.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoqv4l2: m_freq listens to valueChanged block it to avoid recursion
Hans de Goede [Tue, 10 May 2011 08:52:47 +0000 (10:52 +0200)]
qv4l2: m_freq listens to valueChanged block it to avoid recursion

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoqv4l2: Add and hookup set / get interval code
Hans de Goede [Mon, 9 May 2011 20:36:30 +0000 (22:36 +0200)]
qv4l2: Add and hookup set / get interval code

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoqv4l2: always update capture format after a set cap fmt
Hans de Goede [Mon, 9 May 2011 18:37:48 +0000 (20:37 +0200)]
qv4l2: always update capture format after a set cap fmt

Changing just the width / height may also change other fmt settings,
atleast it will influence the available intervals.

Also:
* only do a s_fmt if the preceeding try_fmt succeeded
* even  update capture format if the try or s_fmt failed, so that the
  ui element gets restored to the current setting

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agoqv4l2: general-tab: make sure m_width and height get a proper init value
Hans de Goede [Mon, 9 May 2011 18:23:14 +0000 (20:23 +0200)]
qv4l2: general-tab: make sure m_width and height get a proper init value

m_width and m_height were not getting assigned any meaningful value on
startup, this causes the enum_frameintervals call inframeIntervalChanged
to fail. This patch makes sure that m_width and m_height get assigned
the actual width and height on startup, by setting them from updateVidCapFormat
this also removes the need for passing the actual width and height into
updateFrameSize and updateFrameInterval, they can now simply use
m_width and m_height since these are now always accurate.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4l: Adjust src fmt for fps when app does a S_PARM with new fps
Hans de Goede [Mon, 9 May 2011 18:01:26 +0000 (20:01 +0200)]
libv4l: Adjust src fmt for fps when app does a S_PARM with new fps

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4l: s/v4l2_pix_fmt_identical/v4l2_pix_fmt_compat/
Hans de Goede [Mon, 9 May 2011 11:56:14 +0000 (13:56 +0200)]
libv4l: s/v4l2_pix_fmt_identical/v4l2_pix_fmt_compat/

The current identical function checks for compat pix formats, not for identical
ones (the padding may be different), so rename it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4l: Honor V4L2_DISABLE_CONVERSION flag for TRY_FMT ioctls
Hans de Goede [Tue, 10 May 2011 07:44:06 +0000 (09:44 +0200)]
libv4l: Honor V4L2_DISABLE_CONVERSION flag for TRY_FMT ioctls

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4l: rewrite src format selection algorithm
Hans de Goede [Mon, 9 May 2011 08:14:32 +0000 (10:14 +0200)]
libv4l: rewrite src format selection algorithm

When multiple src formats are available for the best resolution match
we need to decide which one to use. The old algorithm was rather crude:
- it depended on the formats being sorted in a certain way in the
  source formats array
- it did not really take bus bandwidth / fps into account other then
  always preferring compressed formats except for resolutions of quarter
  CIF and lower
- it did not differentiate between converting to YUV420 or to RGB32, while
  some src formats are clearly a better match for one then for the other

This rewritten src format ranking algorithm takes all of the above into
account.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4l: Make the supported_src_formats bitfield 64 bits
Hans de Goede [Sun, 8 May 2011 17:28:12 +0000 (19:28 +0200)]
libv4l: Make the supported_src_formats bitfield 64 bits

We've been having > 32 src formats for a while now, so we really should
have done this earlier already ...

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4l: add support for M420 pixel-format
Hans de Goede [Sun, 8 May 2011 17:25:08 +0000 (19:25 +0200)]
libv4l: add support for M420 pixel-format

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agolibv4l: Webcam image upside down on Asus Eee PC T101MT (13d3:5122)
Hans de Goede [Sun, 8 May 2011 10:12:47 +0000 (12:12 +0200)]
libv4l: Webcam image upside down on Asus Eee PC T101MT (13d3:5122)

The caption pretty much says it all. Owing to different IDs, the flags
for similar Asus products don't cut in.
Originally reported for Ubuntu at
https://bugs.launchpad.net/ubuntu/+source/libv4l/+bug/774123.

Signed-off-by: Stefan Löffler <st.loeffler@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 years agokeytable: Allow override of manpage installation directory
Robby Workman [Tue, 12 Apr 2011 14:26:57 +0000 (11:26 -0300)]
keytable: Allow override of manpage installation directory

This creates MANDIR in Make.rules and keeps the preexisting
default of $(PREFIX)/share/man, but allows packagers to easily
override via e.g. "make MANDIR=/usr/man"

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agokeytable: Install udev rules to /lib/udev/ instead of /etc/udev
Robby Workman [Tue, 3 May 2011 04:28:37 +0000 (01:28 -0300)]
keytable: Install udev rules to /lib/udev/ instead of /etc/udev

In moderately recent versions of udev (since 125 in 7/2008),
packages should install rules files to /lib/udev/rules.d/
instead of /etc/udev/rules.d/, as /etc/udev/rules.d/ is now
for generated rules and overrides of the packaged rules.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>