aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-08-09 06:27:12 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-11 15:25:25 -0400
commit8465efbb9a488628209d91ec7dbc436d89b13485 (patch)
treee14737ecca50be2ba65c769138a1755e2b25ed77 /Documentation/DocBook/media
parenta9d134f208570aee9ea8d4a2065ac21d37773385 (diff)
[media] DocBook: add missing DVB video ioctls
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/DocBook/media')
-rw-r--r--Documentation/DocBook/media/dvb/video.xml333
1 files changed, 322 insertions, 11 deletions
diff --git a/Documentation/DocBook/media/dvb/video.xml b/Documentation/DocBook/media/dvb/video.xml
index 25fb823226b4..3ea1ca7e785e 100644
--- a/Documentation/DocBook/media/dvb/video.xml
+++ b/Documentation/DocBook/media/dvb/video.xml
@@ -15,6 +15,10 @@ the audio and video device as well as the video4linux device.
15<para>The ioctls that deal with SPUs (sub picture units) and navigation packets are only 15<para>The ioctls that deal with SPUs (sub picture units) and navigation packets are only
16supported on some MPEG decoders made for DVD playback. 16supported on some MPEG decoders made for DVD playback.
17</para> 17</para>
18<para>
19These ioctls were also used by V4L2 to control MPEG decoders implemented in V4L2. The use
20of these ioctls for that purpose has been made obsolete and proper V4L2 ioctls or controls
21have been created to replace that functionality.</para>
18<section id="video_types"> 22<section id="video_types">
19<title>Video Data Types</title> 23<title>Video Data Types</title>
20 24
@@ -55,7 +59,7 @@ typedef enum {
55</section> 59</section>
56 60
57<section id="video-stream-source-t"> 61<section id="video-stream-source-t">
58<title>video stream source</title> 62<title>video_stream_source_t</title>
59<para>The video stream source is set through the VIDEO_SELECT_SOURCE call and can take 63<para>The video stream source is set through the VIDEO_SELECT_SOURCE call and can take
60the following values, depending on whether we are replaying from an internal (demuxer) or 64the following values, depending on whether we are replaying from an internal (demuxer) or
61external (user write) source. 65external (user write) source.
@@ -76,7 +80,7 @@ call.
76</section> 80</section>
77 81
78<section id="video-play-state-t"> 82<section id="video-play-state-t">
79<title>video play state</title> 83<title>video_play_state_t</title>
80<para>The following values can be returned by the VIDEO_GET_STATUS call representing the 84<para>The following values can be returned by the VIDEO_GET_STATUS call representing the
81state of video playback. 85state of video playback.
82</para> 86</para>
@@ -90,9 +94,9 @@ typedef enum {
90</section> 94</section>
91 95
92<section id="video-command"> 96<section id="video-command">
97<title>struct video_command</title>
93<para>The structure must be zeroed before use by the application 98<para>The structure must be zeroed before use by the application
94This ensures it can be extended safely in the future.</para> 99This ensures it can be extended safely in the future.</para>
95<title>struct video-command</title>
96<programlisting> 100<programlisting>
97struct video_command { 101struct video_command {
98 __u32 cmd; 102 __u32 cmd;
@@ -121,7 +125,7 @@ struct video_command {
121</section> 125</section>
122 126
123<section id="video-size-t"> 127<section id="video-size-t">
124<title>struct video_size-t</title> 128<title>video_size_t</title>
125<programlisting> 129<programlisting>
126typedef struct { 130typedef struct {
127 int w; 131 int w;
@@ -217,7 +221,7 @@ bits set according to the hardwares capabilities.
217</section> 221</section>
218 222
219<section id="video-system"> 223<section id="video-system">
220<title>video system</title> 224<title>video_system_t</title>
221<para>A call to VIDEO_SET_SYSTEM sets the desired video system for TV output. The 225<para>A call to VIDEO_SET_SYSTEM sets the desired video system for TV output. The
222following system types can be set: 226following system types can be set:
223</para> 227</para>
@@ -263,7 +267,7 @@ call expects the following format for that information:
263 267
264</section> 268</section>
265<section id="video-spu"> 269<section id="video-spu">
266<title>video SPU</title> 270<title>struct video_spu</title>
267<para>Calling VIDEO_SET_SPU deactivates or activates SPU decoding, according to the 271<para>Calling VIDEO_SET_SPU deactivates or activates SPU decoding, according to the
268following format: 272following format:
269</para> 273</para>
@@ -277,12 +281,12 @@ following format:
277 281
278</section> 282</section>
279<section id="video-spu-palette"> 283<section id="video-spu-palette">
280<title>video SPU palette</title> 284<title>struct video_spu_palette</title>
281<para>The following structure is used to set the SPU palette by calling VIDEO_SPU_PALETTE: 285<para>The following structure is used to set the SPU palette by calling VIDEO_SPU_PALETTE:
282</para> 286</para>
283<programlisting> 287<programlisting>
284 typedef 288 typedef
285 struct video_spu_palette{ 289 struct video_spu_palette {
286 int length; 290 int length;
287 uint8_t &#x22C6;palette; 291 uint8_t &#x22C6;palette;
288 } video_spu_palette_t; 292 } video_spu_palette_t;
@@ -290,13 +294,13 @@ following format:
290 294
291</section> 295</section>
292<section id="video-navi-pack"> 296<section id="video-navi-pack">
293<title>video NAVI pack</title> 297<title>struct video_navi_pack</title>
294<para>In order to get the navigational data the following structure has to be passed to the ioctl 298<para>In order to get the navigational data the following structure has to be passed to the ioctl
295VIDEO_GET_NAVI: 299VIDEO_GET_NAVI:
296</para> 300</para>
297<programlisting> 301<programlisting>
298 typedef 302 typedef
299 struct video_navi_pack{ 303 struct video_navi_pack {
300 int length; /&#x22C6; 0 ... 1024 &#x22C6;/ 304 int length; /&#x22C6; 0 ... 1024 &#x22C6;/
301 uint8_t data[1024]; 305 uint8_t data[1024];
302 } video_navi_pack_t; 306 } video_navi_pack_t;
@@ -305,7 +309,7 @@ VIDEO_GET_NAVI:
305 309
306 310
307<section id="video-attributes-t"> 311<section id="video-attributes-t">
308<title>video attributes</title> 312<title>video_attributes_t</title>
309<para>The following attributes can be set by a call to VIDEO_SET_ATTRIBUTES: 313<para>The following attributes can be set by a call to VIDEO_SET_ATTRIBUTES:
310</para> 314</para>
311<programlisting> 315<programlisting>
@@ -541,6 +545,8 @@ VIDEO_GET_NAVI:
541role="subsection"><title>VIDEO_STOP</title> 545role="subsection"><title>VIDEO_STOP</title>
542<para>DESCRIPTION 546<para>DESCRIPTION
543</para> 547</para>
548<para>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2
549&VIDIOC-DECODER-CMD; instead.</para>
544<informaltable><tgroup cols="1"><tbody><row><entry 550<informaltable><tgroup cols="1"><tbody><row><entry
545 align="char"> 551 align="char">
546<para>This ioctl call asks the Video Device to stop playing the current stream. 552<para>This ioctl call asks the Video Device to stop playing the current stream.
@@ -598,6 +604,8 @@ role="subsection"><title>VIDEO_STOP</title>
598role="subsection"><title>VIDEO_PLAY</title> 604role="subsection"><title>VIDEO_PLAY</title>
599<para>DESCRIPTION 605<para>DESCRIPTION
600</para> 606</para>
607<para>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2
608&VIDIOC-DECODER-CMD; instead.</para>
601<informaltable><tgroup cols="1"><tbody><row><entry 609<informaltable><tgroup cols="1"><tbody><row><entry
602 align="char"> 610 align="char">
603<para>This ioctl call asks the Video Device to start playing a video stream from the 611<para>This ioctl call asks the Video Device to start playing a video stream from the
@@ -634,6 +642,8 @@ role="subsection"><title>VIDEO_PLAY</title>
634role="subsection"><title>VIDEO_FREEZE</title> 642role="subsection"><title>VIDEO_FREEZE</title>
635<para>DESCRIPTION 643<para>DESCRIPTION
636</para> 644</para>
645<para>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2
646&VIDIOC-DECODER-CMD; instead.</para>
637<informaltable><tgroup cols="1"><tbody><row><entry 647<informaltable><tgroup cols="1"><tbody><row><entry
638 align="char"> 648 align="char">
639<para>This ioctl call suspends the live video stream being played. Decoding 649<para>This ioctl call suspends the live video stream being played. Decoding
@@ -674,6 +684,8 @@ role="subsection"><title>VIDEO_FREEZE</title>
674role="subsection"><title>VIDEO_CONTINUE</title> 684role="subsection"><title>VIDEO_CONTINUE</title>
675<para>DESCRIPTION 685<para>DESCRIPTION
676</para> 686</para>
687<para>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2
688&VIDIOC-DECODER-CMD; instead.</para>
677<informaltable><tgroup cols="1"><tbody><row><entry 689<informaltable><tgroup cols="1"><tbody><row><entry
678 align="char"> 690 align="char">
679<para>This ioctl call restarts decoding and playing processes of the video stream 691<para>This ioctl call restarts decoding and playing processes of the video stream
@@ -710,6 +722,9 @@ role="subsection"><title>VIDEO_CONTINUE</title>
710role="subsection"><title>VIDEO_SELECT_SOURCE</title> 722role="subsection"><title>VIDEO_SELECT_SOURCE</title>
711<para>DESCRIPTION 723<para>DESCRIPTION
712</para> 724</para>
725<para>This ioctl is for DVB devices only. This ioctl was also supported by the
726V4L2 ivtv driver, but that has been replaced by the ivtv-specific
727<constant>IVTV_IOC_PASSTHROUGH_MODE</constant> ioctl.</para>
713<informaltable><tgroup cols="1"><tbody><row><entry 728<informaltable><tgroup cols="1"><tbody><row><entry
714 align="char"> 729 align="char">
715<para>This ioctl call informs the video device which source shall be used for the input 730<para>This ioctl call informs the video device which source shall be used for the input
@@ -845,10 +860,160 @@ role="subsection"><title>VIDEO_GET_STATUS</title>
845 </row></tbody></tgroup></informaltable> 860 </row></tbody></tgroup></informaltable>
846&return-value-dvb; 861&return-value-dvb;
847 862
863</section><section id="VIDEO_GET_FRAME_COUNT"
864role="subsection"><title>VIDEO_GET_FRAME_COUNT</title>
865<para>DESCRIPTION
866</para>
867<para>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this
868ioctl has been replaced by the <constant>V4L2_CID_MPEG_VIDEO_DEC_FRAME</constant> control.</para>
869<informaltable><tgroup cols="1"><tbody><row><entry
870 align="char">
871<para>This ioctl call asks the Video Device to return the number of displayed frames
872since the decoder was started.</para>
873</entry>
874 </row></tbody></tgroup></informaltable>
875<para>SYNOPSIS
876</para>
877<informaltable><tgroup cols="1"><tbody><row><entry
878 align="char">
879<para>int ioctl(int fd, int request =
880 VIDEO_GET_FRAME_COUNT, __u64 *pts);</para>
881</entry>
882 </row></tbody></tgroup></informaltable>
883<para>PARAMETERS
884</para>
885<informaltable><tgroup cols="2"><tbody><row><entry
886 align="char">
887<para>int fd</para>
888</entry><entry
889 align="char">
890<para>File descriptor returned by a previous call to open().</para>
891</entry>
892 </row><row><entry
893 align="char">
894<para>int request</para>
895</entry><entry
896 align="char">
897<para>Equals VIDEO_GET_FRAME_COUNT for this
898 command.</para>
899</entry>
900 </row><row><entry
901 align="char">
902<para>__u64 *pts
903</para>
904</entry><entry
905 align="char">
906<para>Returns the number of frames displayed since the decoder was started.
907</para>
908</entry>
909 </row></tbody></tgroup></informaltable>
910&return-value-dvb;
911
912</section><section id="VIDEO_GET_PTS"
913role="subsection"><title>VIDEO_GET_PTS</title>
914<para>DESCRIPTION
915</para>
916<para>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this
917ioctl has been replaced by the <constant>V4L2_CID_MPEG_VIDEO_DEC_PTS</constant> control.</para>
918<informaltable><tgroup cols="1"><tbody><row><entry
919 align="char">
920<para>This ioctl call asks the Video Device to return the current PTS timestamp.</para>
921</entry>
922 </row></tbody></tgroup></informaltable>
923<para>SYNOPSIS
924</para>
925<informaltable><tgroup cols="1"><tbody><row><entry
926 align="char">
927<para>int ioctl(int fd, int request =
928 VIDEO_GET_PTS, __u64 *pts);</para>
929</entry>
930 </row></tbody></tgroup></informaltable>
931<para>PARAMETERS
932</para>
933<informaltable><tgroup cols="2"><tbody><row><entry
934 align="char">
935<para>int fd</para>
936</entry><entry
937 align="char">
938<para>File descriptor returned by a previous call to open().</para>
939</entry>
940 </row><row><entry
941 align="char">
942<para>int request</para>
943</entry><entry
944 align="char">
945<para>Equals VIDEO_GET_PTS for this
946 command.</para>
947</entry>
948 </row><row><entry
949 align="char">
950<para>__u64 *pts
951</para>
952</entry><entry
953 align="char">
954<para>Returns the 33-bit timestamp as defined in ITU T-REC-H.222.0 / ISO/IEC 13818-1.
955</para>
956<para>
957The PTS should belong to the currently played
958frame if possible, but may also be a value close to it
959like the PTS of the last decoded frame or the last PTS
960extracted by the PES parser.</para>
961</entry>
962 </row></tbody></tgroup></informaltable>
963&return-value-dvb;
964
965</section><section id="VIDEO_GET_FRAME_RATE"
966role="subsection"><title>VIDEO_GET_FRAME_RATE</title>
967<para>DESCRIPTION
968</para>
969<informaltable><tgroup cols="1"><tbody><row><entry
970 align="char">
971<para>This ioctl call asks the Video Device to return the current framerate.</para>
972</entry>
973 </row></tbody></tgroup></informaltable>
974<para>SYNOPSIS
975</para>
976<informaltable><tgroup cols="1"><tbody><row><entry
977 align="char">
978<para>int ioctl(int fd, int request =
979 VIDEO_GET_FRAME_RATE, unsigned int *rate);</para>
980</entry>
981 </row></tbody></tgroup></informaltable>
982<para>PARAMETERS
983</para>
984<informaltable><tgroup cols="2"><tbody><row><entry
985 align="char">
986<para>int fd</para>
987</entry><entry
988 align="char">
989<para>File descriptor returned by a previous call to open().</para>
990</entry>
991 </row><row><entry
992 align="char">
993<para>int request</para>
994</entry><entry
995 align="char">
996<para>Equals VIDEO_GET_FRAME_RATE for this
997 command.</para>
998</entry>
999 </row><row><entry
1000 align="char">
1001<para>unsigned int *rate
1002</para>
1003</entry><entry
1004 align="char">
1005<para>Returns the framerate in number of frames per 1000 seconds.
1006</para>
1007</entry>
1008 </row></tbody></tgroup></informaltable>
1009&return-value-dvb;
1010
848</section><section id="VIDEO_GET_EVENT" 1011</section><section id="VIDEO_GET_EVENT"
849role="subsection"><title>VIDEO_GET_EVENT</title> 1012role="subsection"><title>VIDEO_GET_EVENT</title>
850<para>DESCRIPTION 1013<para>DESCRIPTION
851</para> 1014</para>
1015<para>This ioctl is for DVB devices only. To get events from a V4L2 decoder use the V4L2
1016&VIDIOC-DQEVENT; ioctl instead.</para>
852<informaltable><tgroup cols="1"><tbody><row><entry 1017<informaltable><tgroup cols="1"><tbody><row><entry
853 align="char"> 1018 align="char">
854<para>This ioctl call returns an event of type video_event if available. If an event is 1019<para>This ioctl call returns an event of type video_event if available. If an event is
@@ -914,6 +1079,152 @@ role="subsection"><title>VIDEO_GET_EVENT</title>
914</entry> 1079</entry>
915 </row></tbody></tgroup></informaltable> 1080 </row></tbody></tgroup></informaltable>
916 1081
1082</section><section id="VIDEO_COMMAND"
1083role="subsection"><title>VIDEO_COMMAND</title>
1084<para>DESCRIPTION
1085</para>
1086<para>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this
1087ioctl has been replaced by the &VIDIOC-DECODER-CMD; ioctl.</para>
1088<informaltable><tgroup cols="1"><tbody><row><entry
1089 align="char">
1090<para>This ioctl commands the decoder. The <constant>video_command</constant> struct
1091is a subset of the <constant>v4l2_decoder_cmd</constant> struct, so refer to the
1092&VIDIOC-DECODER-CMD; documentation for more information.</para>
1093</entry>
1094 </row></tbody></tgroup></informaltable>
1095<para>SYNOPSIS
1096</para>
1097<informaltable><tgroup cols="1"><tbody><row><entry
1098 align="char">
1099<para>int ioctl(int fd, int request =
1100 VIDEO_COMMAND, struct video_command *cmd);</para>
1101</entry>
1102 </row></tbody></tgroup></informaltable>
1103<para>PARAMETERS
1104</para>
1105<informaltable><tgroup cols="2"><tbody><row><entry
1106 align="char">
1107<para>int fd</para>
1108</entry><entry
1109 align="char">
1110<para>File descriptor returned by a previous call to open().</para>
1111</entry>
1112 </row><row><entry
1113 align="char">
1114<para>int request</para>
1115</entry><entry
1116 align="char">
1117<para>Equals VIDEO_COMMAND for this
1118 command.</para>
1119</entry>
1120 </row><row><entry
1121 align="char">
1122<para>struct video_command *cmd
1123</para>
1124</entry><entry
1125 align="char">
1126<para>Commands the decoder.
1127</para>
1128</entry>
1129 </row></tbody></tgroup></informaltable>
1130&return-value-dvb;
1131
1132</section><section id="VIDEO_TRY_COMMAND"
1133role="subsection"><title>VIDEO_TRY_COMMAND</title>
1134<para>DESCRIPTION
1135</para>
1136<para>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this
1137ioctl has been replaced by the &VIDIOC-TRY-DECODER-CMD; ioctl.</para>
1138<informaltable><tgroup cols="1"><tbody><row><entry
1139 align="char">
1140<para>This ioctl tries a decoder command. The <constant>video_command</constant> struct
1141is a subset of the <constant>v4l2_decoder_cmd</constant> struct, so refer to the
1142&VIDIOC-TRY-DECODER-CMD; documentation for more information.</para>
1143</entry>
1144 </row></tbody></tgroup></informaltable>
1145<para>SYNOPSIS
1146</para>
1147<informaltable><tgroup cols="1"><tbody><row><entry
1148 align="char">
1149<para>int ioctl(int fd, int request =
1150 VIDEO_TRY_COMMAND, struct video_command *cmd);</para>
1151</entry>
1152 </row></tbody></tgroup></informaltable>
1153<para>PARAMETERS
1154</para>
1155<informaltable><tgroup cols="2"><tbody><row><entry
1156 align="char">
1157<para>int fd</para>
1158</entry><entry
1159 align="char">
1160<para>File descriptor returned by a previous call to open().</para>
1161</entry>
1162 </row><row><entry
1163 align="char">
1164<para>int request</para>
1165</entry><entry
1166 align="char">
1167<para>Equals VIDEO_TRY_COMMAND for this
1168 command.</para>
1169</entry>
1170 </row><row><entry
1171 align="char">
1172<para>struct video_command *cmd
1173</para>
1174</entry><entry
1175 align="char">
1176<para>Try a decoder command.
1177</para>
1178</entry>
1179 </row></tbody></tgroup></informaltable>
1180&return-value-dvb;
1181
1182</section><section id="VIDEO_GET_SIZE"
1183role="subsection"><title>VIDEO_GET_SIZE</title>
1184<para>DESCRIPTION
1185</para>
1186<informaltable><tgroup cols="1"><tbody><row><entry
1187 align="char">
1188<para>This ioctl returns the size and aspect ratio.</para>
1189</entry>
1190 </row></tbody></tgroup></informaltable>
1191<para>SYNOPSIS
1192</para>
1193<informaltable><tgroup cols="1"><tbody><row><entry
1194 align="char">
1195<para>int ioctl(int fd, int request =
1196 VIDEO_GET_SIZE, video_size_t *size);</para>
1197</entry>
1198 </row></tbody></tgroup></informaltable>
1199<para>PARAMETERS
1200</para>
1201<informaltable><tgroup cols="2"><tbody><row><entry
1202 align="char">
1203<para>int fd</para>
1204</entry><entry
1205 align="char">
1206<para>File descriptor returned by a previous call to open().</para>
1207</entry>
1208 </row><row><entry
1209 align="char">
1210<para>int request</para>
1211</entry><entry
1212 align="char">
1213<para>Equals VIDEO_GET_SIZE for this
1214 command.</para>
1215</entry>
1216 </row><row><entry
1217 align="char">
1218<para>video_size_t *size
1219</para>
1220</entry><entry
1221 align="char">
1222<para>Returns the size and aspect ratio.
1223</para>
1224</entry>
1225 </row></tbody></tgroup></informaltable>
1226&return-value-dvb;
1227
917</section><section id="VIDEO_SET_DISPLAY_FORMAT" 1228</section><section id="VIDEO_SET_DISPLAY_FORMAT"
918role="subsection"><title>VIDEO_SET_DISPLAY_FORMAT</title> 1229role="subsection"><title>VIDEO_SET_DISPLAY_FORMAT</title>
919<para>DESCRIPTION 1230<para>DESCRIPTION