Skip to content

Commit 6eab804

Browse files
committed
[media] DocBook: Change format for enum dmx_output documentation
Use a table for the Demux output. No new information added here. They were all merged inside the table. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
1 parent 6c72eda commit 6eab804

3 files changed

Lines changed: 47 additions & 29 deletions

File tree

‎Documentation/DocBook/media/Makefile‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,8 @@ ENUMS = \
8888

8989
ENUM_DEFS = \
9090
$(shell perl -e 'open IN,"cat @ARGV| cpp -fpreprocessed |"; while (<IN>) { if ($$enum) {print "$$1\n" if (/\s*([A-Z]\S+)\b/); } $$enum = 0 if ($$enum && /^\}/); $$enum = 1 if(/^\s*enum\s/); }; close IN;' \
91-
$(srctree)/include/uapi/linux/dvb/audio.h \
92-
$(srctree)/include/uapi/linux/dvb/ca.h \
9391
$(srctree)/include/uapi/linux/dvb/dmx.h \
94-
$(srctree)/include/uapi/linux/dvb/frontend.h \
95-
$(srctree)/include/uapi/linux/dvb/net.h \
96-
$(srctree)/include/uapi/linux/dvb/video.h)
92+
$(srctree)/include/uapi/linux/dvb/frontend.h)
9793

9894
STRUCTS = \
9995
$(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/videodev2.h) \
@@ -251,9 +247,14 @@ $(MEDIA_OBJ_DIR)/dmx.h.xml: $(srctree)/include/uapi/linux/dvb/dmx.h $(MEDIA_OBJ_
251247
@( \
252248
echo "<programlisting>") > $@
253249
@( \
250+
for ident in $(ENUM_DEFS) ; do \
251+
entity=`echo $$ident | tr _ -` ; \
252+
r="$$r s/([^\w\-])$$ident([^\w\-])/\1\&$$entity\;\2/g;";\
253+
done; \
254254
expand --tabs=8 < $< | \
255255
sed $(ESCAPE) $(DVB_DOCUMENTED) | \
256-
sed 's/i\.e\./&ie;/') >> $@
256+
sed 's/i\.e\./&ie;/' | \
257+
perl -ne "$$r print $$_;") >> $@
257258
@( \
258259
echo "</programlisting>") >> $@
259260

‎Documentation/DocBook/media/dvb/demux.xml‎

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,43 @@ accessed by including <constant>linux/dvb/dmx.h</constant> in your application.
88
<title>Demux Data Types</title>
99

1010
<section id="dmx-output-t">
11-
<title>dmx_output_t</title>
12-
<programlisting>
13-
typedef enum
14-
{
15-
DMX_OUT_DECODER, /&#x22C6; Streaming directly to decoder. &#x22C6;/
16-
DMX_OUT_TAP, /&#x22C6; Output going to a memory buffer &#x22C6;/
17-
/&#x22C6; (to be retrieved via the read command).&#x22C6;/
18-
DMX_OUT_TS_TAP, /&#x22C6; Output multiplexed into a new TS &#x22C6;/
19-
/&#x22C6; (to be retrieved by reading from the &#x22C6;/
20-
/&#x22C6; logical DVR device). &#x22C6;/
21-
DMX_OUT_TSDEMUX_TAP /&#x22C6; Like TS_TAP but retrieved from the DMX device &#x22C6;/
22-
} dmx_output_t;
23-
</programlisting>
24-
<para><constant>DMX_OUT_TAP</constant> delivers the stream output to the demux device on which the ioctl is
25-
called.
26-
</para>
27-
<para><constant>DMX_OUT_TS_TAP</constant> routes output to the logical DVR device <constant>/dev/dvb/adapter?/dvr?</constant>,
28-
which delivers a TS multiplexed from all filters for which <constant>DMX_OUT_TS_TAP</constant> was
29-
specified.
30-
</para>
11+
<title>Output for the demux</title>
12+
13+
<table pgwide="1" frame="none" id="dmx-output">
14+
<title>enum dmx_output</title>
15+
<tgroup cols="2">
16+
&cs-def;
17+
<thead>
18+
<row>
19+
<entry>ID</entry>
20+
<entry>Description</entry>
21+
</row>
22+
</thead>
23+
<tbody valign="top">
24+
<row>
25+
<entry align="char" id="DMX-OUT-DECODER">DMX_OUT_DECODER</entry>
26+
<entry>Streaming directly to decoder.</entry>
27+
</row><row>
28+
<entry align="char" id="DMX-OUT-TAP">DMX_OUT_TAP</entry>
29+
<entry>Output going to a memory buffer (to be retrieved via the
30+
read command). Delivers the stream output to the demux
31+
device on which the ioctl is called.</entry>
32+
</row><row>
33+
<entry align="char" id="DMX-OUT-TS-TAP">DMX_OUT_TS_TAP</entry>
34+
<entry>Output multiplexed into a new TS (to be retrieved by
35+
reading from the logical DVR device). Routes output to the
36+
logical DVR device <constant>/dev/dvb/adapter?/dvr?</constant>,
37+
which delivers a TS multiplexed from all filters for which
38+
<constant>DMX_OUT_TS_TAP</constant> was specified.</entry>
39+
</row><row>
40+
<entry align="char" id="DMX-OUT-TSDEMUX-TAP">DMX_OUT_TSDEMUX_TAP</entry>
41+
<entry>Like &DMX-OUT-TS-TAP; but retrieved from the DMX
42+
device.</entry>
43+
</row>
44+
</tbody>
45+
</tgroup>
46+
</table>
47+
3148
</section>
3249

3350
<section id="dmx-input-t">

‎include/uapi/linux/dvb/dmx.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#define DMX_FILTER_SIZE 16
3434

35-
typedef enum dmx_output
35+
enum dmx_output
3636
{
3737
DMX_OUT_DECODER, /* Streaming directly to decoder. */
3838
DMX_OUT_TAP, /* Output going to a memory buffer */
@@ -41,8 +41,9 @@ typedef enum dmx_output
4141
/* (to be retrieved by reading from the */
4242
/* logical DVR device). */
4343
DMX_OUT_TSDEMUX_TAP /* Like TS_TAP but retrieved from the DMX device */
44-
} dmx_output_t;
44+
};
4545

46+
typedef enum dmx_output dmx_output_t;
4647

4748
typedef enum dmx_input
4849
{
@@ -139,7 +140,6 @@ struct dmx_stc {
139140
__u64 stc; /* output: stc in 'base'*90 kHz units */
140141
};
141142

142-
143143
#define DMX_START _IO('o', 41)
144144
#define DMX_STOP _IO('o', 42)
145145
#define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params)

0 commit comments

Comments
 (0)