[media] docs-rst: simplify c:type: cross references
Instead of using c:type:`struct foo <foo>`, use: struct c:type:`foo` This patch was generated via this shell script: for i in `find Documentation/media -type f`; do perl -ne 'if (m/\:c\:type\:\`struct\s+(\S+)\s*\<(\S+)\>\`/) { $s=$1; $r=$2; if ($s eq $r) { s/\:c\:type\:\`struct\s+(\S+)\s*\<(\S+)\>\`/struct :c:type:`$2`/; s/struct\s+struct/struct/; s/(struct\s+\:c\:type\:\`\S+\`)\s+structure/$1/; }} print $_' <$i >a && mv a $i; done Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
@@ -34,7 +34,7 @@ pad to a sink pad.
|
||||
Media device
|
||||
^^^^^^^^^^^^
|
||||
|
||||
A media device is represented by a :c:type:`struct media_device <media_device>`
|
||||
A media device is represented by a struct :c:type:`media_device`
|
||||
instance, defined in ``include/media/media-device.h``.
|
||||
Allocation of the structure is handled by the media device driver, usually by
|
||||
embedding the :c:type:`media_device` instance in a larger driver-specific
|
||||
@@ -47,7 +47,7 @@ and unregistered by calling :c:func:`media_device_unregister()`.
|
||||
Entities
|
||||
^^^^^^^^
|
||||
|
||||
Entities are represented by a :c:type:`struct media_entity <media_entity>`
|
||||
Entities are represented by a struct :c:type:`media_entity`
|
||||
instance, defined in ``include/media/media-entity.h``. The structure is usually
|
||||
embedded into a higher-level structure, such as
|
||||
:c:type:`v4l2_subdev` or :c:type:`video_device`
|
||||
@@ -65,10 +65,10 @@ Interfaces
|
||||
^^^^^^^^^^
|
||||
|
||||
Interfaces are represented by a
|
||||
:c:type:`struct media_interface <media_interface>` instance, defined in
|
||||
struct :c:type:`media_interface` instance, defined in
|
||||
``include/media/media-entity.h``. Currently, only one type of interface is
|
||||
defined: a device node. Such interfaces are represented by a
|
||||
:c:type:`struct media_intf_devnode <media_intf_devnode>`.
|
||||
struct :c:type:`media_intf_devnode`.
|
||||
|
||||
Drivers initialize and create device node interfaces by calling
|
||||
:c:func:`media_devnode_create()`
|
||||
@@ -77,7 +77,7 @@ and remove them by calling:
|
||||
|
||||
Pads
|
||||
^^^^
|
||||
Pads are represented by a :c:type:`struct media_pad <media_pad>` instance,
|
||||
Pads are represented by a struct :c:type:`media_pad` instance,
|
||||
defined in ``include/media/media-entity.h``. Each entity stores its pads in
|
||||
a pads array managed by the entity driver. Drivers usually embed the array in
|
||||
a driver-specific structure.
|
||||
@@ -85,8 +85,8 @@ a driver-specific structure.
|
||||
Pads are identified by their entity and their 0-based index in the pads
|
||||
array.
|
||||
|
||||
Both information are stored in the :c:type:`struct media_pad <media_pad>`,
|
||||
making the :c:type:`struct media_pad <media_pad>` pointer the canonical way
|
||||
Both information are stored in the struct :c:type:`media_pad`,
|
||||
making the struct :c:type:`media_pad` pointer the canonical way
|
||||
to store and pass link references.
|
||||
|
||||
Pads have flags that describe the pad capabilities and state.
|
||||
@@ -102,7 +102,7 @@ Pads have flags that describe the pad capabilities and state.
|
||||
Links
|
||||
^^^^^
|
||||
|
||||
Links are represented by a :c:type:`struct media_link <media_link>` instance,
|
||||
Links are represented by a struct :c:type:`media_link` instance,
|
||||
defined in ``include/media/media-entity.h``. There are two types of links:
|
||||
|
||||
**1. pad to pad links**:
|
||||
@@ -185,7 +185,7 @@ Use count and power handling
|
||||
|
||||
Due to the wide differences between drivers regarding power management
|
||||
needs, the media controller does not implement power management. However,
|
||||
the :c:type:`struct media_entity <media_entity>` includes a ``use_count``
|
||||
the struct :c:type:`media_entity` includes a ``use_count``
|
||||
field that media drivers
|
||||
can use to track the number of users of every entity for power management
|
||||
needs.
|
||||
@@ -211,11 +211,11 @@ prevent link states from being modified during streaming by calling
|
||||
The function will mark all entities connected to the given entity through
|
||||
enabled links, either directly or indirectly, as streaming.
|
||||
|
||||
The :c:type:`struct media_pipeline <media_pipeline>` instance pointed to by
|
||||
The struct :c:type:`media_pipeline` instance pointed to by
|
||||
the pipe argument will be stored in every entity in the pipeline.
|
||||
Drivers should embed the :c:type:`struct media_pipeline <media_pipeline>`
|
||||
Drivers should embed the struct :c:type:`media_pipeline`
|
||||
in higher-level pipeline structures and can then access the
|
||||
pipeline through the :c:type:`struct media_entity <media_entity>`
|
||||
pipeline through the struct :c:type:`media_entity`
|
||||
pipe field.
|
||||
|
||||
Calls to :c:func:`media_entity_pipeline_start()` can be nested.
|
||||
|
Reference in New Issue
Block a user