Skip to content

Commit 848d103

Browse files
committed
[media] fix broken references on dvb/video*rst
Trivially fix those broken references, by copying the structs fron the header, just like other API documentation at the DVB side. This doesn't have the level of quality used at the V4L2 side of the API, but, as this documents a deprecated API, used only by av7110 driver, it doesn't make much sense to invest time making it better. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
1 parent 189d724 commit 848d103

13 files changed

Lines changed: 159 additions & 6 deletions

‎Documentation/media/uapi/dvb/video-command.rst‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,36 @@ subset of the ``v4l2_decoder_cmd`` struct, so refer to the
5959
:ref:`VIDIOC_DECODER_CMD` documentation for
6060
more information.
6161
62+
.. c:type:: struct video_command
63+
64+
.. code-block:: c
65+
66+
/* The structure must be zeroed before use by the application
67+
This ensures it can be extended safely in the future. */
68+
struct video_command {
69+
__u32 cmd;
70+
__u32 flags;
71+
union {
72+
struct {
73+
__u64 pts;
74+
} stop;
75+
76+
struct {
77+
/* 0 or 1000 specifies normal speed,
78+
1 specifies forward single stepping,
79+
-1 specifies backward single stepping,
80+
>1: playback at speed/1000 of the normal speed,
81+
<-1: reverse playback at (-speed/1000) of the normal speed. */
82+
__s32 speed;
83+
__u32 format;
84+
} play;
85+
86+
struct {
87+
__u32 data[16];
88+
} raw;
89+
};
90+
};
91+
6292
6393
Return Value
6494
------------

‎Documentation/media/uapi/dvb/video-get-event.rst‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,23 @@ included in the exceptfds argument, and for poll(), POLLPRI should be
6464
specified as the wake-up condition. Read-only permissions are sufficient
6565
for this ioctl call.
6666
67+
.. c:type:: video_event
68+
69+
.. code-block:: c
70+
71+
struct video_event {
72+
__s32 type;
73+
#define VIDEO_EVENT_SIZE_CHANGED 1
74+
#define VIDEO_EVENT_FRAME_RATE_CHANGED 2
75+
#define VIDEO_EVENT_DECODER_STOPPED 3
76+
#define VIDEO_EVENT_VSYNC 4
77+
__kernel_time_t timestamp;
78+
union {
79+
video_size_t size;
80+
unsigned int frame_rate; /* in frames per 1000sec */
81+
unsigned char vsync_field; /* unknown/odd/even/progressive */
82+
} u;
83+
};
6784
6885
Return Value
6986
------------

‎Documentation/media/uapi/dvb/video-get-navi.rst‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ VIDEO_GET_NAVI
1616
Synopsis
1717
--------
1818

19-
.. c:function:: int ioctl(fd, VIDEO_GET_NAVI , video_navi_pack_t *navipack)
19+
.. c:function:: int ioctl(fd, VIDEO_GET_NAVI , struct video_navi_pack *navipack)
2020
:name: VIDEO_GET_NAVI
2121
2222
@@ -54,6 +54,14 @@ This ioctl returns navigational information from the DVD stream. This is
5454
especially needed if an encoded stream has to be decoded by the
5555
hardware.
5656
57+
.. c:type:: video_navi_pack
58+
59+
.. code-block::c
60+
61+
typedef struct video_navi_pack {
62+
int length; /* 0 ... 1024 */
63+
__u8 data[1024];
64+
} video_navi_pack_t;
5765
5866
Return Value
5967
------------

‎Documentation/media/uapi/dvb/video-get-size.rst‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ Description
5252
5353
This ioctl returns the size and aspect ratio.
5454
55+
.. c:type:: video_size_t
56+
57+
.. code-block::c
58+
59+
typedef struct {
60+
int w;
61+
int h;
62+
video_format_t aspect_ratio;
63+
} video_size_t;
64+
5565
5666
Return Value
5767
------------

‎Documentation/media/uapi/dvb/video-get-status.rst‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@ Description
5353
This ioctl call asks the Video Device to return the current status of
5454
the device.
5555
56+
.. c:type:: video_status
57+
58+
.. code-block:: c
59+
60+
struct video_status {
61+
int video_blank; /* blank video on freeze? */
62+
video_play_state_t play_state; /* current state of playback */
63+
video_stream_source_t stream_source; /* current source (demux/memory) */
64+
video_format_t video_format; /* current aspect ratio of stream*/
65+
video_displayformat_t display_format;/* selected cropping mode */
66+
};
5667
5768
Return Value
5869
------------

