linux-stable-rt/Documentation/DocBook/v4l
Laurent Pinchart 53e269c102 [media] media: Entities, pads and links
As video hardware pipelines become increasingly complex and
configurable, the current hardware description through v4l2 subdevices
reaches its limits. In addition to enumerating and configuring
subdevices, video camera drivers need a way to discover and modify at
runtime how those subdevices are connected. This is done through new
elements called entities, pads and links.

An entity is a basic media hardware building block. It can correspond to
a large variety of logical blocks such as physical hardware devices
(CMOS sensor for instance), logical hardware devices (a building block
in a System-on-Chip image processing pipeline), DMA channels or physical
connectors.

A pad is a connection endpoint through which an entity can interact with
other entities. Data (not restricted to video) produced by an entity
flows from the entity's output to one or more entity inputs. Pads should
not be confused with physical pins at chip boundaries.

A link is a point-to-point oriented connection between two pads, either
on the same entity or on different entities. Data flows from a source
pad to a sink pad.

Links are stored in the source entity. To make backwards graph walk
faster, a copy of all links is also stored in the sink entity. The copy
is known as a backlink and is only used to help graph traversal.

The entity API is made of three functions:

- media_entity_init() initializes an entity. The caller must provide an
array of pads as well as an estimated number of links. The links array
is allocated dynamically and will be reallocated if it grows beyond the
initial estimate.

- media_entity_cleanup() frees resources allocated for an entity. It
must be called during the cleanup phase after unregistering the entity
and before freeing it.

- media_entity_create_link() creates a link between two entities. An
entry in the link array of each entity is allocated and stores pointers
to source and sink pads.

When a media device is unregistered, all its entities are unregistered
automatically.

