Lines Matching +full:video +full:- +full:mode

1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later OR GPL-2.0
3 .. c:namespace:: dtv.legacy.video
8 DVB Video Device
14 The DVB video device controls the MPEG2 video decoder of the DVB
17 ``linux/dvb/video.h`` in your application.
19 Note that the DVB video device only controls decoding of the MPEG video
22 ``/dev/video``, which allows scaling and defining output windows.
25 omission of the audio and video device as well as the video4linux
31 functionality. Use :ref:`V4L2 ioctls<video>` for new drivers!
34 Video Data Types
40 --------------
45 .. code-block:: c
56 .. flat-table::
57 :header-rows: 0
58 :stub-columns: 0
60 - ..
62 - ``VIDEO_FORMAT_4_3``
64 - Select 4:3 format.
66 - ..
68 - ``VIDEO_FORMAT_16_9``
70 - Select 16:9 format.
72 - ..
74 - ``VIDEO_FORMAT_221_1``
76 - Select 2.21:1 format.
86 about the display format of the current video stream.
89 -----
93 ---------------------
98 .. code-block:: c
109 .. flat-table::
110 :header-rows: 0
111 :stub-columns: 0
113 - ..
115 - ``VIDEO_PAN_SCAN``
117 - Use pan and scan format.
119 - ..
121 - ``VIDEO_LETTER_BOX``
123 - Use letterbox format.
125 - ..
127 - ``VIDEO_CENTER_CUT_OUT``
129 - Use center cut out format.
134 In case the display format of the video stream and of the display
140 -----
144 ------------
149 .. code-block:: c
160 .. flat-table::
161 :header-rows: 0
162 :stub-columns: 0
164 - ..
166 - ``int w``
168 - Video width in pixels.
170 - ..
172 - ``int h``
174 - Video height in pixels.
176 - ..
178 - `video_format_t`_ ``aspect_ratio``
180 - Aspect ratio.
186 aspect ratio of the video.
189 -----
193 ---------------------
198 .. code-block:: c
208 .. flat-table::
209 :header-rows: 0
210 :stub-columns: 0
212 - ..
214 - ``VIDEO_SOURCE_DEMUX``
216 - :cspan:`1` Select the demux as the main source.
218 - ..
220 - ``VIDEO_SOURCE_MEMORY``
222 - If this source is selected, the stream
229 The video stream source is set through the `VIDEO_SELECT_SOURCE`_ call
233 frontend or the DVR device) as the source of the video stream. If
238 -----
242 ------------------
247 .. code-block:: c
258 .. flat-table::
259 :header-rows: 0
260 :stub-columns: 0
262 - ..
264 - ``VIDEO_STOPPED``
266 - Video is stopped.
268 - ..
270 - ``VIDEO_PLAYING``
272 - Video is currently playing.
274 - ..
276 - ``VIDEO_FREEZED``
278 - Video is frozen.
284 representing the state of video playback.
287 -----
291 --------------------
296 .. code-block:: c
321 .. flat-table::
322 :header-rows: 0
323 :stub-columns: 0
325 - ..
327 - ``__u32 cmd``
329 - `Decoder command`_
331 - ..
333 - ``__u32 flags``
335 - Flags for the `Decoder command`_.
337 - ..
339 - ``struct stop``
341 - ``__u64 pts``
343 - MPEG PTS
345 - ..
347 - :rspan:`5` ``stuct play``
349 - :rspan:`4` ``__s32 speed``
351 - 0 or 1000 specifies normal speed,
353 - ..
355 - 1: specifies forward single stepping,
357 - ..
359 - -1: specifies backward single stepping,
361 - ..
363 - >1: playback at speed / 1000 of the normal speed
365 - ..
367 - <-1: reverse playback at ( -speed / 1000 ) of the normal speed.
369 - ..
371 - ``__u32 format``
373 - `Play input formats`_
375 - ..
377 - ``__u32 data[16]``
379 - Reserved
388 -----
392 -------------------------------------
397 .. code-block:: c
420 .. flat-table::
421 :header-rows: 0
422 :stub-columns: 0
424 - ..
426 - :rspan:`3` _`Decoder command`
428 - ``VIDEO_CMD_PLAY``
430 - Start playback.
432 - ..
434 - ``VIDEO_CMD_STOP``
436 - Stop playback.
438 - ..
440 - ``VIDEO_CMD_FREEZE``
442 - Freeze playback.
444 - ..
446 - ``VIDEO_CMD_CONTINUE``
448 - Continue playback after freeze.
450 - ..
452 - Flags for ``VIDEO_CMD_FREEZE``
454 - ``VIDEO_CMD_FREEZE_TO_BLACK``
456 - Show black picture on freeze.
458 - ..
460 - :rspan:`1` Flags for ``VIDEO_CMD_STOP``
462 - ``VIDEO_CMD_STOP_TO_BLACK``
464 - Show black picture on stop.
466 - ..
468 - ``VIDEO_CMD_STOP_IMMEDIATELY``
470 - Stop immediately, without emptying buffers.
472 - ..
474 - :rspan:`1` _`Play input formats`
476 - ``VIDEO_PLAY_FMT_NONE``
478 - The decoder has no special format requirements
480 - ..
482 - ``VIDEO_PLAY_FMT_GOP``
484 - The decoder requires full GOPs
486 - ..
488 - :rspan:`3` Field order
490 - ``VIDEO_VSYNC_FIELD_UNKNOWN``
492 - FIELD_UNKNOWN can be used if the hardware does not know
494 (i.e. non-interlaced) field.
496 - ..
498 - ``VIDEO_VSYNC_FIELD_ODD``
500 - Vsync is for an odd field.
502 - ..
504 - ``VIDEO_VSYNC_FIELD_EVEN``
506 - Vsync is for an even field.
508 - ..
510 - ``VIDEO_VSYNC_FIELD_PROGRESSIVE``
512 - progressive (i.e. non-interlaced)
515 -----
519 -----------
524 .. code-block:: c
543 .. flat-table::
544 :header-rows: 0
545 :stub-columns: 0
547 - ..
549 - :rspan:`4` ``__s32 type``
551 - :cspan:`1` Event type.
553 - ..
555 - ``VIDEO_EVENT_SIZE_CHANGED``
557 - Size changed.
559 - ..
561 - ``VIDEO_EVENT_FRAME_RATE_CHANGED``
563 - Framerate changed.
565 - ..
567 - ``VIDEO_EVENT_DECODER_STOPPED``
569 - Decoder stopped.
571 - ..
573 - ``VIDEO_EVENT_VSYNC``
575 - Vsync occurred.
577 - ..
579 - ``long timestamp``
581 - :cspan:`1` MPEG PTS at occurrence.
583 - ..
585 - :rspan:`2` ``union u``
587 - `video_size_t`_ size
589 - Resolution and aspect ratio of the video.
591 - ..
593 - ``unsigned int frame_rate``
595 - in frames per 1000sec
597 - ..
599 - ``unsigned char vsync_field``
601 - | unknown / odd / even / progressive
607 This is the structure of a video event as it is returned by the
611 -----
615 ------------
623 .. code-block:: c
636 .. flat-table::
637 :header-rows: 0
638 :stub-columns: 0
640 - ..
642 - :rspan:`2` ``int video_blank``
644 - :cspan:`1` Show blank video on freeze?
646 - ..
648 - TRUE ( != 0 )
650 - Blank screen when freeze.
652 - ..
654 - FALSE ( == 0 )
656 - Show last decoded frame.
658 - ..
660 - `video_play_state_t`_ ``play_state``
662 - Current state of playback.
664 - ..
666 - `video_stream_source_t`_ ``stream_source``
668 - Current source (demux/memory).
670 - ..
672 - `video_format_t`_ ``video_format``
674 - Current aspect ratio of stream.
676 - ..
678 - `video_displayformat_t`_ ``display_format``
680 - Applied cropping mode.
685 If ``video_blank`` is set ``TRUE`` video will be blanked out if the
687 will be displayed. ``play_state`` indicates if the video is currently
689 to the selected source for the video stream. It can come either from the
691 ratio (one of 4:3 or 16:9) of the currently played video stream.
692 Finally, ``display_format`` corresponds to the applied cropping mode in
693 case the source video format is not the same as the format of the output
697 -----
701 -------------------
706 .. code-block:: c
716 .. flat-table::
717 :header-rows: 0
718 :stub-columns: 0
720 - ..
722 - ``char *iFrame``
724 - Pointer to a single iframe in memory.
726 - ..
728 - ``int32_t size``
730 - Size of the iframe.
736 An I-frame displayed via the `VIDEO_STILLPICTURE`_ call is passed on
740 -----
743 video capabilities
744 ------------------
749 .. code-block:: c
760 .. flat-table::
761 :header-rows: 0
762 :stub-columns: 0
764 - ..
766 - ``VIDEO_CAP_MPEG1``
768 - :cspan:`1` The hardware can decode MPEG1.
770 - ..
772 - ``VIDEO_CAP_MPEG2``
774 - The hardware can decode MPEG2.
776 - ..
778 - ``VIDEO_CAP_SYS``
780 - The video device accepts system stream.
782 You still have to open the video and the audio device
783 but only send the stream to the video device.
785 - ..
787 - ``VIDEO_CAP_PROG``
789 - The video device accepts program stream.
791 You still have to open the video and the audio device
792 but only send the stream to the video device.
801 -----
804 Video Function Calls
809 ----------
816 .. code-block:: c
818 int ioctl(fd, VIDEO_STOP, int mode)
823 .. flat-table::
824 :header-rows: 0
825 :stub-columns: 0
827 - ..
829 - ``int fd``
831 - :cspan:`1` File descriptor returned by a previous call
834 - ..
836 - ``int request``
838 - :cspan:`1` Equals ``VIDEO_STOP`` for this command.
840 - ..
842 - :rspan:`2` ``int mode``
844 - :cspan:`1` Indicates how the screen shall be handled.
846 - ..
848 - TRUE ( != 0 )
850 - Blank screen when stop.
852 - ..
854 - FALSE ( == 0 )
856 - Show last decoded frame.
867 This ioctl call asks the Video Device to stop playing the current
874 On success 0 is returned, on error -1 and the ``errno`` variable is set
876 :ref:`Generic Error Codes <gen-errors>` chapter.
879 -----
883 ----------
890 .. code-block:: c
897 .. flat-table::
898 :header-rows: 0
899 :stub-columns: 0
901 - ..
903 - ``int fd``
905 - :cspan:`1` File descriptor returned by a previous call
908 - ..
910 - ``int request``
912 - Equals ``VIDEO_PLAY`` for this command.
923 This ioctl call asks the Video Device to start playing a video stream
929 On success 0 is returned, on error -1 and the ``errno`` variable is set
931 :ref:`Generic Error Codes <gen-errors>` chapter.
934 -----
938 ------------
945 .. code-block:: c
952 .. flat-table::
953 :header-rows: 0
954 :stub-columns: 0
956 - ..
958 - ``int fd``
960 - :cspan:`1` File descriptor returned by a previous call
963 - ..
965 - ``int request``
967 - Equals ``VIDEO_FREEZE`` for this command.
978 This ioctl call suspends the live video stream being played, if
981 video stream using the `VIDEO_CONTINUE`_ command.
989 On success 0 is returned, on error -1 and the ``errno`` variable is set
991 :ref:`Generic Error Codes <gen-errors>` chapter.
994 -----
998 --------------
1005 .. code-block:: c
1012 .. flat-table::
1013 :header-rows: 0
1014 :stub-columns: 0
1016 - ..
1018 - ``int fd``
1020 - :cspan:`1` File descriptor returned by a previous call
1023 - ..
1025 - ``int request``
1027 - Equals ``VIDEO_CONTINUE`` for this command.
1038 This ioctl call restarts decoding and playing processes of the video
1044 On success 0 is returned, on error -1 and the ``errno`` variable is set
1046 :ref:`Generic Error Codes <gen-errors>` chapter.
1049 -----
1053 -------------------
1060 .. code-block:: c
1067 .. flat-table::
1068 :header-rows: 0
1069 :stub-columns: 0
1071 - ..
1073 - ``int fd``
1075 - :cspan:`1` File descriptor returned by a previous call
1078 - ..
1080 - ``int request``
1082 - Equals ``VIDEO_SELECT_SOURCE`` for this command.
1084 - ..
1086 - `video_stream_source_t`_ ``source``
1088 - Indicates which source shall be used for the Video stream.
1097 by the V4L2 ivtv driver, but that has been replaced by the ivtv-specific
1100 This ioctl call informs the video device which source shall be used for
1102 selected, the data is fed to the video device through the write command
1104 is directly transferred from the onboard demux-device to the decoder.
1106 The data fed to the decoder is also controlled by the PID-filter.
1113 On success 0 is returned, on error -1 and the ``errno`` variable is set
1115 :ref:`Generic Error Codes <gen-errors>` chapter.
1118 -----
1122 ---------------
1129 .. code-block:: c
1131 int ioctl(fd, VIDEO_SET_BLANK, int mode)
1136 .. flat-table::
1137 :header-rows: 0
1138 :stub-columns: 0
1140 - ..
1142 - ``int fd``
1144 - :cspan:`1` File descriptor returned by a previous call
1147 - ..
1149 - ``int request``
1151 - :cspan:`1` Equals ``VIDEO_SET_BLANK`` for this command.
1153 - ..
1155 - :rspan:`2` ``int mode``
1157 - :cspan:`1` Indicates if the screen shall be blanked.
1159 - ..
1161 - TRUE ( != 0 )
1163 - Blank screen when stop.
1165 - ..
1167 - FALSE ( == 0 )
1169 - Show last decoded frame.
1177 This ioctl call asks the Video Device to blank out the picture.
1182 On success 0 is returned, on error -1 and the ``errno`` variable is set
1184 :ref:`Generic Error Codes <gen-errors>` chapter.
1187 -----
1191 ----------------
1198 .. code-block:: c
1206 .. flat-table::
1207 :header-rows: 0
1208 :stub-columns: 0
1210 - ..
1212 - ``int fd``
1214 - :cspan:`1` File descriptor returned by a previous call
1217 - ..
1219 - ``int request``
1221 - Equals ``VIDEO_GET_STATUS`` for this command.
1223 - ..
1225 - ``struct`` `video_status`_ ``*status``
1227 - Returns the current status of the Video Device.
1235 This ioctl call asks the Video Device to return the current status of
1241 On success 0 is returned, on error -1 and the ``errno`` variable is set
1243 :ref:`Generic Error Codes <gen-errors>` chapter.
1246 -----
1250 ---------------
1257 .. code-block:: c
1265 .. flat-table::
1266 :header-rows: 0
1267 :stub-columns: 0
1269 - ..
1271 - ``int fd``
1273 - :cspan:`1` File descriptor returned by a previous call
1276 - ..
1278 - ``int request``
1280 - Equals ``VIDEO_GET_EVENT`` for this command.
1282 - ..
1284 - ``struct`` `video_event`_ ``*ev``
1286 - Points to the location where the event, if any, is to be stored.
1301 in blocking or non-blocking mode. In the latter case, the call fails
1307 specified as the wake-up condition. Read-only permissions are sufficient
1313 On success 0 is returned, on error -1 and the ``errno`` variable is set
1315 :ref:`Generic Error Codes <gen-errors>` chapter.
1317 .. flat-table::
1318 :header-rows: 0
1319 :stub-columns: 0
1321 - ..
1323 - ``EWOULDBLOCK``
1325 - :cspan:`1` There is no event pending, and the device is in
1326 non-blocking mode.
1328 - ..
1330 - ``EOVERFLOW``
1332 - Overflow in event queue - one or more events were lost.
1335 -----
1339 ------------------------
1346 .. code-block:: c
1354 .. flat-table::
1355 :header-rows: 0
1356 :stub-columns: 0
1358 - ..
1360 - ``int fd``
1362 - :cspan:`1` File descriptor returned by a previous call
1365 - ..
1367 - ``int request``
1369 - Equals ``VIDEO_SET_DISPLAY_FORMAT`` for this command.
1371 - ..
1373 - `video_displayformat_t`_ ``format``
1375 - Selects the video format to be used.
1383 This ioctl call asks the Video Device to select the video format to be
1384 applied by the MPEG chip on the video.
1389 On success 0 is returned, on error -1 and the ``errno`` variable is set
1391 :ref:`Generic Error Codes <gen-errors>` chapter.
1394 -----
1398 ------------------
1405 .. code-block:: c
1413 .. flat-table::
1414 :header-rows: 0
1415 :stub-columns: 0
1417 - ..
1419 - ``int fd``
1421 - :cspan:`1` File descriptor returned by a previous call
1424 - ..
1426 - ``int request``
1428 - Equals ``VIDEO_STILLPICTURE`` for this command.
1430 - ..
1432 - ``struct`` `video_still_picture`_ ``*sp``
1434 - Pointer to the location where the struct with the I-frame
1443 This ioctl call asks the Video Device to display a still picture
1444 (I-frame). The input data shall be the section of an elementary video
1445 stream containing an I-frame. Typically this section is extracted from a
1446 TS or PES recording. Resolution and codec (see `video capabilities`_) must
1450 e.g. The AV7110 supports MPEG1 and MPEG2 with the common PAL-SD
1456 On success 0 is returned, on error -1 and the ``errno`` variable is set
1458 :ref:`Generic Error Codes <gen-errors>` chapter.
1461 -----
1465 ------------------
1472 .. code-block:: c
1479 .. flat-table::
1480 :header-rows: 0
1481 :stub-columns: 0
1483 - ..
1485 - ``int fd``
1487 - :cspan:`1` File descriptor returned by a previous call
1490 - ..
1492 - ``int request``
1494 - Equals ``VIDEO_FAST_FORWARD`` for this command.
1496 - ..
1498 - ``int nFrames``
1500 - The number of frames to skip.
1508 This ioctl call asks the Video Device to skip decoding of N number of
1509 I-frames. This call can only be used if ``VIDEO_SOURCE_MEMORY`` is
1515 On success 0 is returned, on error -1 and the ``errno`` variable is set
1517 :ref:`Generic Error Codes <gen-errors>` chapter.
1519 .. flat-table::
1520 :header-rows: 0
1521 :stub-columns: 0
1523 - ..
1525 - ``EPERM``
1527 - Mode ``VIDEO_SOURCE_MEMORY`` not selected.
1530 -----
1534 ----------------
1541 .. code-block:: c
1548 .. flat-table::
1549 :header-rows: 0
1550 :stub-columns: 0
1552 - ..
1554 - ``int fd``
1556 - :cspan:`1` File descriptor returned by a previous call
1559 - ..
1561 - ``int request``
1563 - Equals ``VIDEO_SLOWMOTION`` for this command.
1565 - ..
1567 - ``int nFrames``
1569 - The number of times to repeat each frame.
1577 This ioctl call asks the video device to repeat decoding frames N number
1584 On success 0 is returned, on error -1 and the ``errno`` variable is set
1586 :ref:`Generic Error Codes <gen-errors>` chapter.
1588 .. flat-table::
1589 :header-rows: 0
1590 :stub-columns: 0
1592 - ..
1594 - ``EPERM``
1596 - Mode ``VIDEO_SOURCE_MEMORY`` not selected.
1599 -----
1603 ----------------------
1610 .. code-block:: c
1617 .. flat-table::
1618 :header-rows: 0
1619 :stub-columns: 0
1621 - ..
1623 - ``int fd``
1625 - :cspan:`1` File descriptor returned by a previous call
1628 - ..
1630 - ``int request``
1632 - Equals ``VIDEO_GET_CAPABILITIES`` for this command.
1634 - ..
1636 - ``unsigned int *cap``
1638 - Pointer to a location where to store the capability information.
1646 This ioctl call asks the video device about its decoding capabilities.
1648 defines in `video capabilities`_.
1653 On success 0 is returned, on error -1 and the ``errno`` variable is set
1655 :ref:`Generic Error Codes <gen-errors>` chapter.
1658 -----
1662 ------------------
1669 .. code-block:: c
1676 .. flat-table::
1677 :header-rows: 0
1678 :stub-columns: 0
1680 - ..
1682 - ``int fd``
1684 - :cspan:`1` File descriptor returned by a previous call
1687 - ..
1689 - ``int request``
1691 - Equals ``VIDEO_CLEAR_BUFFER`` for this command.
1699 This ioctl call clears all video buffers in the driver and in the
1705 On success 0 is returned, on error -1 and the ``errno`` variable is set
1707 :ref:`Generic Error Codes <gen-errors>` chapter.
1710 -----
1714 --------------------
1721 .. code-block:: c
1728 .. flat-table::
1729 :header-rows: 0
1730 :stub-columns: 0
1732 - ..
1734 - ``int fd``
1736 - :cspan:`1` File descriptor returned by a previous call
1739 - ..
1741 - ``int request``
1743 - Equals ``VIDEO_SET_STREAMTYPE`` for this command.
1745 - ..
1747 - ``int type``
1749 - Stream type.
1764 .. flat-table::
1765 :header-rows: 1
1766 :stub-columns: 0
1768 - ..
1770 - Codec
1772 - Stream type
1774 - ..
1776 - MPEG2
1778 - 0
1780 - ..
1782 - MPEG4 h.264
1784 - 1
1786 - ..
1788 - VC1
1790 - 3
1792 - ..
1794 - MPEG4 Part2
1796 - 4
1798 - ..
1800 - VC1 SM
1802 - 5
1804 - ..
1806 - MPEG1
1808 - 6
1810 - ..
1812 - HEVC h.265
1814 - | 7
1817 - ..
1819 - AVS
1821 - 16
1823 - ..
1825 - AVS2
1827 - 40
1834 On success 0 is returned, on error -1 and the ``errno`` variable is set
1836 :ref:`Generic Error Codes <gen-errors>` chapter.
1839 -----
1843 ----------------
1850 .. code-block:: c
1857 .. flat-table::
1858 :header-rows: 0
1859 :stub-columns: 0
1861 - ..
1863 - ``int fd``
1865 - :cspan:`1` File descriptor returned by a previous call
1868 - ..
1870 - ``int request``
1872 - Equals ``VIDEO_SET_FORMAT`` for this command.
1874 - ..
1876 - `video_format_t`_ ``format``
1878 - Video format of TV as defined in section `video_format_t`_.
1893 On success 0 is returned, on error -1 and the ``errno`` variable is set
1895 :ref:`Generic Error Codes <gen-errors>` chapter.
1898 -----
1902 --------------
1909 .. code-block:: c
1916 .. flat-table::
1917 :header-rows: 0
1918 :stub-columns: 0
1920 - ..
1922 - ``int fd``
1924 - :cspan:`1` File descriptor returned by a previous call,
1927 - ..
1929 - ``int request``
1931 - Equals ``VIDEO_GET_SIZE`` for this command.
1933 - ..
1935 - `video_size_t`_ ``*size``
1937 - Returns the size and aspect ratio.
1950 On success 0 is returned, on error -1 and the ``errno`` variable is set
1952 :ref:`Generic Error Codes <gen-errors>` chapter.
1955 -----
1959 -------------
1966 .. code-block:: c
1973 .. flat-table::
1974 :header-rows: 0
1975 :stub-columns: 0
1977 - ..
1979 - ``int fd``
1981 - :cspan:`1` File descriptor returned by a previous call
1984 - ..
1986 - ``int request``
1988 - Equals ``VIDEO_GET_PTS`` for this command.
1990 - ..
1992 - ``__u64 *pts``
1994 - Returns the 33-bit timestamp as defined in ITU T-REC-H.222.0 /
1995 ISO/IEC 13818-1.
2010 This ioctl call asks the Video Device to return the current PTS
2016 On success 0 is returned, on error -1 and the ``errno`` variable is set
2018 :ref:`Generic Error Codes <gen-errors>` chapter.
2021 -----
2025 ---------------------
2032 .. code-block:: c
2039 .. flat-table::
2040 :header-rows: 0
2041 :stub-columns: 0
2043 - ..
2045 - ``int fd``
2047 - :cspan:`1` File descriptor returned by a previous call
2050 - ..
2052 - ``int request``
2054 - Equals ``VIDEO_GET_FRAME_COUNT`` for this command.
2056 - ..
2058 - ``__u64 *pts``
2060 - Returns the number of frames displayed since the decoder was
2072 This ioctl call asks the Video Device to return the number of displayed
2078 On success 0 is returned, on error -1 and the ``errno`` variable is set
2080 :ref:`Generic Error Codes <gen-errors>` chapter.
2083 -----
2087 -------------
2094 .. code-block:: c
2102 .. flat-table::
2103 :header-rows: 0
2104 :stub-columns: 0
2106 - ..
2108 - ``int fd``
2110 - :cspan:`1` File descriptor returned by a previous call
2113 - ..
2115 - ``int request``
2117 - Equals ``VIDEO_COMMAND`` for this command.
2119 - ..
2121 - `struct video_command`_ ``*cmd``
2123 - Commands the decoder.
2142 On success 0 is returned, on error -1 and the ``errno`` variable is set
2144 :ref:`Generic Error Codes <gen-errors>` chapter.
2147 -----
2151 -----------------
2158 .. code-block:: c
2166 .. flat-table::
2167 :header-rows: 0
2168 :stub-columns: 0
2170 - ..
2172 - ``int fd``
2174 - :cspan:`1` File descriptor returned by a previous call
2177 - ..
2179 - ``int request``
2181 - Equals ``VIDEO_TRY_COMMAND`` for this command.
2183 - ..
2185 - `struct video_command`_ ``*cmd``
2187 - Try a decoder command.
2206 On success 0 is returned, on error -1 and the ``errno`` variable is set
2208 :ref:`Generic Error Codes <gen-errors>` chapter.
2211 -----
2215 ------
2220 .. code-block:: c
2229 .. flat-table::
2230 :header-rows: 0
2231 :stub-columns: 0
2233 - ..
2235 - ``const char *deviceName``
2237 - Name of specific video device.
2239 - ..
2241 - :rspan:`3` ``int flags``
2243 - :cspan:`1` A bit-wise OR of the following flags:
2245 - ..
2247 - ``O_RDONLY``
2249 - read-only access
2251 - ..
2253 - ``O_RDWR``
2255 - read/write access
2257 - ..
2259 - ``O_NONBLOCK``
2260 - | Open in non-blocking mode
2261 | (blocking mode is the default)
2266 This system call opens a named video device (e.g.
2267 /dev/dvb/adapter?/video?) for subsequent use.
2270 significance of blocking or non-blocking mode is described in the
2273 blocking mode can later be put into non-blocking mode (and vice versa)
2276 user can open the Video Device in O_RDWR mode. All other attempts to
2277 open the device in this mode will fail, and an error-code will be
2278 returned. If the Video Device is opened in O_RDONLY mode, the only
2285 .. flat-table::
2286 :header-rows: 0
2287 :stub-columns: 0
2289 - ..
2291 - ``ENODEV``
2293 - :cspan:`1` Device driver not loaded/available.
2295 - ..
2297 - ``EINTERNAL``
2299 - Internal error.
2301 - ..
2303 - ``EBUSY``
2305 - Device or resource busy.
2307 - ..
2309 - ``EINVAL``
2311 - Invalid argument.
2314 -----
2318 -------
2328 .. flat-table::
2329 :header-rows: 0
2330 :stub-columns: 0
2332 - ..
2334 - ``int fd``
2336 - :cspan:`1` File descriptor returned by a previous call
2342 This system call closes a previously opened video device.
2347 .. flat-table::
2348 :header-rows: 0
2349 :stub-columns: 0
2351 - ..
2353 - ``EBADF``
2355 - fd is not a valid open file descriptor.
2358 -----
2362 -------
2372 .. flat-table::
2373 :header-rows: 0
2374 :stub-columns: 0
2376 - ..
2378 - ``int fd``
2380 - :cspan:`1` File descriptor returned by a previous call
2383 - ..
2385 - ``void *buf``
2387 - Pointer to the buffer containing the PES data.
2389 - ..
2391 - ``size_t count``
2393 - Size of buf.
2401 most common format for storing DVB-data, it is usually supported too.
2410 .. flat-table::
2411 :header-rows: 0
2412 :stub-columns: 0
2414 - ..
2416 - ``EPERM``
2418 - :cspan:`1` Mode ``VIDEO_SOURCE_MEMORY`` not selected.
2420 - ..
2422 - ``ENOMEM``
2424 - Attempted to write more data than the internal buffer can hold.
2426 - ..
2428 - ``EBADF``
2430 - fd is not a valid open file descriptor.