1.. Permission is granted to copy, distribute and/or modify this 2.. document under the terms of the GNU Free Documentation License, 3.. Version 1.1 or any later version published by the Free Software 4.. Foundation, with no Invariant Sections, no Front-Cover Texts 5.. and no Back-Cover Texts. A copy of the license is included at 6.. Documentation/userspace-api/media/fdl-appendix.rst. 7.. 8.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections 9 10.. _DMX_GET_PES_PIDS: 11 12================ 13DMX_GET_PES_PIDS 14================ 15 16Name 17---- 18 19DMX_GET_PES_PIDS 20 21 22Synopsis 23-------- 24 25.. c:function:: int ioctl(fd, DMX_GET_PES_PIDS, __u16 pids[5]) 26 :name: DMX_GET_PES_PIDS 27 28Arguments 29--------- 30 31``fd`` 32 File descriptor returned by :c:func:`open() <dvb-dmx-open>`. 33 34``pids`` 35 Array used to store 5 Program IDs. 36 37 38Description 39----------- 40 41This ioctl allows to query a DVB device to return the first PID used 42by audio, video, textext, subtitle and PCR programs on a given service. 43They're stored as: 44 45======================= ======== ======================================= 46PID element position content 47======================= ======== ======================================= 48pids[DMX_PES_AUDIO] 0 first audio PID 49pids[DMX_PES_VIDEO] 1 first video PID 50pids[DMX_PES_TELETEXT] 2 first teletext PID 51pids[DMX_PES_SUBTITLE] 3 first subtitle PID 52pids[DMX_PES_PCR] 4 first Program Clock Reference PID 53======================= ======== ======================================= 54 55 56.. note:: 57 58 A value equal to 0xffff means that the PID was not filled by the 59 Kernel. 60 61 62Return Value 63------------ 64 65On success 0 is returned. 66 67On error -1 is returned, and the ``errno`` variable is set 68appropriately. 69 70The generic error codes are described at the 71:ref:`Generic Error Codes <gen-errors>` chapter. 72