Commit 94fff0dc authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

doc-rst: dmx_fcalls: improve man-like format

Parsing this file were causing lots of warnings with sphinx,
due to the c function prototypes.

Fix that by prepending them with .. cpp:function::

While here, use the same way we document man-like pages,
at the V4L side of the book and add escapes to asterisks.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent ce0b746b
...@@ -9,10 +9,11 @@ Demux Function Calls ...@@ -9,10 +9,11 @@ Demux Function Calls
.. _dmx_fopen: .. _dmx_fopen:
open() DVB demux open()
====== ================
DESCRIPTION Description
-----------
This system call, used with a device name of /dev/dvb/adapter0/demux0, This system call, used with a device name of /dev/dvb/adapter0/demux0,
allocates a new filter and returns a handle which can be used for allocates a new filter and returns a handle which can be used for
...@@ -31,11 +32,13 @@ affect the semantics of the open() call itself. A device opened in ...@@ -31,11 +32,13 @@ affect the semantics of the open() call itself. A device opened in
blocking mode can later be put into non-blocking mode (and vice versa) blocking mode can later be put into non-blocking mode (and vice versa)
using the F_SETFL command of the fcntl system call. using the F_SETFL command of the fcntl system call.
SYNOPSIS Synopsis
--------
int open(const char *deviceName, int flags); .. c:function:: int open(const char *deviceName, int flags)
PARAMETERS Arguments
----------
...@@ -46,7 +49,7 @@ PARAMETERS ...@@ -46,7 +49,7 @@ PARAMETERS
- .. row 1 - .. row 1
- const char *deviceName - const char \*deviceName
- Name of demux device. - Name of demux device.
...@@ -72,7 +75,8 @@ PARAMETERS ...@@ -72,7 +75,8 @@ PARAMETERS
- (blocking mode is the default) - (blocking mode is the default)
RETURN VALUE Return Value
------------
...@@ -109,19 +113,22 @@ RETURN VALUE ...@@ -109,19 +113,22 @@ RETURN VALUE
.. _dmx_fclose: .. _dmx_fclose:
close() DVB demux close()
======= =================
DESCRIPTION Description
-----------
This system call deactivates and deallocates a filter that was This system call deactivates and deallocates a filter that was
previously allocated via the open() call. previously allocated via the open() call.
SYNOPSIS Synopsis
--------
int close(int fd); .. c:function:: int close(int fd)
PARAMETERS Arguments
----------
...@@ -137,7 +144,8 @@ PARAMETERS ...@@ -137,7 +144,8 @@ PARAMETERS
- File descriptor returned by a previous call to open(). - File descriptor returned by a previous call to open().
RETURN VALUE Return Value
------------
...@@ -156,21 +164,24 @@ RETURN VALUE ...@@ -156,21 +164,24 @@ RETURN VALUE
.. _dmx_fread: .. _dmx_fread:
read() DVB demux read()
====== ================
DESCRIPTION Description
-----------
This system call returns filtered data, which might be section or PES This system call returns filtered data, which might be section or PES
data. The filtered data is transferred from the driver’s internal data. The filtered data is transferred from the driver’s internal
circular buffer to buf. The maximum amount of data to be transferred is circular buffer to buf. The maximum amount of data to be transferred is
implied by count. implied by count.
SYNOPSIS Synopsis
--------
size_t read(int fd, void *buf, size_t count); .. c:function:: size_t read(int fd, void *buf, size_t count)
PARAMETERS Arguments
----------
...@@ -187,7 +198,7 @@ PARAMETERS ...@@ -187,7 +198,7 @@ PARAMETERS
- .. row 2 - .. row 2
- void *buf - void \*buf
- Pointer to the buffer to be used for returned filtered data. - Pointer to the buffer to be used for returned filtered data.
...@@ -198,7 +209,8 @@ PARAMETERS ...@@ -198,7 +209,8 @@ PARAMETERS
- Size of buf. - Size of buf.
RETURN VALUE Return Value
------------
...@@ -250,16 +262,17 @@ RETURN VALUE ...@@ -250,16 +262,17 @@ RETURN VALUE
- ``EFAULT`` - ``EFAULT``
- The driver failed to write to the callers buffer due to an invalid - The driver failed to write to the callers buffer due to an invalid
*buf pointer. \*buf pointer.
.. _dmx_fwrite: .. _dmx_fwrite:
write() DVB demux write()
======= =================
DESCRIPTION Description
-----------
This system call is only provided by the logical device This system call is only provided by the logical device
/dev/dvb/adapter0/dvr0, associated with the physical demux device that /dev/dvb/adapter0/dvr0, associated with the physical demux device that
...@@ -268,11 +281,13 @@ digitally recorded Transport Stream. Matching filters have to be defined ...@@ -268,11 +281,13 @@ digitally recorded Transport Stream. Matching filters have to be defined
in the corresponding physical demux device, /dev/dvb/adapter0/demux0. in the corresponding physical demux device, /dev/dvb/adapter0/demux0.
The amount of data to be transferred is implied by count. The amount of data to be transferred is implied by count.
SYNOPSIS Synopsis
--------
ssize_t write(int fd, const void *buf, size_t count); .. c:function:: ssize_t write(int fd, const void *buf, size_t count)
PARAMETERS Arguments
----------
...@@ -289,7 +304,7 @@ PARAMETERS ...@@ -289,7 +304,7 @@ PARAMETERS
- .. row 2 - .. row 2
- void *buf - void \*buf
- Pointer to the buffer containing the Transport Stream. - Pointer to the buffer containing the Transport Stream.
...@@ -300,7 +315,8 @@ PARAMETERS ...@@ -300,7 +315,8 @@ PARAMETERS
- Size of buf. - Size of buf.
RETURN VALUE Return Value
------------
...@@ -340,16 +356,19 @@ RETURN VALUE ...@@ -340,16 +356,19 @@ RETURN VALUE
DMX_START DMX_START
========= =========
DESCRIPTION Description
-----------
This ioctl call is used to start the actual filtering operation defined This ioctl call is used to start the actual filtering operation defined
via the ioctl calls DMX_SET_FILTER or DMX_SET_PES_FILTER. via the ioctl calls DMX_SET_FILTER or DMX_SET_PES_FILTER.
SYNOPSIS Synopsis
--------
int ioctl( int fd, int request = DMX_START); .. c:function:: int ioctl( int fd, int request = DMX_START)
PARAMETERS Arguments
----------
...@@ -371,7 +390,8 @@ PARAMETERS ...@@ -371,7 +390,8 @@ PARAMETERS
- Equals DMX_START for this command. - Equals DMX_START for this command.
RETURN VALUE Return Value
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the appropriately. The generic error codes are described at the
...@@ -407,17 +427,20 @@ appropriately. The generic error codes are described at the ...@@ -407,17 +427,20 @@ appropriately. The generic error codes are described at the
DMX_STOP DMX_STOP
======== ========
DESCRIPTION Description
-----------
This ioctl call is used to stop the actual filtering operation defined This ioctl call is used to stop the actual filtering operation defined
via the ioctl calls DMX_SET_FILTER or DMX_SET_PES_FILTER and via the ioctl calls DMX_SET_FILTER or DMX_SET_PES_FILTER and
started via the DMX_START command. started via the DMX_START command.
SYNOPSIS Synopsis
--------
int ioctl( int fd, int request = DMX_STOP); .. c:function:: int ioctl( int fd, int request = DMX_STOP)
PARAMETERS Arguments
----------
...@@ -439,7 +462,8 @@ PARAMETERS ...@@ -439,7 +462,8 @@ PARAMETERS
- Equals DMX_STOP for this command. - Equals DMX_STOP for this command.
RETURN VALUE Return Value
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the appropriately. The generic error codes are described at the
...@@ -451,7 +475,8 @@ appropriately. The generic error codes are described at the ...@@ -451,7 +475,8 @@ appropriately. The generic error codes are described at the
DMX_SET_FILTER DMX_SET_FILTER
============== ==============
DESCRIPTION Description
-----------
This ioctl call sets up a filter according to the filter and mask This ioctl call sets up a filter according to the filter and mask
parameters provided. A timeout may be defined stating number of seconds parameters provided. A timeout may be defined stating number of seconds
...@@ -464,12 +489,13 @@ operation should be started immediately (without waiting for a ...@@ -464,12 +489,13 @@ operation should be started immediately (without waiting for a
DMX_START ioctl call). If a filter was previously set-up, this filter DMX_START ioctl call). If a filter was previously set-up, this filter
will be canceled, and the receive buffer will be flushed. will be canceled, and the receive buffer will be flushed.
SYNOPSIS Synopsis
--------
int ioctl( int fd, int request = DMX_SET_FILTER, struct .. c:function:: int ioctl( int fd, int request = DMX_SET_FILTER, struct dmx_sct_filter_params *params)
dmx_sct_filter_params *params);
PARAMETERS Arguments
----------
...@@ -492,12 +518,13 @@ PARAMETERS ...@@ -492,12 +518,13 @@ PARAMETERS
- .. row 3 - .. row 3
- struct dmx_sct_filter_params *params - struct dmx_sct_filter_params \*params
- Pointer to structure containing filter parameters. - Pointer to structure containing filter parameters.
RETURN VALUE Return Value
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the appropriately. The generic error codes are described at the
...@@ -509,19 +536,21 @@ appropriately. The generic error codes are described at the ...@@ -509,19 +536,21 @@ appropriately. The generic error codes are described at the
DMX_SET_PES_FILTER DMX_SET_PES_FILTER
================== ==================
DESCRIPTION Description
-----------
This ioctl call sets up a PES filter according to the parameters This ioctl call sets up a PES filter according to the parameters
provided. By a PES filter is meant a filter that is based just on the provided. By a PES filter is meant a filter that is based just on the
packet identifier (PID), i.e. no PES header or payload filtering packet identifier (PID), i.e. no PES header or payload filtering
capability is supported. capability is supported.
SYNOPSIS Synopsis
--------
int ioctl( int fd, int request = DMX_SET_PES_FILTER, struct .. c:function:: int ioctl( int fd, int request = DMX_SET_PES_FILTER, struct dmx_pes_filter_params *params)
dmx_pes_filter_params *params);
PARAMETERS Arguments
----------
...@@ -544,12 +573,13 @@ PARAMETERS ...@@ -544,12 +573,13 @@ PARAMETERS
- .. row 3 - .. row 3
- struct dmx_pes_filter_params *params - struct dmx_pes_filter_params \*params
- Pointer to structure containing filter parameters. - Pointer to structure containing filter parameters.
RETURN VALUE Return Value
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the appropriately. The generic error codes are described at the
...@@ -578,19 +608,21 @@ appropriately. The generic error codes are described at the ...@@ -578,19 +608,21 @@ appropriately. The generic error codes are described at the
DMX_SET_BUFFER_SIZE DMX_SET_BUFFER_SIZE
=================== ===================
DESCRIPTION Description
-----------
This ioctl call is used to set the size of the circular buffer used for This ioctl call is used to set the size of the circular buffer used for
filtered data. The default size is two maximum sized sections, i.e. if filtered data. The default size is two maximum sized sections, i.e. if
this function is not called a buffer size of 2 * 4096 bytes will be this function is not called a buffer size of 2 \* 4096 bytes will be
used. used.
SYNOPSIS Synopsis
--------
int ioctl( int fd, int request = DMX_SET_BUFFER_SIZE, unsigned long .. c:function:: int ioctl( int fd, int request = DMX_SET_BUFFER_SIZE, unsigned long size)
size);
PARAMETERS Arguments
----------
...@@ -618,7 +650,8 @@ PARAMETERS ...@@ -618,7 +650,8 @@ PARAMETERS
- Size of circular buffer. - Size of circular buffer.
RETURN VALUE Return Value
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the appropriately. The generic error codes are described at the
...@@ -630,7 +663,8 @@ appropriately. The generic error codes are described at the ...@@ -630,7 +663,8 @@ appropriately. The generic error codes are described at the
DMX_GET_EVENT DMX_GET_EVENT
============= =============
DESCRIPTION Description
-----------
This ioctl call returns an event if available. If an event is not This ioctl call returns an event if available. If an event is not
available, the behavior depends on whether the device is in blocking or available, the behavior depends on whether the device is in blocking or
...@@ -638,12 +672,13 @@ non-blocking mode. In the latter case, the call fails immediately with ...@@ -638,12 +672,13 @@ non-blocking mode. In the latter case, the call fails immediately with
errno set to ``EWOULDBLOCK``. In the former case, the call blocks until an errno set to ``EWOULDBLOCK``. In the former case, the call blocks until an
event becomes available. event becomes available.
SYNOPSIS Synopsis
--------
int ioctl( int fd, int request = DMX_GET_EVENT, struct dmx_event .. c:function:: int ioctl( int fd, int request = DMX_GET_EVENT, struct dmx_event *ev)
*ev);
PARAMETERS Arguments
----------
...@@ -666,12 +701,13 @@ PARAMETERS ...@@ -666,12 +701,13 @@ PARAMETERS
- .. row 3 - .. row 3
- struct dmx_event *ev - struct dmx_event \*ev
- Pointer to the location where the event is to be stored. - Pointer to the location where the event is to be stored.
RETURN VALUE Return Value
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the appropriately. The generic error codes are described at the
...@@ -697,7 +733,8 @@ appropriately. The generic error codes are described at the ...@@ -697,7 +733,8 @@ appropriately. The generic error codes are described at the
DMX_GET_STC DMX_GET_STC
=========== ===========
DESCRIPTION Description
-----------
This ioctl call returns the current value of the system time counter This ioctl call returns the current value of the system time counter
(which is driven by a PES filter of type DMX_PES_PCR). Some hardware (which is driven by a PES filter of type DMX_PES_PCR). Some hardware
...@@ -706,11 +743,13 @@ num field of stc before the ioctl (range 0...n). The result is returned ...@@ -706,11 +743,13 @@ num 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 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 . the real 90kHz STC value is stc->stc / stc->base .
SYNOPSIS Synopsis
--------
int ioctl( int fd, int request = DMX_GET_STC, struct dmx_stc *stc); .. c:function:: int ioctl( int fd, int request = DMX_GET_STC, struct dmx_stc *stc)
PARAMETERS Arguments
----------
...@@ -733,12 +772,13 @@ PARAMETERS ...@@ -733,12 +772,13 @@ PARAMETERS
- .. row 3 - .. row 3
- struct dmx_stc *stc - struct dmx_stc \*stc
- Pointer to the location where the stc is to be stored. - Pointer to the location where the stc is to be stored.
RETURN VALUE Return Value
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the appropriately. The generic error codes are described at the
...@@ -764,15 +804,18 @@ appropriately. The generic error codes are described at the ...@@ -764,15 +804,18 @@ appropriately. The generic error codes are described at the
DMX_GET_PES_PIDS DMX_GET_PES_PIDS
================ ================
DESCRIPTION Description
-----------
This ioctl is undocumented. Documentation is welcome. This ioctl is undocumented. Documentation is welcome.
SYNOPSIS Synopsis
--------
int ioctl(fd, int request = DMX_GET_PES_PIDS, __u16[5]); .. c:function:: int ioctl(fd, int request = DMX_GET_PES_PIDS, __u16[5])
PARAMETERS Arguments
----------
...@@ -800,7 +843,8 @@ PARAMETERS ...@@ -800,7 +843,8 @@ PARAMETERS
- Undocumented. - Undocumented.
RETURN VALUE Return Value
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the appropriately. The generic error codes are described at the
...@@ -812,15 +856,18 @@ appropriately. The generic error codes are described at the ...@@ -812,15 +856,18 @@ appropriately. The generic error codes are described at the
DMX_GET_CAPS DMX_GET_CAPS
============ ============
DESCRIPTION Description
-----------
This ioctl is undocumented. Documentation is welcome. This ioctl is undocumented. Documentation is welcome.
SYNOPSIS Synopsis
--------
int ioctl(fd, int request = DMX_GET_CAPS, dmx_caps_t *); .. c:function:: int ioctl(fd, int request = DMX_GET_CAPS, dmx_caps_t *)
PARAMETERS Arguments
----------
...@@ -848,7 +895,8 @@ PARAMETERS ...@@ -848,7 +895,8 @@ PARAMETERS
- Undocumented. - Undocumented.
RETURN VALUE Return Value
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the appropriately. The generic error codes are described at the
...@@ -860,15 +908,18 @@ appropriately. The generic error codes are described at the ...@@ -860,15 +908,18 @@ appropriately. The generic error codes are described at the
DMX_SET_SOURCE DMX_SET_SOURCE
============== ==============
DESCRIPTION Description
-----------
This ioctl is undocumented. Documentation is welcome. This ioctl is undocumented. Documentation is welcome.
SYNOPSIS Synopsis
--------
int ioctl(fd, int request = DMX_SET_SOURCE, dmx_source_t *); .. c:function:: int ioctl(fd, int request = DMX_SET_SOURCE, dmx_source_t *)
PARAMETERS Arguments
----------
...@@ -896,7 +947,8 @@ PARAMETERS ...@@ -896,7 +947,8 @@ PARAMETERS
- Undocumented. - Undocumented.
RETURN VALUE Return Value
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the appropriately. The generic error codes are described at the
...@@ -908,17 +960,20 @@ appropriately. The generic error codes are described at the ...@@ -908,17 +960,20 @@ appropriately. The generic error codes are described at the
DMX_ADD_PID DMX_ADD_PID
=========== ===========
DESCRIPTION Description
-----------
This ioctl call allows to add multiple PIDs to a transport stream filter This ioctl call allows to add multiple PIDs to a transport stream filter
previously set up with DMX_SET_PES_FILTER and output equal to previously set up with DMX_SET_PES_FILTER and output equal to
DMX_OUT_TSDEMUX_TAP. DMX_OUT_TSDEMUX_TAP.
SYNOPSIS Synopsis
--------
int ioctl(fd, int request = DMX_ADD_PID, __u16 *); .. c:function:: int ioctl(fd, int request = DMX_ADD_PID, __u16 *)
PARAMETERS Arguments
----------
...@@ -946,7 +1001,8 @@ PARAMETERS ...@@ -946,7 +1001,8 @@ PARAMETERS
- PID number to be filtered. - PID number to be filtered.
RETURN VALUE Return Value
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the appropriately. The generic error codes are described at the
...@@ -958,18 +1014,21 @@ appropriately. The generic error codes are described at the ...@@ -958,18 +1014,21 @@ appropriately. The generic error codes are described at the
DMX_REMOVE_PID DMX_REMOVE_PID
============== ==============
DESCRIPTION Description
-----------
This ioctl call allows to remove a PID when multiple PIDs are set on a This ioctl call allows to remove a PID when multiple PIDs are set on a
transport stream filter, e. g. a filter previously set up with output transport stream filter, e. g. a filter previously set up with output
equal to DMX_OUT_TSDEMUX_TAP, created via either equal to DMX_OUT_TSDEMUX_TAP, created via either
DMX_SET_PES_FILTER or DMX_ADD_PID. DMX_SET_PES_FILTER or DMX_ADD_PID.
SYNOPSIS Synopsis
--------
int ioctl(fd, int request = DMX_REMOVE_PID, __u16 *); .. c:function:: int ioctl(fd, int request = DMX_REMOVE_PID, __u16 *)
PARAMETERS Arguments
----------
...@@ -997,7 +1056,8 @@ PARAMETERS ...@@ -997,7 +1056,8 @@ PARAMETERS
- PID of the PES filter to be removed. - PID of the PES filter to be removed.
RETURN VALUE Return Value
------------
On success 0 is returned, on error -1 and the ``errno`` variable is set On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the appropriately. The generic error codes are described at the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment