2020-08-26 10:03:09 +03:00
|
|
|
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
|
2020-09-24 17:56:00 +03:00
|
|
|
.. c:namespace:: DTV.dmx
|
2018-08-30 17:15:26 +03:00
|
|
|
|
2016-07-05 16:37:31 +03:00
|
|
|
.. _DMX_GET_STC:
|
|
|
|
|
2016-07-05 13:58:48 +03:00
|
|
|
===========
|
2016-07-05 16:37:31 +03:00
|
|
|
DMX_GET_STC
|
|
|
|
===========
|
|
|
|
|
2016-07-05 21:14:35 +03:00
|
|
|
Name
|
2016-07-05 13:58:48 +03:00
|
|
|
----
|
2016-07-05 16:37:31 +03:00
|
|
|
|
2016-07-05 13:58:48 +03:00
|
|
|
DMX_GET_STC
|
2016-07-05 16:37:31 +03:00
|
|
|
|
2016-07-05 21:14:35 +03:00
|
|
|
Synopsis
|
2016-07-05 16:37:31 +03:00
|
|
|
--------
|
|
|
|
|
2020-09-24 17:56:00 +03:00
|
|
|
.. c:macro:: DMX_GET_STC
|
|
|
|
|
|
|
|
``int ioctl(int fd, DMX_GET_STC, struct dmx_stc *stc)``
|
2016-07-05 16:37:31 +03:00
|
|
|
|
2016-07-05 21:14:35 +03:00
|
|
|
Arguments
|
2016-07-05 13:58:48 +03:00
|
|
|
---------
|
2016-07-05 16:37:31 +03:00
|
|
|
|
2016-08-19 22:56:15 +03:00
|
|
|
``fd``
|
2020-09-24 17:56:00 +03:00
|
|
|
File descriptor returned by :c:func:`open()`.
|
2016-07-05 16:37:31 +03:00
|
|
|
|
2016-08-19 22:56:15 +03:00
|
|
|
``stc``
|
2017-09-01 19:21:49 +03:00
|
|
|
Pointer to :c:type:`dmx_stc` where the stc data is to be stored.
|
2016-07-05 16:37:31 +03:00
|
|
|
|
2016-07-05 21:14:35 +03:00
|
|
|
Description
|
2016-07-05 13:58:48 +03:00
|
|
|
-----------
|
|
|
|
|
|
|
|
This ioctl call returns the current value of the system time counter
|
2017-09-01 19:21:49 +03:00
|
|
|
(which is driven by a PES filter of type :c:type:`DMX_PES_PCR <dmx_ts_pes>`).
|
|
|
|
Some hardware supports more than one STC, so you must specify which one by
|
|
|
|
setting the :c:type:`num <dmx_stc>` field of stc before the ioctl (range 0...n).
|
|
|
|
The result is returned in form of a ratio with a 64 bit numerator
|
|
|
|
and a 32 bit denominator, so the real 90kHz STC value is
|
|
|
|
``stc->stc / stc->base``.
|
2016-07-05 13:58:48 +03:00
|
|
|
|
2016-07-05 21:14:35 +03:00
|
|
|
Return Value
|
2016-07-05 16:37:31 +03:00
|
|
|
------------
|
|
|
|
|
2017-09-01 19:15:43 +03:00
|
|
|
On success 0 is returned.
|
|
|
|
|
|
|
|
On error -1 is returned, and the ``errno`` variable is set
|
|
|
|
appropriately.
|
|
|
|
|
|
|
|
.. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
|
2016-07-05 16:37:31 +03:00
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
2017-09-01 19:15:43 +03:00
|
|
|
:widths: 1 16
|
2016-07-05 16:37:31 +03:00
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
- ``EINVAL``
|
|
|
|
|
|
|
|
- Invalid stc number.
|
2017-09-01 19:15:43 +03:00
|
|
|
|
|
|
|
The generic error codes are described at the
|
|
|
|
:ref:`Generic Error Codes <gen-errors>` chapter.
|