Commit graph

11 commits

Author SHA1 Message Date
Jan Alexander Steffens (heftig)
7e4bc6d418 v4l2deviceprovider: Ignore touch sensing devices
With GST_V4L2_USE_LIBV4L2=1, my laptop's touchpad shows up as a video
source device in gst-device-monitor, but attempting to stream from it
fails because the device doesn't actually support any video formats.

name  : Synaptics RMI4 Touch Sensor
class : Video/Source
caps  : video/x-raw, format=(string)I420, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)0, height=(int)0, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1;
        video/x-raw, format=(string)YV12, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)0, height=(int)0, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1;
        video/x-raw, format=(string)BGR, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)0, height=(int)0, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1;
        video/x-raw, format=(string)RGB, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)0, height=(int)0, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1;
properties:
        udev-probed = true
        device.bus_path = /sys/devices/rmi4-00/rmi4-00.fn54/video4linux/v4l-touch0
        sysfs.path = /sys/devices/rmi4-00/rmi4-00.fn54/video4linux/v4l-touch0
        device.subsystem = video4linux
        device.product.name = "Synaptics\ RMI4\ Touch\ Sensor"
        device.capabilities = :capture:
        device.api = v4l2
        device.path = /dev/v4l-touch0
        v4l2.device.driver = rmi4_f54
        v4l2.device.card = "Synaptics\ RMI4\ Touch\ Sensor"
        v4l2.device.bus_info = rmi4:rmi4-00.fn54
        v4l2.device.version = 265480 (0x00040d08)
        v4l2.device.capabilities = 2501902337 (0x95200001)
        v4l2.device.device_caps = 354418689 (0x15200001)
gst-launch-1.0 v4l2src device=/dev/v4l-touch0 ! ...

v4l2-ctl -d /dev/v4l-touch0 --list-formats reports:

ioctl: VIDIOC_ENUM_FMT
        Index       : 0
        Type        : Video Capture
        Pixel Format: 'TD16'
        Name        : 16-bit signed deltas

        Index       : 1
        Type        : Video Capture
        Pixel Format: 'TD08'
        Name        : 8-bit signed deltas

        Index       : 2
        Type        : Video Capture
        Pixel Format: 'TU16'
        Name        : 16-bit unsigned touch data

https://bugzilla.gnome.org/show_bug.cgi?id=789197
2017-11-06 19:34:22 -05:00
Nicolas Dufresne
bec03858fa v4l2: Merge v4l2_calls.h into gstv4l2object.h
First step of a larger cleanup, all function from v4l2_calls are in fact
methods on GstV4l2Object. This split makes the code really confusing.
This also remove no longer unused macros.
2017-07-17 20:48:28 -04:00
Nirbheek Chauhan
4048a4e137 v4l2: consistently check #ifdef HAVE_GUDEV instead of #if
Both work with autotools but they definitely don't mean the same thing, cause
problems with other build systems, and are bad form. Existence should always be
checked with #ifdef or #if defined.
2016-08-18 20:20:20 +01:00
Nicolas Dufresne
ab075b2013 v4l2provider: Fix device type detection
The type detection would lead to assertion as it would try
to create a device without having found any type for it. It
also didn't detect MPLANE devices properly.
2016-07-11 19:17:49 -04:00
Reynaldo H. Verdejo Pinochet
4b16b16aaf v4l2: use opened device caps instead of physical device ones
The same physical device can export multiple devices. In
this case, the capabilities field now contains a union of
all caps available from all exported V4L2 devices alongside
a V4L2_CAP_DEVICE_CAPS flag that should be used to decide
what capabilities to consider. In our case, we need the
ones from the exported device we are using.

https://bugzilla.gnome.org/show_bug.cgi?id=768195
2016-07-07 17:46:06 -04:00
Nirbheek Chauhan
a5369c6be3 v4l2: Don't leak v4l2 objects and props on probe errors 2016-04-04 20:31:43 +01:00
Jan Schmidt
d34910bf30 v4l2: Don't free props structure twice.
gst_v4l2_device_provider_probe_device() frees the passed props
structure, don't free it again in the caller.
2016-01-20 18:23:37 +11:00
Wim Taymans
5fe9a59842 v4l2deviceprovider: add properties to the device
Add properties to the device with exactly the same keys and sematics
as what pulseaudio uses as property keys.

Also handle the case when a device is probed manually and not through gudev.

https://bugzilla.gnome.org//show_bug.cgi?id=759780
2015-12-29 11:25:36 +00:00
Nirbheek Chauhan
5f720cc3cb v4l2: fix double-unref in the v4l2 device provider 2015-10-28 19:09:28 +00:00
Tim-Philipp Müller
f79de9a420 v4l2: fix compiler warnings when compiling with -DG_DISABLE_ASSERT
Compiler complains about uninitialised variables in the impossible
'default' code path in device provider source/sink switch-case.
2014-06-29 17:06:11 +01:00
Olivier Crête
a9c385686a Rename GstDeviceMonitor to GstDeviceProvider 2014-06-26 14:57:36 -04:00
Renamed from sys/v4l2/gstv4l2devicemonitor.c (Browse further)