Commit graph

4 commits

Author SHA1 Message Date
Ting-Wei Lan
d10e2381c7 v4l2codecs: Fix compilation error on FreeBSD
This commit does the following things to fix compilation on FreeBSD:

1. Add required typedefs to linux/types-compat.h.
2. Remove unnecessary include linux/ioctl.h and replace linux/types.h
   with linux/types-compat.h. Both files do not exist on FreeBSD.
3. Check the header including makedev macro. FreeBSD does not have
   sys/sysmacros.h, and including it unconditionally causes error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1259>
2020-05-11 15:17:31 +00:00
Víctor Manuel Jáquez Leal
691fdb85c0 v4l2codecs: fix v4l2codecdevice get type
Currently the GType of v4l2codecdevice is hardcoded to zero, but it
rather should be delivered by the GType system.
2020-04-10 21:05:19 +02:00
Nicolas Dufresne
8f0ceba251 v4l2codecs: Fix FD leak during device enumeration
This was revealed by Coverity.

CID 1461248
2020-04-08 20:25:44 +00:00
Nicolas Dufresne
6d9c98ae5a v4l2codecs: Add device enumeration
This introduces a GstV4L2CodecDevice structure and helper to retrieve a
list of CODEC device drivers. In order to find the device driver we
enumerate all media devices with UDEV. We then get the media controller
topology and locate a entity with function encoder or decoder and make
sure it is linked to two V4L2 IO entity pointing to the same device
node.
2020-03-31 09:34:05 -04:00