blob: fbdbc12869d1c7b88433e1226403df58944a510b [file] [log] [blame]
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -03001.. -*- coding: utf-8; mode: rst -*-
2
3.. _DMX_GET_PES_PIDS:
4
Mauro Carvalho Chehab586027c2016-07-05 07:58:48 -03005================
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -03006DMX_GET_PES_PIDS
7================
8
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -03009Name
Mauro Carvalho Chehab586027c2016-07-05 07:58:48 -030010----
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030011
Mauro Carvalho Chehab586027c2016-07-05 07:58:48 -030012DMX_GET_PES_PIDS
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030013
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -030014
15Synopsis
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030016--------
17
Mauro Carvalho Chehabcf8076c2016-08-19 16:56:15 -030018.. c:function:: int ioctl(fd, DMX_GET_PES_PIDS, __u16 pids[5])
19 :name: DMX_GET_PES_PIDS
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030020
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -030021Arguments
Mauro Carvalho Chehab586027c2016-07-05 07:58:48 -030022---------
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030023
Mauro Carvalho Chehabcf8076c2016-08-19 16:56:15 -030024``fd``
25 File descriptor returned by :c:func:`open() <dvb-dmx-open>`.
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030026
Mauro Carvalho Chehabcf8076c2016-08-19 16:56:15 -030027``pids``
Mauro Carvalho Chehab76df39f2017-09-01 13:44:28 -040028 Array used to store 5 Program IDs.
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030029
30
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -030031Description
Mauro Carvalho Chehab586027c2016-07-05 07:58:48 -030032-----------
33
Mauro Carvalho Chehab76df39f2017-09-01 13:44:28 -040034This ioctl allows to query a DVB device to return the first PID used
35by audio, video, textext, subtitle and PCR programs on a given service.
36They're stored as:
37
38======================= ======== =======================================
39PID element position content
40======================= ======== =======================================
41pids[DMX_PES_AUDIO] 0 first audio PID
42pids[DMX_PES_VIDEO] 1 first video PID
43pids[DMX_PES_TELETEXT] 2 first teletext PID
44pids[DMX_PES_SUBTITLE] 3 first subtitle PID
45pids[DMX_PES_PCR] 4 first Program Clock Reference PID
46======================= ======== =======================================
47
48
49.. note::
50
51 A value equal to 0xffff means that the PID was not filled by the
52 Kernel.
Mauro Carvalho Chehab586027c2016-07-05 07:58:48 -030053
54
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -030055Return Value
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030056------------
57
Mauro Carvalho Chehab9a721b92017-09-01 12:15:43 -040058On success 0 is returned.
59
60On error -1 is returned, and the ``errno`` variable is set
61appropriately.
62
63The generic error codes are described at the
Mauro Carvalho Chehab47d23e32016-07-05 10:37:31 -030064:ref:`Generic Error Codes <gen-errors>` chapter.