‎Documentation/media/uapi/dvb/video-select-source.rst‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ This ioctl call informs the video device which source shall be used for
5858
the input data. The possible sources are demux or memory. If memory is
5959
selected, the data is fed to the video device through the write command.
6060
61+
.. c:type:: video_stream_source_t
62+
63+
.. code-block:: c
64+
65+
typedef enum {
66+
VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */
67+
VIDEO_SOURCE_MEMORY /* If this source is selected, the stream
68+
comes from the user through the write
69+
system call */
70+
} video_stream_source_t;
6171
6272
Return Value
6373
------------

‎Documentation/media/uapi/dvb/video-set-attributes.rst‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,22 @@ information about the stream. Some hardware may not need this
5555
information, but the call also tells the hardware to prepare for DVD
5656
playback.
5757
58+
.. c:type:: video_attributes_t
59+
60+
.. code-block::c
61+
62+
typedef __u16 video_attributes_t;
63+
/* bits: descr. */
64+
/* 15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) */
65+
/* 13-12 TV system (0=525/60, 1=625/50) */
66+
/* 11-10 Aspect ratio (0=4:3, 3=16:9) */
67+
/* 9- 8 permitted display mode on 4:3 monitor (0=both, 1=only pan-sca */
68+
/* 7 line 21-1 data present in GOP (1=yes, 0=no) */
69+
/* 6 line 21-2 data present in GOP (1=yes, 0=no) */
70+
/* 5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 */
71+
/* 2 source letterboxed (1=yes, 0=no) */
72+
/* 0 film/camera mode (0=camera, 1=film (625/50 only)) */
73+
5874

5975
Return Value
6076
------------

‎Documentation/media/uapi/dvb/video-set-display-format.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ VIDEO_SET_DISPLAY_FORMAT
1616
Synopsis
1717
--------
1818

19-
.. c:function:: int ioctl(fd, VIDEO_SET_DISPLAY_FORMAT, video_display_format_t format)
19+
.. c:function:: int ioctl(fd, VIDEO_SET_DISPLAY_FORMAT)
2020
:name: VIDEO_SET_DISPLAY_FORMAT
2121
2222

‎Documentation/media/uapi/dvb/video-set-format.rst‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ This ioctl sets the screen format (aspect ratio) of the connected output
5454
device (TV) so that the output of the decoder can be adjusted
5555
accordingly.
5656
57+
.. c:type:: video_format_t
58+
59+
.. code-block:: c
60+
61+
typedef enum {
62+
VIDEO_FORMAT_4_3, /* Select 4:3 format */
63+
VIDEO_FORMAT_16_9, /* Select 16:9 format. */
64+
VIDEO_FORMAT_221_1 /* 2.21:1 */
65+
} video_format_t;
5766
5867
Return Value
5968
------------

‎Documentation/media/uapi/dvb/video-set-highlight.rst‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ VIDEO_SET_HIGHLIGHT
1616
Synopsis
1717
--------
1818

19-
.. c:function:: int ioctl(fd, VIDEO_SET_HIGHLIGHT ,video_highlight_t *vhilite)
19+
.. c:function:: int ioctl(fd, VIDEO_SET_HIGHLIGHT, struct video_highlight *vhilite)
2020
:name: VIDEO_SET_HIGHLIGHT
2121
2222
@@ -53,6 +53,30 @@ Description
5353
This ioctl sets the SPU highlight information for the menu access of a
5454
DVD.
5555
56+
.. c:type:: video_highlight
57+
58+
.. code-block:: c
59+
60+
typedef
61+
struct video_highlight {
62+
int active; /* 1=show highlight, 0=hide highlight */
63+
__u8 contrast1; /* 7- 4 Pattern pixel contrast */
64+
/* 3- 0 Background pixel contrast */
65+
__u8 contrast2; /* 7- 4 Emphasis pixel-2 contrast */
66+
/* 3- 0 Emphasis pixel-1 contrast */
67+
__u8 color1; /* 7- 4 Pattern pixel color */
68+
/* 3- 0 Background pixel color */
69+
__u8 color2; /* 7- 4 Emphasis pixel-2 color */
70+
/* 3- 0 Emphasis pixel-1 color */
71+
__u32 ypos; /* 23-22 auto action mode */
72+
/* 21-12 start y */
73+
/* 9- 0 end y */
74+
__u32 xpos; /* 23-22 button color number */
75+
/* 21-12 start x */
76+
/* 9- 0 end x */
77+
} video_highlight_t;
78+
79+
5680
5781
Return Value
5882
------------

0 commit comments

Comments
 (0)