The code is based on Hans Verkuil <hverkuil@xs4all.nl> initial work.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:10 -03:00
..
.gitignore
biblio.xml
capture.c.xml
common.xml [media] Add multi-planar API documentation 2011-03-21 20:31:35 -03:00
compat.xml [media] DocBook: Document the removal of the old VIDIOC_*_OLD ioctls 2011-03-21 20:32:38 -03:00
controls.xml V4L/DVB: V4L Doc: correct the documentation for VIDIOC_QUERYMENU 2010-10-21 01:05:56 -02:00
crop.gif
crop.pdf
dev-capture.xml [media] Add multi-planar API documentation 2011-03-21 20:31:35 -03:00
dev-codec.xml
dev-effect.xml
dev-event.xml V4L/DVB: V4L: Events: Add documentation 2010-05-19 12:58:07 -03:00
dev-osd.xml
dev-output.xml [media] Add multi-planar API documentation 2011-03-21 20:31:35 -03:00
dev-overlay.xml
dev-radio.xml
dev-raw-vbi.xml
dev-rds.xml [media] DocBook/v4l: fix validation error in dev-rds.xml 2011-01-19 11:46:16 -02:00
dev-sliced-vbi.xml
dev-teletext.xml V4L/DVB: Documentation: update now that the vtx/videotext API has been removed 2010-10-21 01:05:48 -02:00
driver.xml
fdl-appendix.xml Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
fieldseq_bt.gif
fieldseq_bt.pdf
fieldseq_tb.gif
fieldseq_tb.pdf
func-close.xml
func-ioctl.xml [media] Fix videodev.h references at the V4L DocBook 2010-12-29 08:17:12 -02:00
func-mmap.xml [media] Add multi-planar API documentation 2011-03-21 20:31:35 -03:00
func-munmap.xml [media] Add multi-planar API documentation 2011-03-21 20:31:35 -03:00
func-open.xml
func-poll.xml
func-read.xml
func-select.xml
func-write.xml
io.xml [media] Add multi-planar API documentation 2011-03-21 20:31:35 -03:00
keytable.c.xml
libv4l.xml
lirc_device_interface.xml V4L/DVB: IR: extend interfaces to support more device settings 2010-08-08 23:43:00 -03:00
media-controller.xml [media] media: Entities, pads and links 2011-03-22 04:53:10 -03:00
pixfmt-grey.xml
pixfmt-nv12.xml
pixfmt-nv12m.xml [media] v4l: Add DocBook documentation for YU12M, NV12M image formats 2011-03-21 20:31:35 -03:00
pixfmt-nv16.xml
pixfmt-packed-rgb.xml V4L/DVB: V4L Doc: removed duplicate link 2010-10-21 01:05:57 -02:00
pixfmt-packed-yuv.xml
pixfmt-sbggr8.xml
pixfmt-sbggr16.xml
pixfmt-sgbrg8.xml
pixfmt-sgrbg8.xml
pixfmt-srggb8.xml [media] v4l: document new Bayer and monochrome pixel formats 2010-10-23 09:16:08 -02:00
pixfmt-srggb10.xml [media] v4l: document new Bayer and monochrome pixel formats 2010-10-23 09:16:08 -02:00
pixfmt-uyvy.xml
pixfmt-vyuy.xml
pixfmt-y10.xml [media] v4l: document new Bayer and monochrome pixel formats 2010-10-23 09:16:08 -02:00
pixfmt-y16.xml
pixfmt-y41p.xml
pixfmt-yuv410.xml
pixfmt-yuv411p.xml
pixfmt-yuv420.xml
pixfmt-yuv420m.xml [media] v4l: Add DocBook documentation for YU12M, NV12M image formats 2011-03-21 20:31:35 -03:00
pixfmt-yuv422p.xml
pixfmt-yuyv.xml
pixfmt-yvyu.xml
pixfmt.xml [media] v4l: Add DocBook documentation for YU12M, NV12M image formats 2011-03-21 20:31:35 -03:00
planar-apis.xml [media] Remove compatibility layer from multi-planar API documentation 2011-03-21 20:32:05 -03:00
remote_controllers.xml V4L/DVB: DocBook/media: Add LIRC DocBook to media.html 2010-08-02 15:18:40 -03:00
v4l2.xml [media] DocBook/v4l2.xml: Update version of the spec 2011-03-21 20:32:38 -03:00
v4l2grab.c.xml
vbi_525.gif
vbi_525.pdf
vbi_625.gif
vbi_625.pdf
vbi_hsync.gif
vbi_hsync.pdf
videodev2.h.xml [media] videodev2.h.xml: Update to reflect videodev2.h changes 2011-03-21 20:32:38 -03:00
vidioc-cropcap.xml
vidioc-dbg-g-chip-ident.xml
vidioc-dbg-g-register.xml
vidioc-dqevent.xml V4L/DVB: v4l spec: document new events 2010-05-19 12:58:10 -03:00
vidioc-encoder-cmd.xml
vidioc-enum-dv-presets.xml
vidioc-enum-fmt.xml [media] Add multi-planar API documentation 2011-03-21 20:31:35 -03:00
vidioc-enum-frameintervals.xml
vidioc-enum-framesizes.xml
vidioc-enumaudio.xml
vidioc-enumaudioout.xml
vidioc-enuminput.xml V4L/DVB: Documentation: fix small error in the ENUMINPUT doc 2010-05-19 12:58:53 -03:00
vidioc-enumoutput.xml
vidioc-enumstd.xml
vidioc-g-audio.xml
vidioc-g-audioout.xml
vidioc-g-crop.xml
vidioc-g-ctrl.xml
vidioc-g-dv-preset.xml V4L/DVB: V4L Doc: fix DocBook syntax errors 2010-10-21 01:05:56 -02:00
vidioc-g-dv-timings.xml V4L/DVB: V4L Doc: fix DocBook syntax errors 2010-10-21 01:05:56 -02:00
vidioc-g-enc-index.xml
vidioc-g-ext-ctrls.xml
vidioc-g-fbuf.xml
vidioc-g-fmt.xml [media] Add multi-planar API documentation 2011-03-21 20:31:35 -03:00
vidioc-g-frequency.xml
vidioc-g-input.xml
vidioc-g-jpegcomp.xml
vidioc-g-modulator.xml
vidioc-g-output.xml
vidioc-g-parm.xml
vidioc-g-priority.xml
vidioc-g-sliced-vbi-cap.xml
vidioc-g-std.xml
vidioc-g-tuner.xml
vidioc-log-status.xml
vidioc-overlay.xml
vidioc-qbuf.xml [media] Add multi-planar API documentation 2011-03-21 20:31:35 -03:00
vidioc-query-dv-preset.xml V4L/DVB: V4L Doc: fix DocBook syntax errors 2010-10-21 01:05:56 -02:00
vidioc-querybuf.xml [media] Add multi-planar API documentation 2011-03-21 20:31:35 -03:00
vidioc-querycap.xml [media] Remove compatibility layer from multi-planar API documentation 2011-03-21 20:32:05 -03:00
vidioc-queryctrl.xml V4L/DVB: V4L Doc: correct the documentation for VIDIOC_QUERYMENU 2010-10-21 01:05:56 -02:00
vidioc-querystd.xml
vidioc-reqbufs.xml
vidioc-s-hw-freq-seek.xml [media] Documentation: v4l: Add hw_seek spacing and two TUNER_RDS_CAP flags 2010-10-22 23:47:03 -02:00
vidioc-streamon.xml
vidioc-subscribe-event.xml V4L/DVB: v4l spec: document new events 2010-05-19 12:58:10 -03:00