0001 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
0002 .. c:namespace:: DTV.video
0003
0004 .. _VIDEO_COMMAND:
0005
0006 =============
0007 VIDEO_COMMAND
0008 =============
0009
0010 Name
0011 ----
0012
0013 VIDEO_COMMAND
0014
0015 .. attention:: This ioctl is deprecated.
0016
0017 Synopsis
0018 --------
0019
0020 .. c:macro:: VIDEO_COMMAND
0021
0022 ``int ioctl(int fd, VIDEO_COMMAND, struct video_command *cmd)``
0023
0024 Arguments
0025 ---------
0026
0027 .. flat-table::
0028 :header-rows: 0
0029 :stub-columns: 0
0030
0031 - .. row 1
0032
0033 - int fd
0034
0035 - File descriptor returned by a previous call to open().
0036
0037 - .. row 2
0038
0039 - int request
0040
0041 - Equals VIDEO_COMMAND for this command.
0042
0043 - .. row 3
0044
0045 - struct video_command \*cmd
0046
0047 - Commands the decoder.
0048
0049 Description
0050 -----------
0051
0052 This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders
0053 this ioctl has been replaced by the
0054 :ref:`VIDIOC_DECODER_CMD` ioctl.
0055
0056 This ioctl commands the decoder. The ``video_command`` struct is a
0057 subset of the ``v4l2_decoder_cmd`` struct, so refer to the
0058 :ref:`VIDIOC_DECODER_CMD` documentation for
0059 more information.
0060
0061 .. c:type:: video_command
0062
0063 .. code-block:: c
0064
0065 /* The structure must be zeroed before use by the application
0066 This ensures it can be extended safely in the future. */
0067 struct video_command {
0068 __u32 cmd;
0069 __u32 flags;
0070 union {
0071 struct {
0072 __u64 pts;
0073 } stop;
0074
0075 struct {
0076 /* 0 or 1000 specifies normal speed,
0077 1 specifies forward single stepping,
0078 -1 specifies backward single stepping,
0079 >1: playback at speed/1000 of the normal speed,
0080 <-1: reverse playback at (-speed/1000) of the normal speed. */
0081 __s32 speed;
0082 __u32 format;
0083 } play;
0084
0085 struct {
0086 __u32 data[16];
0087 } raw;
0088 };
0089 };
0090
0091 Return Value
0092 ------------
0093
0094 On success 0 is returned, on error -1 and the ``errno`` variable is set
0095 appropriately. The generic error codes are described at the
0096 :ref:`Generic Error Codes <gen-errors>` chapter.