Merge tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[sfrench/cifs-2.6.git] / Documentation / media / uapi / dvb / dmx-get-pes-pids.rst
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/media/uapi/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 ================
13 DMX_GET_PES_PIDS
14 ================
15
16 Name
17 ----
18
19 DMX_GET_PES_PIDS
20
21
22 Synopsis
23 --------
24
25 .. c:function:: int ioctl(fd, DMX_GET_PES_PIDS, __u16 pids[5])
26     :name: DMX_GET_PES_PIDS
27
28 Arguments
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
38 Description
39 -----------
40
41 This ioctl allows to query a DVB device to return the first PID used
42 by audio, video, textext, subtitle and PCR programs on a given service.
43 They're stored as:
44
45 ======================= ========        =======================================
46 PID  element            position        content
47 ======================= ========        =======================================
48 pids[DMX_PES_AUDIO]     0               first audio PID
49 pids[DMX_PES_VIDEO]     1               first video PID
50 pids[DMX_PES_TELETEXT]  2               first teletext PID
51 pids[DMX_PES_SUBTITLE]  3               first subtitle PID
52 pids[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
62 Return Value
63 ------------
64
65 On success 0 is returned.
66
67 On error -1 is returned, and the ``errno`` variable is set
68 appropriately.
69
70 The generic error codes are described at the
71 :ref:`Generic Error Codes <gen-errors>` chapter.