Commit 56683d7d authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[media] docs-rst: fix cross-references for videodev2.h



There are several broken references there, due to the conversion to
C domain. Fix them using this shell script and manually adjust what's
broken:

	# funcs is a file with the broken functions/references
	for i in $(cat funcs|sort|uniq|perl -ne 'print "$1\n" if (m/(\S+)$/)'); do
		i=${i//-/_}
		echo $i
		j=${i//_/-}
		for k in $(git grep -l "_$j:" Documentation/); do
			sed s,\_$j\:,"c\:type\:\: $i", <$k >a && mv a $k
		done
		for k in $(git grep -l "$j" Documentation/media/*.exceptions); do
			sed s,$j,":c\:type\:\`$i\`", <$k >a && mv a $k
		done
		for k in $(git grep -l "$j" Documentation/); do
			sed "s,:ref:\`$i <$j>\`,:c:type:\`$i\`," <$k >a && mv a $k
			sed "s,:ref:\`$j\`,:c:type:\`$i\`," <$k >a && mv a $k
			sed -E "s,:ref:\`(.*)<$j>\`,:c:type:\`\1<$i>\`," <$k >a && mv a $k
		done
		for k in $(git grep -l "<$j>" include/media); do
			sed -E "s,:ref:\`(.*)<$j>\`,enum \&$i," <$k >a && mv a $k
		done
	done

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent be831b34
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ struct v4l2_buffer
       -  Type of the buffer, same as struct
	  :c:type:`v4l2_format` ``type`` or struct
	  :c:type:`v4l2_requestbuffers` ``type``, set
	  by the application. See :ref:`v4l2-buf-type`
	  by the application. See :c:type:`v4l2_buf_type`

    -  .. row 3

@@ -110,7 +110,7 @@ struct v4l2_buffer

       -
       -  Indicates the field order of the image in the buffer, see
	  :ref:`v4l2-field`. This field is not used when the buffer
	  :c:type:`v4l2_field`. This field is not used when the buffer
	  contains VBI data. Drivers must set it when ``type`` refers to a
	  capture stream, applications when it refers to an output stream.

@@ -142,7 +142,7 @@ struct v4l2_buffer
       -  When ``type`` is ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` and the
	  ``V4L2_BUF_FLAG_TIMECODE`` flag is set in ``flags``, this
	  structure contains a frame timecode. In
	  :ref:`V4L2_FIELD_ALTERNATE <v4l2-field>` mode the top and
	  :c:type:`V4L2_FIELD_ALTERNATE <v4l2_field>` mode the top and
	  bottom field contain the same timecode. Timecodes are intended to
	  help video editing and are typically recorded on video tapes, but
	  also embedded in compressed formats like MPEG. This field is
@@ -162,7 +162,7 @@ struct v4l2_buffer

       -  :cspan:`3`

	  In :ref:`V4L2_FIELD_ALTERNATE <v4l2-field>` mode the top and
	  In :c:type:`V4L2_FIELD_ALTERNATE <v4l2_field>` mode the top and
	  bottom field have the same sequence number. The count starts at
	  zero and includes dropped or repeated frames. A dropped frame was
	  received by an input device but could not be stored due to lack of
@@ -187,7 +187,7 @@ struct v4l2_buffer

       -
       -  This field must be set by applications and/or drivers in
	  accordance with the selected I/O method. See :ref:`v4l2-memory`
	  accordance with the selected I/O method. See :c:type:`v4l2_memory`

    -  .. row 11

@@ -402,7 +402,7 @@ struct v4l2_plane



.. _v4l2-buf-type:
.. c:type:: v4l2_buf_type

enum v4l2_buf_type
==================
@@ -773,7 +773,7 @@ Buffer Flags



.. _v4l2-memory:
.. c:type:: v4l2_memory

enum v4l2_memory
================
+2 −2
Original line number Diff line number Diff line
@@ -52,11 +52,11 @@ this end applications initialize the ``field`` field of struct
should have the value ``V4L2_FIELD_ANY`` (0).


.. _v4l2-field:

enum v4l2_field
===============

.. c:type:: v4l2_field

.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|

.. flat-table::
+15 −15
Original line number Diff line number Diff line
@@ -438,7 +438,7 @@ This unnamed version was finally merged into Linux 2.5.46.
    ``VIDIOC_S_FMT`` and ``VIDIOC_TRY_FMT``; ioctl. The ``VIDIOC_G_WIN``
    and ``VIDIOC_S_WIN`` ioctls to prepare for a video overlay were
    removed. The ``type`` field changed to type enum
    :ref:`v4l2_buf_type <v4l2-buf-type>` and the buffer type names
    :c:type:`v4l2_buf_type` and the buffer type names
    changed as follows.


@@ -452,7 +452,7 @@ This unnamed version was finally merged into Linux 2.5.46.

	   -  Old defines

	   -  enum :ref:`v4l2_buf_type <v4l2-buf-type>`
	   -  enum :c:type:`v4l2_buf_type`

	-  .. row 2

@@ -534,7 +534,7 @@ This unnamed version was finally merged into Linux 2.5.46.


10. In struct :c:type:`v4l2_fmtdesc` a enum
    :ref:`v4l2_buf_type <v4l2-buf-type>` field named ``type`` was
    :c:type:`v4l2_buf_type` field named ``type`` was
    added as in struct :c:type:`v4l2_format`. The
    ``VIDIOC_ENUM_FBUFFMT`` ioctl is no longer needed and was removed.
    These calls can be replaced by
@@ -555,7 +555,7 @@ This unnamed version was finally merged into Linux 2.5.46.
    itself was removed.

    The interlace flags were replaced by a enum
    :ref:`v4l2_field <v4l2-field>` value in a newly added ``field``
    :c:type:`v4l2_field` value in a newly added ``field``
    field.


@@ -569,7 +569,7 @@ This unnamed version was finally merged into Linux 2.5.46.

	   -  Old flag

	   -  enum :ref:`v4l2_field <v4l2-field>`
	   -  enum :c:type:`v4l2_field`

	-  .. row 2

@@ -615,23 +615,23 @@ This unnamed version was finally merged into Linux 2.5.46.


    The color space flags were replaced by a enum
    :ref:`v4l2_colorspace <v4l2-colorspace>` value in a newly added
    :c:type:`v4l2_colorspace` value in a newly added
    ``colorspace`` field, where one of ``V4L2_COLORSPACE_SMPTE170M``,
    ``V4L2_COLORSPACE_BT878``, ``V4L2_COLORSPACE_470_SYSTEM_M`` or
    ``V4L2_COLORSPACE_470_SYSTEM_BG`` replaces ``V4L2_FMT_CS_601YUV``.

12. In struct :c:type:`v4l2_requestbuffers` the
    ``type`` field was properly defined as enum
    :ref:`v4l2_buf_type <v4l2-buf-type>`. Buffer types changed as
    :c:type:`v4l2_buf_type`. Buffer types changed as
    mentioned above. A new ``memory`` field of type enum
    :ref:`v4l2_memory <v4l2-memory>` was added to distinguish between
    :c:type:`v4l2_memory` was added to distinguish between
    I/O methods using buffers allocated by the driver or the
    application. See :ref:`io` for details.

13. In struct :c:type:`v4l2_buffer` the ``type`` field was
    properly defined as enum :ref:`v4l2_buf_type <v4l2-buf-type>`.
    properly defined as enum :c:type:`v4l2_buf_type`.
    Buffer types changed as mentioned above. A ``field`` field of type
    enum :ref:`v4l2_field <v4l2-field>` was added to indicate if a
    enum :c:type:`v4l2_field` was added to indicate if a
    buffer contains a top or bottom field. The old field flags were
    removed. Since no unadjusted system time clock was added to the
    kernel as planned, the ``timestamp`` field changed back from type
@@ -639,7 +639,7 @@ This unnamed version was finally merged into Linux 2.5.46.
    nanoseconds, to struct :c:type:`timeval`. With the addition
    of a second memory mapping method the ``offset`` field moved into
    union ``m``, and a new ``memory`` field of type enum
    :ref:`v4l2_memory <v4l2-memory>` was added to distinguish between
    :c:type:`v4l2_memory` was added to distinguish between
    I/O methods. See :ref:`io` for details.

    The ``V4L2_BUF_REQ_CONTIG`` flag was used by the V4L compatibility
@@ -667,7 +667,7 @@ This unnamed version was finally merged into Linux 2.5.46.

16. In struct :c:type:`v4l2_window` the ``x``, ``y``,
    ``width`` and ``height`` field moved into a ``w`` substructure as
    above. A ``field`` field of type %v4l2-field; was added to
    above. A ``field`` field of type :c:type:`v4l2_field` was added to
    distinguish between field and frame (interlaced) overlay.

17. The digital zoom interface, including struct
@@ -1029,7 +1029,7 @@ V4L2 in Linux 2.6.22
====================

1. Two new field orders ``V4L2_FIELD_INTERLACED_TB`` and
   ``V4L2_FIELD_INTERLACED_BT`` were added. See :ref:`v4l2-field` for
   ``V4L2_FIELD_INTERLACED_BT`` were added. See :c:type:`v4l2_field` for
   details.

2. Three new clipping/blending methods with a global or straight or
@@ -1357,8 +1357,8 @@ V4L2 in Linux 3.19
==================

1. Rewrote Colorspace chapter, added new enum
   :ref:`v4l2_ycbcr_encoding <v4l2-ycbcr-encoding>` and enum
   :ref:`v4l2_quantization <v4l2-quantization>` fields to struct
   :c:type:`v4l2_ycbcr_encoding` and enum
   :c:type:`v4l2_quantization` fields to struct
   :c:type:`v4l2_pix_format`, struct
   :c:type:`v4l2_pix_format_mplane` and
   struct :c:type:`v4l2_mbus_framefmt`.
+5 −5
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ Single-planar format structure

    -  .. row 5

       -  enum :ref:`v4l2_field <v4l2-field>`
       -  enum :c:type::`v4l2_field`

       -  ``field``

@@ -121,7 +121,7 @@ Single-planar format structure

    -  .. row 9

       -  enum :ref:`v4l2_colorspace <v4l2-colorspace>`
       -  enum :c:type:`v4l2_colorspace`

       -  ``colorspace``

@@ -170,7 +170,7 @@ Single-planar format structure

    -  .. row 12

       -  enum :ref:`v4l2_ycbcr_encoding <v4l2-ycbcr-encoding>`
       -  enum :c:type:`v4l2_ycbcr_encoding`

       -  ``ycbcr_enc``

@@ -180,7 +180,7 @@ Single-planar format structure

    -  .. row 13

       -  enum :ref:`v4l2_quantization <v4l2-quantization>`
       -  enum :c:type:`v4l2_quantization`

       -  ``quantization``

@@ -190,7 +190,7 @@ Single-planar format structure

    -  .. row 14

       -  enum :ref:`v4l2_xfer_func <v4l2-xfer-func>`
       -  enum :c:type:`v4l2_xfer_func`

       -  ``xfer_func``

+5 −5
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ describing all planes of that format.

    -  .. row 4

       -  enum :ref:`v4l2_field <v4l2-field>`
       -  enum :c:type:`v4l2_field`

       -  ``field``

@@ -96,7 +96,7 @@ describing all planes of that format.

    -  .. row 5

       -  enum :ref:`v4l2_colorspace <v4l2-colorspace>`
       -  enum :c:type:`v4l2_colorspace`

       -  ``colorspace``

@@ -131,7 +131,7 @@ describing all planes of that format.

    -  .. row 9

       -  enum :ref:`v4l2_ycbcr_encoding <v4l2-ycbcr-encoding>`
       -  enum :c:type:`v4l2_ycbcr_encoding`

       -  ``ycbcr_enc``

@@ -141,7 +141,7 @@ describing all planes of that format.

    -  .. row 10

       -  enum :ref:`v4l2_quantization <v4l2-quantization>`
       -  enum :c:type:`v4l2_quantization`

       -  ``quantization``

@@ -151,7 +151,7 @@ describing all planes of that format.

    -  .. row 11

       -  enum :ref:`v4l2_xfer_func <v4l2-xfer-func>`
       -  enum :c:type:`v4l2_xfer_func`

       -  ``xfer_func``

Loading