Introducing video device drivers – the bridge driver
The bridge driver controls the platform /USB/PCI/...
hardware that is responsible for the DMA transfers. This is the driver that handles data streaming from the device. One of the main data structures the bridge driver directly deals with is struct video_device
. This structure embeds the entire element needed to perform video streaming, and one of its first interactions with the user space is to create device files in the /dev/
directory.
The struct video_device
structure is defined in include/media/v4l2-dev.h
, which means the driver code must contain #include <media/v4l2-dev.h>
. The following is what this structure looks like from the header file where it is defined:
struct video_device { #if defined(CONFIG_MEDIA_CONTROLLER) struct media_entity entity; struct media_intf_devnode *intf_devnode; struct media_pipeline pipe; #endif ...