Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: docs: uAPI: dvb/video: completing the documentation (function calls)

The existing documentation of the legacy DVB Decoder API was incomplete.

Revising the documentation, adding missing parts and arranging the
documentation files new.

This patch contains the documentation of the function calls defined in
video.h.

Link: https://lore.kernel.org/linux-media/20240128233249.32794-7-herdler@nurfuerspam.de
Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

authored by

Stefan Herdler and committed by
Mauro Carvalho Chehab
b2fffe3f 6fb68c13

+1632
+1632
Documentation/userspace-api/media/dvb/legacy_dvb_video.rst
··· 796 796 797 797 A call to `VIDEO_GET_CAPABILITIES`_ returns an unsigned integer with the 798 798 following bits set according to the hardware's capabilities. 799 + 800 + 801 + ----- 802 + 803 + 804 + Video Function Calls 805 + ==================== 806 + 807 + 808 + VIDEO_STOP 809 + ---------- 810 + 811 + Synopsis 812 + ~~~~~~~~ 813 + 814 + .. c:macro:: VIDEO_STOP 815 + 816 + .. code-block:: c 817 + 818 + int ioctl(fd, VIDEO_STOP, int mode) 819 + 820 + Arguments 821 + ~~~~~~~~~ 822 + 823 + .. flat-table:: 824 + :header-rows: 0 825 + :stub-columns: 0 826 + 827 + - .. 828 + 829 + - ``int fd`` 830 + 831 + - :cspan:`1` File descriptor returned by a previous call 832 + to `open()`_. 833 + 834 + - .. 835 + 836 + - ``int request`` 837 + 838 + - :cspan:`1` Equals ``VIDEO_STOP`` for this command. 839 + 840 + - .. 841 + 842 + - :rspan:`2` ``int mode`` 843 + 844 + - :cspan:`1` Indicates how the screen shall be handled. 845 + 846 + - .. 847 + 848 + - TRUE ( != 0 ) 849 + 850 + - Blank screen when stop. 851 + 852 + - .. 853 + 854 + - FALSE ( == 0 ) 855 + 856 + - Show last decoded frame. 857 + 858 + Description 859 + ~~~~~~~~~~~ 860 + 861 + .. attention:: Do **not** use in new drivers! 862 + See: :ref:`legacy_dvb_decoder_notes` 863 + 864 + This ioctl is for Digital TV devices only. To control a V4L2 decoder use 865 + the V4L2 :ref:`VIDIOC_DECODER_CMD` instead. 866 + 867 + This ioctl call asks the Video Device to stop playing the current 868 + stream. Depending on the input parameter, the screen can be blanked out 869 + or displaying the last decoded frame. 870 + 871 + Return Value 872 + ~~~~~~~~~~~~ 873 + 874 + On success 0 is returned, on error -1 and the ``errno`` variable is set 875 + appropriately. The generic error codes are described at the 876 + :ref:`Generic Error Codes <gen-errors>` chapter. 877 + 878 + 879 + ----- 880 + 881 + 882 + VIDEO_PLAY 883 + ---------- 884 + 885 + Synopsis 886 + ~~~~~~~~ 887 + 888 + .. c:macro:: VIDEO_PLAY 889 + 890 + .. code-block:: c 891 + 892 + int ioctl(fd, VIDEO_PLAY) 893 + 894 + Arguments 895 + ~~~~~~~~~ 896 + 897 + .. flat-table:: 898 + :header-rows: 0 899 + :stub-columns: 0 900 + 901 + - .. 902 + 903 + - ``int fd`` 904 + 905 + - :cspan:`1` File descriptor returned by a previous call 906 + to `open()`_. 907 + 908 + - .. 909 + 910 + - ``int request`` 911 + 912 + - Equals ``VIDEO_PLAY`` for this command. 913 + 914 + Description 915 + ~~~~~~~~~~~ 916 + 917 + .. attention:: Do **not** use in new drivers! 918 + See: :ref:`legacy_dvb_decoder_notes` 919 + 920 + This ioctl is for Digital TV devices only. To control a V4L2 decoder use 921 + the V4L2 :ref:`VIDIOC_DECODER_CMD` instead. 922 + 923 + This ioctl call asks the Video Device to start playing a video stream 924 + from the selected source. 925 + 926 + Return Value 927 + ~~~~~~~~~~~~ 928 + 929 + On success 0 is returned, on error -1 and the ``errno`` variable is set 930 + appropriately. The generic error codes are described at the 931 + :ref:`Generic Error Codes <gen-errors>` chapter. 932 + 933 + 934 + ----- 935 + 936 + 937 + VIDEO_FREEZE 938 + ------------ 939 + 940 + Synopsis 941 + ~~~~~~~~ 942 + 943 + .. c:macro:: VIDEO_FREEZE 944 + 945 + .. code-block:: c 946 + 947 + int ioctl(fd, VIDEO_FREEZE) 948 + 949 + Arguments 950 + ~~~~~~~~~ 951 + 952 + .. flat-table:: 953 + :header-rows: 0 954 + :stub-columns: 0 955 + 956 + - .. 957 + 958 + - ``int fd`` 959 + 960 + - :cspan:`1` File descriptor returned by a previous call 961 + to `open()`_. 962 + 963 + - .. 964 + 965 + - ``int request`` 966 + 967 + - Equals ``VIDEO_FREEZE`` for this command. 968 + 969 + Description 970 + ~~~~~~~~~~~ 971 + 972 + .. attention:: Do **not** use in new drivers! 973 + See: :ref:`legacy_dvb_decoder_notes` 974 + 975 + This ioctl is for Digital TV devices only. To control a V4L2 decoder use 976 + the V4L2 :ref:`VIDIOC_DECODER_CMD` instead. 977 + 978 + This ioctl call suspends the live video stream being played, if 979 + VIDEO_SOURCE_DEMUX is selected. Decoding and playing are frozen. 980 + It is then possible to restart the decoding and playing process of the 981 + video stream using the `VIDEO_CONTINUE`_ command. 982 + If VIDEO_SOURCE_MEMORY is selected in the ioctl call 983 + `VIDEO_SELECT_SOURCE`_, the Digital TV subsystem will not decode any more 984 + data until the ioctl call `VIDEO_CONTINUE`_ or `VIDEO_PLAY`_ is performed. 985 + 986 + Return Value 987 + ~~~~~~~~~~~~ 988 + 989 + On success 0 is returned, on error -1 and the ``errno`` variable is set 990 + appropriately. The generic error codes are described at the 991 + :ref:`Generic Error Codes <gen-errors>` chapter. 992 + 993 + 994 + ----- 995 + 996 + 997 + VIDEO_CONTINUE 998 + -------------- 999 + 1000 + Synopsis 1001 + ~~~~~~~~ 1002 + 1003 + .. c:macro:: VIDEO_CONTINUE 1004 + 1005 + .. code-block:: c 1006 + 1007 + int ioctl(fd, VIDEO_CONTINUE) 1008 + 1009 + Arguments 1010 + ~~~~~~~~~ 1011 + 1012 + .. flat-table:: 1013 + :header-rows: 0 1014 + :stub-columns: 0 1015 + 1016 + - .. 1017 + 1018 + - ``int fd`` 1019 + 1020 + - :cspan:`1` File descriptor returned by a previous call 1021 + to `open()`_. 1022 + 1023 + - .. 1024 + 1025 + - ``int request`` 1026 + 1027 + - Equals ``VIDEO_CONTINUE`` for this command. 1028 + 1029 + Description 1030 + ~~~~~~~~~~~ 1031 + 1032 + .. attention:: Do **not** use in new drivers! 1033 + See: :ref:`legacy_dvb_decoder_notes` 1034 + 1035 + This ioctl is for Digital TV devices only. To control a V4L2 decoder use 1036 + the V4L2 :ref:`VIDIOC_DECODER_CMD` instead. 1037 + 1038 + This ioctl call restarts decoding and playing processes of the video 1039 + stream which was played before a call to `VIDEO_FREEZE`_ was made. 1040 + 1041 + Return Value 1042 + ~~~~~~~~~~~~ 1043 + 1044 + On success 0 is returned, on error -1 and the ``errno`` variable is set 1045 + appropriately. The generic error codes are described at the 1046 + :ref:`Generic Error Codes <gen-errors>` chapter. 1047 + 1048 + 1049 + ----- 1050 + 1051 + 1052 + VIDEO_SELECT_SOURCE 1053 + ------------------- 1054 + 1055 + Synopsis 1056 + ~~~~~~~~ 1057 + 1058 + .. c:macro:: VIDEO_SELECT_SOURCE 1059 + 1060 + .. code-block:: c 1061 + 1062 + int ioctl(fd, VIDEO_SELECT_SOURCE, video_stream_source_t source) 1063 + 1064 + Arguments 1065 + ~~~~~~~~~ 1066 + 1067 + .. flat-table:: 1068 + :header-rows: 0 1069 + :stub-columns: 0 1070 + 1071 + - .. 1072 + 1073 + - ``int fd`` 1074 + 1075 + - :cspan:`1` File descriptor returned by a previous call 1076 + to `open()`_. 1077 + 1078 + - .. 1079 + 1080 + - ``int request`` 1081 + 1082 + - Equals ``VIDEO_SELECT_SOURCE`` for this command. 1083 + 1084 + - .. 1085 + 1086 + - `video_stream_source_t`_ ``source`` 1087 + 1088 + - Indicates which source shall be used for the Video stream. 1089 + 1090 + Description 1091 + ~~~~~~~~~~~ 1092 + 1093 + .. attention:: Do **not** use in new drivers! 1094 + See: :ref:`legacy_dvb_decoder_notes` 1095 + 1096 + This ioctl is for Digital TV devices only. This ioctl was also supported 1097 + by the V4L2 ivtv driver, but that has been replaced by the ivtv-specific 1098 + ``IVTV_IOC_PASSTHROUGH_MODE`` ioctl. 1099 + 1100 + This ioctl call informs the video device which source shall be used for 1101 + the input data. The possible sources are demux or memory. If memory is 1102 + selected, the data is fed to the video device through the write command 1103 + using the struct `video_stream_source_t`_. If demux is selected, the data 1104 + is directly transferred from the onboard demux-device to the decoder. 1105 + 1106 + The data fed to the decoder is also controlled by the PID-filter. 1107 + Output selection: :c:type:`dmx_output` ``DMX_OUT_DECODER``. 1108 + 1109 + 1110 + Return Value 1111 + ~~~~~~~~~~~~ 1112 + 1113 + On success 0 is returned, on error -1 and the ``errno`` variable is set 1114 + appropriately. The generic error codes are described at the 1115 + :ref:`Generic Error Codes <gen-errors>` chapter. 1116 + 1117 + 1118 + ----- 1119 + 1120 + 1121 + VIDEO_SET_BLANK 1122 + --------------- 1123 + 1124 + Synopsis 1125 + ~~~~~~~~ 1126 + 1127 + .. c:macro:: VIDEO_SET_BLANK 1128 + 1129 + .. code-block:: c 1130 + 1131 + int ioctl(fd, VIDEO_SET_BLANK, int mode) 1132 + 1133 + Arguments 1134 + ~~~~~~~~~ 1135 + 1136 + .. flat-table:: 1137 + :header-rows: 0 1138 + :stub-columns: 0 1139 + 1140 + - .. 1141 + 1142 + - ``int fd`` 1143 + 1144 + - :cspan:`1` File descriptor returned by a previous call 1145 + to `open()`_. 1146 + 1147 + - .. 1148 + 1149 + - ``int request`` 1150 + 1151 + - :cspan:`1` Equals ``VIDEO_SET_BLANK`` for this command. 1152 + 1153 + - .. 1154 + 1155 + - :rspan:`2` ``int mode`` 1156 + 1157 + - :cspan:`1` Indicates if the screen shall be blanked. 1158 + 1159 + - .. 1160 + 1161 + - TRUE ( != 0 ) 1162 + 1163 + - Blank screen when stop. 1164 + 1165 + - .. 1166 + 1167 + - FALSE ( == 0 ) 1168 + 1169 + - Show last decoded frame. 1170 + 1171 + Description 1172 + ~~~~~~~~~~~ 1173 + 1174 + .. attention:: Do **not** use in new drivers! 1175 + See: :ref:`legacy_dvb_decoder_notes` 1176 + 1177 + This ioctl call asks the Video Device to blank out the picture. 1178 + 1179 + Return Value 1180 + ~~~~~~~~~~~~ 1181 + 1182 + On success 0 is returned, on error -1 and the ``errno`` variable is set 1183 + appropriately. The generic error codes are described at the 1184 + :ref:`Generic Error Codes <gen-errors>` chapter. 1185 + 1186 + 1187 + ----- 1188 + 1189 + 1190 + VIDEO_GET_STATUS 1191 + ---------------- 1192 + 1193 + Synopsis 1194 + ~~~~~~~~ 1195 + 1196 + .. c:macro:: VIDEO_GET_STATUS 1197 + 1198 + .. code-block:: c 1199 + 1200 + int ioctl(fd, int request = VIDEO_GET_STATUS, 1201 + struct video_status *status) 1202 + 1203 + Arguments 1204 + ~~~~~~~~~ 1205 + 1206 + .. flat-table:: 1207 + :header-rows: 0 1208 + :stub-columns: 0 1209 + 1210 + - .. 1211 + 1212 + - ``int fd`` 1213 + 1214 + - :cspan:`1` File descriptor returned by a previous call 1215 + to `open()`_. 1216 + 1217 + - .. 1218 + 1219 + - ``int request`` 1220 + 1221 + - Equals ``VIDEO_GET_STATUS`` for this command. 1222 + 1223 + - .. 1224 + 1225 + - ``struct`` `video_status`_ ``*status`` 1226 + 1227 + - Returns the current status of the Video Device. 1228 + 1229 + Description 1230 + ~~~~~~~~~~~ 1231 + 1232 + .. attention:: Do **not** use in new drivers! 1233 + See: :ref:`legacy_dvb_decoder_notes` 1234 + 1235 + This ioctl call asks the Video Device to return the current status of 1236 + the device. 1237 + 1238 + Return Value 1239 + ~~~~~~~~~~~~ 1240 + 1241 + On success 0 is returned, on error -1 and the ``errno`` variable is set 1242 + appropriately. The generic error codes are described at the 1243 + :ref:`Generic Error Codes <gen-errors>` chapter. 1244 + 1245 + 1246 + ----- 1247 + 1248 + 1249 + VIDEO_GET_EVENT 1250 + --------------- 1251 + 1252 + Synopsis 1253 + ~~~~~~~~ 1254 + 1255 + .. c:macro:: VIDEO_GET_EVENT 1256 + 1257 + .. code-block:: c 1258 + 1259 + int ioctl(fd, int request = VIDEO_GET_EVENT, 1260 + struct video_event *ev) 1261 + 1262 + Arguments 1263 + ~~~~~~~~~ 1264 + 1265 + .. flat-table:: 1266 + :header-rows: 0 1267 + :stub-columns: 0 1268 + 1269 + - .. 1270 + 1271 + - ``int fd`` 1272 + 1273 + - :cspan:`1` File descriptor returned by a previous call 1274 + to `open()`_. 1275 + 1276 + - .. 1277 + 1278 + - ``int request`` 1279 + 1280 + - Equals ``VIDEO_GET_EVENT`` for this command. 1281 + 1282 + - .. 1283 + 1284 + - ``struct`` `video_event`_ ``*ev`` 1285 + 1286 + - Points to the location where the event, if any, is to be stored. 1287 + 1288 + Description 1289 + ~~~~~~~~~~~ 1290 + 1291 + .. attention:: Do **not** use in new drivers! 1292 + See: :ref:`legacy_dvb_decoder_notes` 1293 + 1294 + This ioctl is for DVB devices only. To get events from a V4L2 decoder 1295 + use the V4L2 :ref:`VIDIOC_DQEVENT` ioctl instead. 1296 + 1297 + This ioctl call returns an event of type `video_event`_ if available. A 1298 + certain number of the latest events will be cued and returned in order of 1299 + occurrence. Older events may be discarded if not fetched in time. If 1300 + an event is not available, the behavior depends on whether the device is 1301 + in blocking or non-blocking mode. In the latter case, the call fails 1302 + immediately with errno set to ``EWOULDBLOCK``. In the former case, the 1303 + call blocks until an event becomes available. The standard Linux poll() 1304 + and/or select() system calls can be used with the device file descriptor 1305 + to watch for new events. For select(), the file descriptor should be 1306 + included in the exceptfds argument, and for poll(), POLLPRI should be 1307 + specified as the wake-up condition. Read-only permissions are sufficient 1308 + for this ioctl call. 1309 + 1310 + Return Value 1311 + ~~~~~~~~~~~~ 1312 + 1313 + On success 0 is returned, on error -1 and the ``errno`` variable is set 1314 + appropriately. The generic error codes are described at the 1315 + :ref:`Generic Error Codes <gen-errors>` chapter. 1316 + 1317 + .. flat-table:: 1318 + :header-rows: 0 1319 + :stub-columns: 0 1320 + 1321 + - .. 1322 + 1323 + - ``EWOULDBLOCK`` 1324 + 1325 + - :cspan:`1` There is no event pending, and the device is in 1326 + non-blocking mode. 1327 + 1328 + - .. 1329 + 1330 + - ``EOVERFLOW`` 1331 + 1332 + - Overflow in event queue - one or more events were lost. 1333 + 1334 + 1335 + ----- 1336 + 1337 + 1338 + VIDEO_SET_DISPLAY_FORMAT 1339 + ------------------------ 1340 + 1341 + Synopsis 1342 + ~~~~~~~~ 1343 + 1344 + .. c:macro:: VIDEO_SET_DISPLAY_FORMAT 1345 + 1346 + .. code-block:: c 1347 + 1348 + int ioctl(fd, int request = VIDEO_SET_DISPLAY_FORMAT, 1349 + video_display_format_t format) 1350 + 1351 + Arguments 1352 + ~~~~~~~~~ 1353 + 1354 + .. flat-table:: 1355 + :header-rows: 0 1356 + :stub-columns: 0 1357 + 1358 + - .. 1359 + 1360 + - ``int fd`` 1361 + 1362 + - :cspan:`1` File descriptor returned by a previous call 1363 + to `open()`_. 1364 + 1365 + - .. 1366 + 1367 + - ``int request`` 1368 + 1369 + - Equals ``VIDEO_SET_DISPLAY_FORMAT`` for this command. 1370 + 1371 + - .. 1372 + 1373 + - `video_displayformat_t`_ ``format`` 1374 + 1375 + - Selects the video format to be used. 1376 + 1377 + Description 1378 + ~~~~~~~~~~~ 1379 + 1380 + .. attention:: Do **not** use in new drivers! 1381 + See: :ref:`legacy_dvb_decoder_notes` 1382 + 1383 + This ioctl call asks the Video Device to select the video format to be 1384 + applied by the MPEG chip on the video. 1385 + 1386 + Return Value 1387 + ~~~~~~~~~~~~ 1388 + 1389 + On success 0 is returned, on error -1 and the ``errno`` variable is set 1390 + appropriately. The generic error codes are described at the 1391 + :ref:`Generic Error Codes <gen-errors>` chapter. 1392 + 1393 + 1394 + ----- 1395 + 1396 + 1397 + VIDEO_STILLPICTURE 1398 + ------------------ 1399 + 1400 + Synopsis 1401 + ~~~~~~~~ 1402 + 1403 + .. c:macro:: VIDEO_STILLPICTURE 1404 + 1405 + .. code-block:: c 1406 + 1407 + int ioctl(fd, int request = VIDEO_STILLPICTURE, 1408 + struct video_still_picture *sp) 1409 + 1410 + Arguments 1411 + ~~~~~~~~~ 1412 + 1413 + .. flat-table:: 1414 + :header-rows: 0 1415 + :stub-columns: 0 1416 + 1417 + - .. 1418 + 1419 + - ``int fd`` 1420 + 1421 + - :cspan:`1` File descriptor returned by a previous call 1422 + to `open()`_. 1423 + 1424 + - .. 1425 + 1426 + - ``int request`` 1427 + 1428 + - Equals ``VIDEO_STILLPICTURE`` for this command. 1429 + 1430 + - .. 1431 + 1432 + - ``struct`` `video_still_picture`_ ``*sp`` 1433 + 1434 + - Pointer to the location where the struct with the I-frame 1435 + and size is stored. 1436 + 1437 + Description 1438 + ~~~~~~~~~~~ 1439 + 1440 + .. attention:: Do **not** use in new drivers! 1441 + See: :ref:`legacy_dvb_decoder_notes` 1442 + 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 1447 + be supported by the device. If the pointer is NULL, then the current 1448 + displayed still picture is blanked. 1449 + 1450 + e.g. The AV7110 supports MPEG1 and MPEG2 with the common PAL-SD 1451 + resolutions. 1452 + 1453 + Return Value 1454 + ~~~~~~~~~~~~ 1455 + 1456 + On success 0 is returned, on error -1 and the ``errno`` variable is set 1457 + appropriately. The generic error codes are described at the 1458 + :ref:`Generic Error Codes <gen-errors>` chapter. 1459 + 1460 + 1461 + ----- 1462 + 1463 + 1464 + VIDEO_FAST_FORWARD 1465 + ------------------ 1466 + 1467 + Synopsis 1468 + ~~~~~~~~ 1469 + 1470 + .. c:macro:: VIDEO_FAST_FORWARD 1471 + 1472 + .. code-block:: c 1473 + 1474 + int ioctl(fd, int request = VIDEO_FAST_FORWARD, int nFrames) 1475 + 1476 + Arguments 1477 + ~~~~~~~~~ 1478 + 1479 + .. flat-table:: 1480 + :header-rows: 0 1481 + :stub-columns: 0 1482 + 1483 + - .. 1484 + 1485 + - ``int fd`` 1486 + 1487 + - :cspan:`1` File descriptor returned by a previous call 1488 + to `open()`_. 1489 + 1490 + - .. 1491 + 1492 + - ``int request`` 1493 + 1494 + - Equals ``VIDEO_FAST_FORWARD`` for this command. 1495 + 1496 + - .. 1497 + 1498 + - ``int nFrames`` 1499 + 1500 + - The number of frames to skip. 1501 + 1502 + Description 1503 + ~~~~~~~~~~~ 1504 + 1505 + .. attention:: Do **not** use in new drivers! 1506 + See: :ref:`legacy_dvb_decoder_notes` 1507 + 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 1510 + selected. 1511 + 1512 + Return Value 1513 + ~~~~~~~~~~~~ 1514 + 1515 + On success 0 is returned, on error -1 and the ``errno`` variable is set 1516 + appropriately. The generic error codes are described at the 1517 + :ref:`Generic Error Codes <gen-errors>` chapter. 1518 + 1519 + .. flat-table:: 1520 + :header-rows: 0 1521 + :stub-columns: 0 1522 + 1523 + - .. 1524 + 1525 + - ``EPERM`` 1526 + 1527 + - Mode ``VIDEO_SOURCE_MEMORY`` not selected. 1528 + 1529 + 1530 + ----- 1531 + 1532 + 1533 + VIDEO_SLOWMOTION 1534 + ---------------- 1535 + 1536 + Synopsis 1537 + ~~~~~~~~ 1538 + 1539 + .. c:macro:: VIDEO_SLOWMOTION 1540 + 1541 + .. code-block:: c 1542 + 1543 + int ioctl(fd, int request = VIDEO_SLOWMOTION, int nFrames) 1544 + 1545 + Arguments 1546 + ~~~~~~~~~ 1547 + 1548 + .. flat-table:: 1549 + :header-rows: 0 1550 + :stub-columns: 0 1551 + 1552 + - .. 1553 + 1554 + - ``int fd`` 1555 + 1556 + - :cspan:`1` File descriptor returned by a previous call 1557 + to `open()`_. 1558 + 1559 + - .. 1560 + 1561 + - ``int request`` 1562 + 1563 + - Equals ``VIDEO_SLOWMOTION`` for this command. 1564 + 1565 + - .. 1566 + 1567 + - ``int nFrames`` 1568 + 1569 + - The number of times to repeat each frame. 1570 + 1571 + Description 1572 + ~~~~~~~~~~~ 1573 + 1574 + .. attention:: Do **not** use in new drivers! 1575 + See: :ref:`legacy_dvb_decoder_notes` 1576 + 1577 + This ioctl call asks the video device to repeat decoding frames N number 1578 + of times. This call can only be used if ``VIDEO_SOURCE_MEMORY`` is 1579 + selected. 1580 + 1581 + Return Value 1582 + ~~~~~~~~~~~~ 1583 + 1584 + On success 0 is returned, on error -1 and the ``errno`` variable is set 1585 + appropriately. The generic error codes are described at the 1586 + :ref:`Generic Error Codes <gen-errors>` chapter. 1587 + 1588 + .. flat-table:: 1589 + :header-rows: 0 1590 + :stub-columns: 0 1591 + 1592 + - .. 1593 + 1594 + - ``EPERM`` 1595 + 1596 + - Mode ``VIDEO_SOURCE_MEMORY`` not selected. 1597 + 1598 + 1599 + ----- 1600 + 1601 + 1602 + VIDEO_GET_CAPABILITIES 1603 + ---------------------- 1604 + 1605 + Synopsis 1606 + ~~~~~~~~ 1607 + 1608 + .. c:macro:: VIDEO_GET_CAPABILITIES 1609 + 1610 + .. code-block:: c 1611 + 1612 + int ioctl(fd, int request = VIDEO_GET_CAPABILITIES, unsigned int *cap) 1613 + 1614 + Arguments 1615 + ~~~~~~~~~ 1616 + 1617 + .. flat-table:: 1618 + :header-rows: 0 1619 + :stub-columns: 0 1620 + 1621 + - .. 1622 + 1623 + - ``int fd`` 1624 + 1625 + - :cspan:`1` File descriptor returned by a previous call 1626 + to `open()`_. 1627 + 1628 + - .. 1629 + 1630 + - ``int request`` 1631 + 1632 + - Equals ``VIDEO_GET_CAPABILITIES`` for this command. 1633 + 1634 + - .. 1635 + 1636 + - ``unsigned int *cap`` 1637 + 1638 + - Pointer to a location where to store the capability information. 1639 + 1640 + Description 1641 + ~~~~~~~~~~~ 1642 + 1643 + .. attention:: Do **not** use in new drivers! 1644 + See: :ref:`legacy_dvb_decoder_notes` 1645 + 1646 + This ioctl call asks the video device about its decoding capabilities. 1647 + On success it returns an integer which has bits set according to the 1648 + defines in `video capabilities`_. 1649 + 1650 + Return Value 1651 + ~~~~~~~~~~~~ 1652 + 1653 + On success 0 is returned, on error -1 and the ``errno`` variable is set 1654 + appropriately. The generic error codes are described at the 1655 + :ref:`Generic Error Codes <gen-errors>` chapter. 1656 + 1657 + 1658 + ----- 1659 + 1660 + 1661 + VIDEO_CLEAR_BUFFER 1662 + ------------------ 1663 + 1664 + Synopsis 1665 + ~~~~~~~~ 1666 + 1667 + .. c:macro:: VIDEO_CLEAR_BUFFER 1668 + 1669 + .. code-block:: c 1670 + 1671 + int ioctl(fd, int request = VIDEO_CLEAR_BUFFER) 1672 + 1673 + Arguments 1674 + ~~~~~~~~~ 1675 + 1676 + .. flat-table:: 1677 + :header-rows: 0 1678 + :stub-columns: 0 1679 + 1680 + - .. 1681 + 1682 + - ``int fd`` 1683 + 1684 + - :cspan:`1` File descriptor returned by a previous call 1685 + to `open()`_. 1686 + 1687 + - .. 1688 + 1689 + - ``int request`` 1690 + 1691 + - Equals ``VIDEO_CLEAR_BUFFER`` for this command. 1692 + 1693 + Description 1694 + ~~~~~~~~~~~ 1695 + 1696 + .. attention:: Do **not** use in new drivers! 1697 + See: :ref:`legacy_dvb_decoder_notes` 1698 + 1699 + This ioctl call clears all video buffers in the driver and in the 1700 + decoder hardware. 1701 + 1702 + Return Value 1703 + ~~~~~~~~~~~~ 1704 + 1705 + On success 0 is returned, on error -1 and the ``errno`` variable is set 1706 + appropriately. The generic error codes are described at the 1707 + :ref:`Generic Error Codes <gen-errors>` chapter. 1708 + 1709 + 1710 + ----- 1711 + 1712 + 1713 + VIDEO_SET_STREAMTYPE 1714 + -------------------- 1715 + 1716 + Synopsis 1717 + ~~~~~~~~ 1718 + 1719 + .. c:macro:: VIDEO_SET_STREAMTYPE 1720 + 1721 + .. code-block:: c 1722 + 1723 + int ioctl(fd, int request = VIDEO_SET_STREAMTYPE, int type) 1724 + 1725 + Arguments 1726 + ~~~~~~~~~ 1727 + 1728 + .. flat-table:: 1729 + :header-rows: 0 1730 + :stub-columns: 0 1731 + 1732 + - .. 1733 + 1734 + - ``int fd`` 1735 + 1736 + - :cspan:`1` File descriptor returned by a previous call 1737 + to `open()`_. 1738 + 1739 + - .. 1740 + 1741 + - ``int request`` 1742 + 1743 + - Equals ``VIDEO_SET_STREAMTYPE`` for this command. 1744 + 1745 + - .. 1746 + 1747 + - ``int type`` 1748 + 1749 + - Stream type. 1750 + 1751 + Description 1752 + ~~~~~~~~~~~ 1753 + 1754 + .. attention:: Do **not** use in new drivers! 1755 + See: :ref:`legacy_dvb_decoder_notes` 1756 + 1757 + This ioctl tells the driver which kind of stream to expect being written 1758 + to it. 1759 + Intelligent decoder might also not support or ignore (like the AV7110) 1760 + this call and determine the stream type themselves. 1761 + 1762 + Currently used stream types: 1763 + 1764 + .. flat-table:: 1765 + :header-rows: 1 1766 + :stub-columns: 0 1767 + 1768 + - .. 1769 + 1770 + - Codec 1771 + 1772 + - Stream type 1773 + 1774 + - .. 1775 + 1776 + - MPEG2 1777 + 1778 + - 0 1779 + 1780 + - .. 1781 + 1782 + - MPEG4 h.264 1783 + 1784 + - 1 1785 + 1786 + - .. 1787 + 1788 + - VC1 1789 + 1790 + - 3 1791 + 1792 + - .. 1793 + 1794 + - MPEG4 Part2 1795 + 1796 + - 4 1797 + 1798 + - .. 1799 + 1800 + - VC1 SM 1801 + 1802 + - 5 1803 + 1804 + - .. 1805 + 1806 + - MPEG1 1807 + 1808 + - 6 1809 + 1810 + - .. 1811 + 1812 + - HEVC h.265 1813 + 1814 + - | 7 1815 + | DREAMBOX: 22 1816 + 1817 + - .. 1818 + 1819 + - AVS 1820 + 1821 + - 16 1822 + 1823 + - .. 1824 + 1825 + - AVS2 1826 + 1827 + - 40 1828 + 1829 + Not every decoder supports all stream types. 1830 + 1831 + Return Value 1832 + ~~~~~~~~~~~~ 1833 + 1834 + On success 0 is returned, on error -1 and the ``errno`` variable is set 1835 + appropriately. The generic error codes are described at the 1836 + :ref:`Generic Error Codes <gen-errors>` chapter. 1837 + 1838 + 1839 + ----- 1840 + 1841 + 1842 + VIDEO_SET_FORMAT 1843 + ---------------- 1844 + 1845 + Synopsis 1846 + ~~~~~~~~ 1847 + 1848 + .. c:macro:: VIDEO_SET_FORMAT 1849 + 1850 + .. code-block:: c 1851 + 1852 + int ioctl(fd, int request = VIDEO_SET_FORMAT, video_format_t format) 1853 + 1854 + Arguments 1855 + ~~~~~~~~~ 1856 + 1857 + .. flat-table:: 1858 + :header-rows: 0 1859 + :stub-columns: 0 1860 + 1861 + - .. 1862 + 1863 + - ``int fd`` 1864 + 1865 + - :cspan:`1` File descriptor returned by a previous call 1866 + to `open()`_. 1867 + 1868 + - .. 1869 + 1870 + - ``int request`` 1871 + 1872 + - Equals ``VIDEO_SET_FORMAT`` for this command. 1873 + 1874 + - .. 1875 + 1876 + - `video_format_t`_ ``format`` 1877 + 1878 + - Video format of TV as defined in section `video_format_t`_. 1879 + 1880 + Description 1881 + ~~~~~~~~~~~ 1882 + 1883 + .. attention:: Do **not** use in new drivers! 1884 + See: :ref:`legacy_dvb_decoder_notes` 1885 + 1886 + This ioctl sets the screen format (aspect ratio) of the connected output 1887 + device (TV) so that the output of the decoder can be adjusted 1888 + accordingly. 1889 + 1890 + Return Value 1891 + ~~~~~~~~~~~~ 1892 + 1893 + On success 0 is returned, on error -1 and the ``errno`` variable is set 1894 + appropriately. The generic error codes are described at the 1895 + :ref:`Generic Error Codes <gen-errors>` chapter. 1896 + 1897 + 1898 + ----- 1899 + 1900 + 1901 + VIDEO_GET_SIZE 1902 + -------------- 1903 + 1904 + Synopsis 1905 + ~~~~~~~~ 1906 + 1907 + .. c:macro:: VIDEO_GET_SIZE 1908 + 1909 + .. code-block:: c 1910 + 1911 + int ioctl(int fd, int request = VIDEO_GET_SIZE, video_size_t *size) 1912 + 1913 + Arguments 1914 + ~~~~~~~~~ 1915 + 1916 + .. flat-table:: 1917 + :header-rows: 0 1918 + :stub-columns: 0 1919 + 1920 + - .. 1921 + 1922 + - ``int fd`` 1923 + 1924 + - :cspan:`1` File descriptor returned by a previous call, 1925 + to `open()`_. 1926 + 1927 + - .. 1928 + 1929 + - ``int request`` 1930 + 1931 + - Equals ``VIDEO_GET_SIZE`` for this command. 1932 + 1933 + - .. 1934 + 1935 + - `video_size_t`_ ``*size`` 1936 + 1937 + - Returns the size and aspect ratio. 1938 + 1939 + Description 1940 + ~~~~~~~~~~~ 1941 + 1942 + .. attention:: Do **not** use in new drivers! 1943 + See: :ref:`legacy_dvb_decoder_notes` 1944 + 1945 + This ioctl returns the size and aspect ratio. 1946 + 1947 + Return Value 1948 + ~~~~~~~~~~~~ 1949 + 1950 + On success 0 is returned, on error -1 and the ``errno`` variable is set 1951 + appropriately. The generic error codes are described at the 1952 + :ref:`Generic Error Codes <gen-errors>` chapter. 1953 + 1954 + 1955 + ----- 1956 + 1957 + 1958 + VIDEO_GET_PTS 1959 + ------------- 1960 + 1961 + Synopsis 1962 + ~~~~~~~~ 1963 + 1964 + .. c:macro:: VIDEO_GET_PTS 1965 + 1966 + .. code-block:: c 1967 + 1968 + int ioctl(int fd, int request = VIDEO_GET_PTS, __u64 *pts) 1969 + 1970 + Arguments 1971 + ~~~~~~~~~ 1972 + 1973 + .. flat-table:: 1974 + :header-rows: 0 1975 + :stub-columns: 0 1976 + 1977 + - .. 1978 + 1979 + - ``int fd`` 1980 + 1981 + - :cspan:`1` File descriptor returned by a previous call 1982 + to `open()`_. 1983 + 1984 + - .. 1985 + 1986 + - ``int request`` 1987 + 1988 + - Equals ``VIDEO_GET_PTS`` for this command. 1989 + 1990 + - .. 1991 + 1992 + - ``__u64 *pts`` 1993 + 1994 + - Returns the 33-bit timestamp as defined in ITU T-REC-H.222.0 / 1995 + ISO/IEC 13818-1. 1996 + 1997 + The PTS should belong to the currently played frame if possible, 1998 + but may also be a value close to it like the PTS of the last 1999 + decoded frame or the last PTS extracted by the PES parser. 2000 + 2001 + Description 2002 + ~~~~~~~~~~~ 2003 + 2004 + .. attention:: Do **not** use in new drivers! 2005 + See: :ref:`legacy_dvb_decoder_notes` 2006 + 2007 + For V4L2 decoders this ioctl has been replaced by the 2008 + ``V4L2_CID_MPEG_VIDEO_DEC_PTS`` control. 2009 + 2010 + This ioctl call asks the Video Device to return the current PTS 2011 + timestamp. 2012 + 2013 + Return Value 2014 + ~~~~~~~~~~~~ 2015 + 2016 + On success 0 is returned, on error -1 and the ``errno`` variable is set 2017 + appropriately. The generic error codes are described at the 2018 + :ref:`Generic Error Codes <gen-errors>` chapter. 2019 + 2020 + 2021 + ----- 2022 + 2023 + 2024 + VIDEO_GET_FRAME_COUNT 2025 + --------------------- 2026 + 2027 + Synopsis 2028 + ~~~~~~~~ 2029 + 2030 + .. c:macro:: VIDEO_GET_FRAME_COUNT 2031 + 2032 + .. code-block:: c 2033 + 2034 + int ioctl(int fd, VIDEO_GET_FRAME_COUNT, __u64 *pts) 2035 + 2036 + Arguments 2037 + ~~~~~~~~~ 2038 + 2039 + .. flat-table:: 2040 + :header-rows: 0 2041 + :stub-columns: 0 2042 + 2043 + - .. 2044 + 2045 + - ``int fd`` 2046 + 2047 + - :cspan:`1` File descriptor returned by a previous call 2048 + to `open()`_. 2049 + 2050 + - .. 2051 + 2052 + - ``int request`` 2053 + 2054 + - Equals ``VIDEO_GET_FRAME_COUNT`` for this command. 2055 + 2056 + - .. 2057 + 2058 + - ``__u64 *pts`` 2059 + 2060 + - Returns the number of frames displayed since the decoder was 2061 + started. 2062 + 2063 + Description 2064 + ~~~~~~~~~~~ 2065 + 2066 + .. attention:: Do **not** use in new drivers! 2067 + See: :ref:`legacy_dvb_decoder_notes` 2068 + 2069 + For V4L2 decoders this ioctl has been replaced by the 2070 + ``V4L2_CID_MPEG_VIDEO_DEC_FRAME`` control. 2071 + 2072 + This ioctl call asks the Video Device to return the number of displayed 2073 + frames since the decoder was started. 2074 + 2075 + Return Value 2076 + ~~~~~~~~~~~~ 2077 + 2078 + On success 0 is returned, on error -1 and the ``errno`` variable is set 2079 + appropriately. The generic error codes are described at the 2080 + :ref:`Generic Error Codes <gen-errors>` chapter. 2081 + 2082 + 2083 + ----- 2084 + 2085 + 2086 + VIDEO_COMMAND 2087 + ------------- 2088 + 2089 + Synopsis 2090 + ~~~~~~~~ 2091 + 2092 + .. c:macro:: VIDEO_COMMAND 2093 + 2094 + .. code-block:: c 2095 + 2096 + int ioctl(int fd, int request = VIDEO_COMMAND, 2097 + struct video_command *cmd) 2098 + 2099 + Arguments 2100 + ~~~~~~~~~ 2101 + 2102 + .. flat-table:: 2103 + :header-rows: 0 2104 + :stub-columns: 0 2105 + 2106 + - .. 2107 + 2108 + - ``int fd`` 2109 + 2110 + - :cspan:`1` File descriptor returned by a previous call 2111 + to `open()`_. 2112 + 2113 + - .. 2114 + 2115 + - ``int request`` 2116 + 2117 + - Equals ``VIDEO_COMMAND`` for this command. 2118 + 2119 + - .. 2120 + 2121 + - `struct video_command`_ ``*cmd`` 2122 + 2123 + - Commands the decoder. 2124 + 2125 + Description 2126 + ~~~~~~~~~~~ 2127 + 2128 + .. attention:: Do **not** use in new drivers! 2129 + See: :ref:`legacy_dvb_decoder_notes` 2130 + 2131 + For V4L2 decoders this ioctl has been replaced by the 2132 + :ref:`VIDIOC_DECODER_CMD` ioctl. 2133 + 2134 + This ioctl commands the decoder. The `struct video_command`_ is a 2135 + subset of the ``v4l2_decoder_cmd`` struct, so refer to the 2136 + :ref:`VIDIOC_DECODER_CMD` documentation for 2137 + more information. 2138 + 2139 + Return Value 2140 + ~~~~~~~~~~~~ 2141 + 2142 + On success 0 is returned, on error -1 and the ``errno`` variable is set 2143 + appropriately. The generic error codes are described at the 2144 + :ref:`Generic Error Codes <gen-errors>` chapter. 2145 + 2146 + 2147 + ----- 2148 + 2149 + 2150 + VIDEO_TRY_COMMAND 2151 + ----------------- 2152 + 2153 + Synopsis 2154 + ~~~~~~~~ 2155 + 2156 + .. c:macro:: VIDEO_TRY_COMMAND 2157 + 2158 + .. code-block:: c 2159 + 2160 + int ioctl(int fd, int request = VIDEO_TRY_COMMAND, 2161 + struct video_command *cmd) 2162 + 2163 + Arguments 2164 + ~~~~~~~~~ 2165 + 2166 + .. flat-table:: 2167 + :header-rows: 0 2168 + :stub-columns: 0 2169 + 2170 + - .. 2171 + 2172 + - ``int fd`` 2173 + 2174 + - :cspan:`1` File descriptor returned by a previous call 2175 + to `open()`_. 2176 + 2177 + - .. 2178 + 2179 + - ``int request`` 2180 + 2181 + - Equals ``VIDEO_TRY_COMMAND`` for this command. 2182 + 2183 + - .. 2184 + 2185 + - `struct video_command`_ ``*cmd`` 2186 + 2187 + - Try a decoder command. 2188 + 2189 + Description 2190 + ~~~~~~~~~~~ 2191 + 2192 + .. attention:: Do **not** use in new drivers! 2193 + See: :ref:`legacy_dvb_decoder_notes` 2194 + 2195 + For V4L2 decoders this ioctl has been replaced by the 2196 + :ref:`VIDIOC_TRY_DECODER_CMD <VIDIOC_DECODER_CMD>` ioctl. 2197 + 2198 + This ioctl tries a decoder command. The `struct video_command`_ is a 2199 + subset of the ``v4l2_decoder_cmd`` struct, so refer to the 2200 + :ref:`VIDIOC_TRY_DECODER_CMD <VIDIOC_DECODER_CMD>` documentation 2201 + for more information. 2202 + 2203 + Return Value 2204 + ~~~~~~~~~~~~ 2205 + 2206 + On success 0 is returned, on error -1 and the ``errno`` variable is set 2207 + appropriately. The generic error codes are described at the 2208 + :ref:`Generic Error Codes <gen-errors>` chapter. 2209 + 2210 + 2211 + ----- 2212 + 2213 + 2214 + open() 2215 + ------ 2216 + 2217 + Synopsis 2218 + ~~~~~~~~ 2219 + 2220 + .. code-block:: c 2221 + 2222 + #include <fcntl.h> 2223 + 2224 + .. c:function:: int open(const char *deviceName, int flags) 2225 + 2226 + Arguments 2227 + ~~~~~~~~~ 2228 + 2229 + .. flat-table:: 2230 + :header-rows: 0 2231 + :stub-columns: 0 2232 + 2233 + - .. 2234 + 2235 + - ``const char *deviceName`` 2236 + 2237 + - Name of specific video device. 2238 + 2239 + - .. 2240 + 2241 + - :rspan:`3` ``int flags`` 2242 + 2243 + - :cspan:`1` A bit-wise OR of the following flags: 2244 + 2245 + - .. 2246 + 2247 + - ``O_RDONLY`` 2248 + 2249 + - read-only access 2250 + 2251 + - .. 2252 + 2253 + - ``O_RDWR`` 2254 + 2255 + - read/write access 2256 + 2257 + - .. 2258 + 2259 + - ``O_NONBLOCK`` 2260 + - | Open in non-blocking mode 2261 + | (blocking mode is the default) 2262 + 2263 + Description 2264 + ~~~~~~~~~~~ 2265 + 2266 + This system call opens a named video device (e.g. 2267 + /dev/dvb/adapter?/video?) for subsequent use. 2268 + 2269 + When an open() call has succeeded, the device will be ready for use. The 2270 + significance of blocking or non-blocking mode is described in the 2271 + documentation for functions where there is a difference. It does not 2272 + affect the semantics of the open() call itself. A device opened in 2273 + blocking mode can later be put into non-blocking mode (and vice versa) 2274 + using the F_SETFL command of the fcntl system call. This is a standard 2275 + system call, documented in the Linux manual page for fcntl. Only one 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 2279 + ioctl call that can be used is `VIDEO_GET_STATUS`_. All other call will 2280 + return an error code. 2281 + 2282 + Return Value 2283 + ~~~~~~~~~~~~ 2284 + 2285 + .. flat-table:: 2286 + :header-rows: 0 2287 + :stub-columns: 0 2288 + 2289 + - .. 2290 + 2291 + - ``ENODEV`` 2292 + 2293 + - :cspan:`1` Device driver not loaded/available. 2294 + 2295 + - .. 2296 + 2297 + - ``EINTERNAL`` 2298 + 2299 + - Internal error. 2300 + 2301 + - .. 2302 + 2303 + - ``EBUSY`` 2304 + 2305 + - Device or resource busy. 2306 + 2307 + - .. 2308 + 2309 + - ``EINVAL`` 2310 + 2311 + - Invalid argument. 2312 + 2313 + 2314 + ----- 2315 + 2316 + 2317 + close() 2318 + ------- 2319 + 2320 + Synopsis 2321 + ~~~~~~~~ 2322 + 2323 + .. c:function:: int close(int fd) 2324 + 2325 + Arguments 2326 + ~~~~~~~~~ 2327 + 2328 + .. flat-table:: 2329 + :header-rows: 0 2330 + :stub-columns: 0 2331 + 2332 + - .. 2333 + 2334 + - ``int fd`` 2335 + 2336 + - :cspan:`1` File descriptor returned by a previous call 2337 + to `open()`_. 2338 + 2339 + Description 2340 + ~~~~~~~~~~~ 2341 + 2342 + This system call closes a previously opened video device. 2343 + 2344 + Return Value 2345 + ~~~~~~~~~~~~ 2346 + 2347 + .. flat-table:: 2348 + :header-rows: 0 2349 + :stub-columns: 0 2350 + 2351 + - .. 2352 + 2353 + - ``EBADF`` 2354 + 2355 + - fd is not a valid open file descriptor. 2356 + 2357 + 2358 + ----- 2359 + 2360 + 2361 + write() 2362 + ------- 2363 + 2364 + Synopsis 2365 + ~~~~~~~~ 2366 + 2367 + .. c:function:: size_t write(int fd, const void *buf, size_t count) 2368 + 2369 + Arguments 2370 + ~~~~~~~~~ 2371 + 2372 + .. flat-table:: 2373 + :header-rows: 0 2374 + :stub-columns: 0 2375 + 2376 + - .. 2377 + 2378 + - ``int fd`` 2379 + 2380 + - :cspan:`1` File descriptor returned by a previous call 2381 + to `open()`_. 2382 + 2383 + - .. 2384 + 2385 + - ``void *buf`` 2386 + 2387 + - Pointer to the buffer containing the PES data. 2388 + 2389 + - .. 2390 + 2391 + - ``size_t count`` 2392 + 2393 + - Size of buf. 2394 + 2395 + Description 2396 + ~~~~~~~~~~~ 2397 + 2398 + This system call can only be used if VIDEO_SOURCE_MEMORY is selected 2399 + in the ioctl call `VIDEO_SELECT_SOURCE`_. The data provided shall be in 2400 + PES format, unless the capability allows other formats. TS is the 2401 + most common format for storing DVB-data, it is usually supported too. 2402 + If O_NONBLOCK is not specified the function will block until buffer space 2403 + is available. The amount of data to be transferred is implied by count. 2404 + 2405 + .. note:: See: :ref:`DVB Data Formats <legacy_dvb_decoder_formats>` 2406 + 2407 + Return Value 2408 + ~~~~~~~~~~~~ 2409 + 2410 + .. flat-table:: 2411 + :header-rows: 0 2412 + :stub-columns: 0 2413 + 2414 + - .. 2415 + 2416 + - ``EPERM`` 2417 + 2418 + - :cspan:`1` Mode ``VIDEO_SOURCE_MEMORY`` not selected. 2419 + 2420 + - .. 2421 + 2422 + - ``ENOMEM`` 2423 + 2424 + - Attempted to write more data than the internal buffer can hold. 2425 + 2426 + - .. 2427 + 2428 + - ``EBADF`` 2429 + 2430 + - fd is not a valid open file descriptor.