video.xml 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657
  1. <title>DVB Video Device</title>
  2. <para>The DVB video device controls the MPEG2 video decoder of the DVB hardware. It
  3. can be accessed through <emphasis role="tt">/dev/dvb/adapter0/video0</emphasis>. Data types and and
  4. ioctl definitions can be accessed by including <emphasis role="tt">linux/dvb/video.h</emphasis> in your
  5. application.
  6. </para>
  7. <para>Note that the DVB video device only controls decoding of the MPEG video stream, not
  8. its presentation on the TV or computer screen. On PCs this is typically handled by an
  9. associated video4linux device, e.g. <emphasis role="tt">/dev/video</emphasis>, which allows scaling and defining output
  10. windows.
  11. </para>
  12. <para>Some DVB cards don&#8217;t have their own MPEG decoder, which results in the omission of
  13. the audio and video device as well as the video4linux device.
  14. </para>
  15. <para>The ioctls that deal with SPUs (sub picture units) and navigation packets are only
  16. supported on some MPEG decoders made for DVD playback.
  17. </para>
  18. <section id="video_types">
  19. <title>Video Data Types</title>
  20. <section id="video-format-t">
  21. <title>video_format_t</title>
  22. <para>The <emphasis role="tt">video_format_t</emphasis> data type defined by
  23. </para>
  24. <programlisting>
  25. typedef enum {
  26. VIDEO_FORMAT_4_3, /&#x22C6; Select 4:3 format &#x22C6;/
  27. VIDEO_FORMAT_16_9, /&#x22C6; Select 16:9 format. &#x22C6;/
  28. VIDEO_FORMAT_221_1 /&#x22C6; 2.21:1 &#x22C6;/
  29. } video_format_t;
  30. </programlisting>
  31. <para>is used in the VIDEO_SET_FORMAT function (??) to tell the driver which aspect ratio
  32. the output hardware (e.g. TV) has. It is also used in the data structures video_status
  33. (??) returned by VIDEO_GET_STATUS (??) and video_event (??) returned by
  34. VIDEO_GET_EVENT (??) which report about the display format of the current video
  35. stream.
  36. </para>
  37. </section>
  38. <section id="video-displayformat-t">
  39. <title>video_displayformat_t</title>
  40. <para>In case the display format of the video stream and of the display hardware differ the
  41. application has to specify how to handle the cropping of the picture. This can be done using
  42. the VIDEO_SET_DISPLAY_FORMAT call (??) which accepts
  43. </para>
  44. <programlisting>
  45. typedef enum {
  46. VIDEO_PAN_SCAN, /&#x22C6; use pan and scan format &#x22C6;/
  47. VIDEO_LETTER_BOX, /&#x22C6; use letterbox format &#x22C6;/
  48. VIDEO_CENTER_CUT_OUT /&#x22C6; use center cut out format &#x22C6;/
  49. } video_displayformat_t;
  50. </programlisting>
  51. <para>as argument.
  52. </para>
  53. </section>
  54. <section id="video-stream-source-t">
  55. <title>video stream source</title>
  56. <para>The video stream source is set through the VIDEO_SELECT_SOURCE call and can take
  57. the following values, depending on whether we are replaying from an internal (demuxer) or
  58. external (user write) source.
  59. </para>
  60. <programlisting>
  61. typedef enum {
  62. VIDEO_SOURCE_DEMUX, /&#x22C6; Select the demux as the main source &#x22C6;/
  63. VIDEO_SOURCE_MEMORY /&#x22C6; If this source is selected, the stream
  64. comes from the user through the write
  65. system call &#x22C6;/
  66. } video_stream_source_t;
  67. </programlisting>
  68. <para>VIDEO_SOURCE_DEMUX selects the demultiplexer (fed either by the frontend or the
  69. DVR device) as the source of the video stream. If VIDEO_SOURCE_MEMORY
  70. is selected the stream comes from the application through the <emphasis role="tt">write()</emphasis> system
  71. call.
  72. </para>
  73. </section>
  74. <section id="video-play-state-t">
  75. <title>video play state</title>
  76. <para>The following values can be returned by the VIDEO_GET_STATUS call representing the
  77. state of video playback.
  78. </para>
  79. <programlisting>
  80. typedef enum {
  81. VIDEO_STOPPED, /&#x22C6; Video is stopped &#x22C6;/
  82. VIDEO_PLAYING, /&#x22C6; Video is currently playing &#x22C6;/
  83. VIDEO_FREEZED /&#x22C6; Video is freezed &#x22C6;/
  84. } video_play_state_t;
  85. </programlisting>
  86. </section>
  87. <section id="video-command">
  88. <para>The structure must be zeroed before use by the application
  89. This ensures it can be extended safely in the future.</para>
  90. <title>struct video-command</title>
  91. <programlisting>
  92. struct video_command {
  93. __u32 cmd;
  94. __u32 flags;
  95. union {
  96. struct {
  97. __u64 pts;
  98. } stop;
  99. struct {
  100. /&#x22C6; 0 or 1000 specifies normal speed,
  101. 1 specifies forward single stepping,
  102. -1 specifies backward single stepping,
  103. &gt;>1: playback at speed/1000 of the normal speed,
  104. &lt;-1: reverse playback at (-speed/1000) of the normal speed. &#x22C6;/
  105. __s32 speed;
  106. __u32 format;
  107. } play;
  108. struct {
  109. __u32 data[16];
  110. } raw;
  111. };
  112. };
  113. </programlisting>
  114. </section>
  115. <section id="video-size-t">
  116. <title>struct video_size-t</title>
  117. <programlisting>
  118. typedef struct {
  119. int w;
  120. int h;
  121. video_format_t aspect_ratio;
  122. } video_size_t;
  123. </programlisting>
  124. </section>
  125. <section id="video-event">
  126. <title>struct video_event</title>
  127. <para>The following is the structure of a video event as it is returned by the VIDEO_GET_EVENT
  128. call.
  129. </para>
  130. <programlisting>
  131. struct video_event {
  132. __s32 type;
  133. #define VIDEO_EVENT_SIZE_CHANGED 1
  134. #define VIDEO_EVENT_FRAME_RATE_CHANGED 2
  135. #define VIDEO_EVENT_DECODER_STOPPED 3
  136. #define VIDEO_EVENT_VSYNC 4
  137. __kernel_time_t timestamp;
  138. union {
  139. video_size_t size;
  140. unsigned int frame_rate; /&#x22C6; in frames per 1000sec &#x22C6;/
  141. unsigned char vsync_field; /&#x22C6; unknown/odd/even/progressive &#x22C6;/
  142. } u;
  143. };
  144. </programlisting>
  145. </section>
  146. <section id="video-status">
  147. <title>struct video_status</title>
  148. <para>The VIDEO_GET_STATUS call returns the following structure informing about various
  149. states of the playback operation.
  150. </para>
  151. <programlisting>
  152. struct video_status {
  153. int video_blank; /&#x22C6; blank video on freeze? &#x22C6;/
  154. video_play_state_t play_state; /&#x22C6; current state of playback &#x22C6;/
  155. video_stream_source_t stream_source; /&#x22C6; current source (demux/memory) &#x22C6;/
  156. video_format_t video_format; /&#x22C6; current aspect ratio of stream &#x22C6;/
  157. video_displayformat_t display_format;/&#x22C6; selected cropping mode &#x22C6;/
  158. };
  159. </programlisting>
  160. <para>If video_blank is set video will be blanked out if the channel is changed or if playback is
  161. stopped. Otherwise, the last picture will be displayed. play_state indicates if the video is
  162. currently frozen, stopped, or being played back. The stream_source corresponds to the seleted
  163. source for the video stream. It can come either from the demultiplexer or from memory.
  164. The video_format indicates the aspect ratio (one of 4:3 or 16:9) of the currently
  165. played video stream. Finally, display_format corresponds to the selected cropping
  166. mode in case the source video format is not the same as the format of the output
  167. device.
  168. </para>
  169. </section>
  170. <section id="video-still-picture">
  171. <title>struct video_still_picture</title>
  172. <para>An I-frame displayed via the VIDEO_STILLPICTURE call is passed on within the
  173. following structure.
  174. </para>
  175. <programlisting>
  176. /&#x22C6; pointer to and size of a single iframe in memory &#x22C6;/
  177. struct video_still_picture {
  178. char &#x22C6;iFrame; /&#x22C6; pointer to a single iframe in memory &#x22C6;/
  179. int32_t size;
  180. };
  181. </programlisting>
  182. </section>
  183. <section id="video_caps">
  184. <title>video capabilities</title>
  185. <para>A call to VIDEO_GET_CAPABILITIES returns an unsigned integer with the following
  186. bits set according to the hardwares capabilities.
  187. </para>
  188. <programlisting>
  189. /&#x22C6; bit definitions for capabilities: &#x22C6;/
  190. /&#x22C6; can the hardware decode MPEG1 and/or MPEG2? &#x22C6;/
  191. #define VIDEO_CAP_MPEG1 1
  192. #define VIDEO_CAP_MPEG2 2
  193. /&#x22C6; can you send a system and/or program stream to video device?
  194. (you still have to open the video and the audio device but only
  195. send the stream to the video device) &#x22C6;/
  196. #define VIDEO_CAP_SYS 4
  197. #define VIDEO_CAP_PROG 8
  198. /&#x22C6; can the driver also handle SPU, NAVI and CSS encoded data?
  199. (CSS API is not present yet) &#x22C6;/
  200. #define VIDEO_CAP_SPU 16
  201. #define VIDEO_CAP_NAVI 32
  202. #define VIDEO_CAP_CSS 64
  203. </programlisting>
  204. </section>
  205. <section id="video-system">
  206. <title>video system</title>
  207. <para>A call to VIDEO_SET_SYSTEM sets the desired video system for TV output. The
  208. following system types can be set:
  209. </para>
  210. <programlisting>
  211. typedef enum {
  212. VIDEO_SYSTEM_PAL,
  213. VIDEO_SYSTEM_NTSC,
  214. VIDEO_SYSTEM_PALN,
  215. VIDEO_SYSTEM_PALNc,
  216. VIDEO_SYSTEM_PALM,
  217. VIDEO_SYSTEM_NTSC60,
  218. VIDEO_SYSTEM_PAL60,
  219. VIDEO_SYSTEM_PALM60
  220. } video_system_t;
  221. </programlisting>
  222. </section>
  223. <section id="video-highlight">
  224. <title>struct video_highlight</title>
  225. <para>Calling the ioctl VIDEO_SET_HIGHLIGHTS posts the SPU highlight information. The
  226. call expects the following format for that information:
  227. </para>
  228. <programlisting>
  229. typedef
  230. struct video_highlight {
  231. boolean active; /&#x22C6; 1=show highlight, 0=hide highlight &#x22C6;/
  232. uint8_t contrast1; /&#x22C6; 7- 4 Pattern pixel contrast &#x22C6;/
  233. /&#x22C6; 3- 0 Background pixel contrast &#x22C6;/
  234. uint8_t contrast2; /&#x22C6; 7- 4 Emphasis pixel-2 contrast &#x22C6;/
  235. /&#x22C6; 3- 0 Emphasis pixel-1 contrast &#x22C6;/
  236. uint8_t color1; /&#x22C6; 7- 4 Pattern pixel color &#x22C6;/
  237. /&#x22C6; 3- 0 Background pixel color &#x22C6;/
  238. uint8_t color2; /&#x22C6; 7- 4 Emphasis pixel-2 color &#x22C6;/
  239. /&#x22C6; 3- 0 Emphasis pixel-1 color &#x22C6;/
  240. uint32_t ypos; /&#x22C6; 23-22 auto action mode &#x22C6;/
  241. /&#x22C6; 21-12 start y &#x22C6;/
  242. /&#x22C6; 9- 0 end y &#x22C6;/
  243. uint32_t xpos; /&#x22C6; 23-22 button color number &#x22C6;/
  244. /&#x22C6; 21-12 start x &#x22C6;/
  245. /&#x22C6; 9- 0 end x &#x22C6;/
  246. } video_highlight_t;
  247. </programlisting>
  248. </section>
  249. <section id="video-spu">
  250. <title>video SPU</title>
  251. <para>Calling VIDEO_SET_SPU deactivates or activates SPU decoding, according to the
  252. following format:
  253. </para>
  254. <programlisting>
  255. typedef
  256. struct video_spu {
  257. boolean active;
  258. int stream_id;
  259. } video_spu_t;
  260. </programlisting>
  261. </section>
  262. <section id="video-spu-palette">
  263. <title>video SPU palette</title>
  264. <para>The following structure is used to set the SPU palette by calling VIDEO_SPU_PALETTE:
  265. </para>
  266. <programlisting>
  267. typedef
  268. struct video_spu_palette{
  269. int length;
  270. uint8_t &#x22C6;palette;
  271. } video_spu_palette_t;
  272. </programlisting>
  273. </section>
  274. <section id="video-navi-pack">
  275. <title>video NAVI pack</title>
  276. <para>In order to get the navigational data the following structure has to be passed to the ioctl
  277. VIDEO_GET_NAVI:
  278. </para>
  279. <programlisting>
  280. typedef
  281. struct video_navi_pack{
  282. int length; /&#x22C6; 0 ... 1024 &#x22C6;/
  283. uint8_t data[1024];
  284. } video_navi_pack_t;
  285. </programlisting>
  286. </section>
  287. <section id="video-attributes-t">
  288. <title>video attributes</title>
  289. <para>The following attributes can be set by a call to VIDEO_SET_ATTRIBUTES:
  290. </para>
  291. <programlisting>
  292. typedef uint16_t video_attributes_t;
  293. /&#x22C6; bits: descr. &#x22C6;/
  294. /&#x22C6; 15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) &#x22C6;/
  295. /&#x22C6; 13-12 TV system (0=525/60, 1=625/50) &#x22C6;/
  296. /&#x22C6; 11-10 Aspect ratio (0=4:3, 3=16:9) &#x22C6;/
  297. /&#x22C6; 9- 8 permitted display mode on 4:3 monitor (0=both, 1=only pan-sca &#x22C6;/
  298. /&#x22C6; 7 line 21-1 data present in GOP (1=yes, 0=no) &#x22C6;/
  299. /&#x22C6; 6 line 21-2 data present in GOP (1=yes, 0=no) &#x22C6;/
  300. /&#x22C6; 5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 &#x22C6;/
  301. /&#x22C6; 2 source letterboxed (1=yes, 0=no) &#x22C6;/
  302. /&#x22C6; 0 film/camera mode (0=camera, 1=film (625/50 only)) &#x22C6;/
  303. </programlisting>
  304. </section></section>
  305. <section id="video_function_calls">
  306. <title>Video Function Calls</title>
  307. <section id="video_fopen">
  308. <title>open()</title>
  309. <para>DESCRIPTION
  310. </para>
  311. <informaltable><tgroup cols="1"><tbody><row><entry
  312. align="char">
  313. <para>This system call opens a named video device (e.g. /dev/dvb/adapter0/video0)
  314. for subsequent use.</para>
  315. <para>When an open() call has succeeded, the device will be ready for use.
  316. The significance of blocking or non-blocking mode is described in the
  317. documentation for functions where there is a difference. It does not affect the
  318. semantics of the open() call itself. A device opened in blocking mode can later
  319. be put into non-blocking mode (and vice versa) using the F_SETFL command
  320. of the fcntl system call. This is a standard system call, documented in the Linux
  321. manual page for fcntl. Only one user can open the Video Device in O_RDWR
  322. mode. All other attempts to open the device in this mode will fail, and an
  323. error-code will be returned. If the Video Device is opened in O_RDONLY
  324. mode, the only ioctl call that can be used is VIDEO_GET_STATUS. All other
  325. call will return an error code.</para>
  326. </entry>
  327. </row></tbody></tgroup></informaltable>
  328. <para>SYNOPSIS
  329. </para>
  330. <informaltable><tgroup cols="1"><tbody><row><entry
  331. align="char">
  332. <para>int open(const char &#x22C6;deviceName, int flags);</para>
  333. </entry>
  334. </row></tbody></tgroup></informaltable>
  335. <para>PARAMETERS
  336. </para>
  337. <informaltable><tgroup cols="2"><tbody><row><entry
  338. align="char">
  339. <para>const char
  340. *deviceName</para>
  341. </entry><entry
  342. align="char">
  343. <para>Name of specific video device.</para>
  344. </entry>
  345. </row><row><entry
  346. align="char">
  347. <para>int flags</para>
  348. </entry><entry
  349. align="char">
  350. <para>A bit-wise OR of the following flags:</para>
  351. </entry>
  352. </row><row><entry
  353. align="char">
  354. </entry><entry
  355. align="char">
  356. <para>O_RDONLY read-only access</para>
  357. </entry>
  358. </row><row><entry
  359. align="char">
  360. </entry><entry
  361. align="char">
  362. <para>O_RDWR read/write access</para>
  363. </entry>
  364. </row><row><entry
  365. align="char">
  366. </entry><entry
  367. align="char">
  368. <para>O_NONBLOCK open in non-blocking mode</para>
  369. </entry>
  370. </row><row><entry
  371. align="char">
  372. </entry><entry
  373. align="char">
  374. <para>(blocking mode is the default)</para>
  375. </entry>
  376. </row></tbody></tgroup></informaltable>
  377. <para>RETURN VALUE</para>
  378. <informaltable><tgroup cols="2"><tbody><row><entry
  379. align="char">
  380. <para>ENODEV</para>
  381. </entry><entry
  382. align="char">
  383. <para>Device driver not loaded/available.</para>
  384. </entry>
  385. </row><row><entry
  386. align="char">
  387. <para>EINTERNAL</para>
  388. </entry><entry
  389. align="char">
  390. <para>Internal error.</para>
  391. </entry>
  392. </row><row><entry
  393. align="char">
  394. <para>EBUSY</para>
  395. </entry><entry
  396. align="char">
  397. <para>Device or resource busy.</para>
  398. </entry>
  399. </row><row><entry
  400. align="char">
  401. <para>EINVAL</para>
  402. </entry><entry
  403. align="char">
  404. <para>Invalid argument.</para>
  405. </entry>
  406. </row></tbody></tgroup></informaltable>
  407. </section>
  408. <section id="video_fclose">
  409. <title>close()</title>
  410. <para>DESCRIPTION
  411. </para>
  412. <informaltable><tgroup cols="1"><tbody><row><entry
  413. align="char">
  414. <para>This system call closes a previously opened video device.</para>
  415. </entry>
  416. </row></tbody></tgroup></informaltable>
  417. <para>SYNOPSIS
  418. </para>
  419. <informaltable><tgroup cols="1"><tbody><row><entry
  420. align="char">
  421. <para>int close(int fd);</para>
  422. </entry>
  423. </row></tbody></tgroup></informaltable>
  424. <para>PARAMETERS
  425. </para>
  426. <informaltable><tgroup cols="2"><tbody><row><entry
  427. align="char">
  428. <para>int fd</para>
  429. </entry><entry
  430. align="char">
  431. <para>File descriptor returned by a previous call to open().</para>
  432. </entry>
  433. </row></tbody></tgroup></informaltable>
  434. <para>RETURN VALUE</para>
  435. <informaltable><tgroup cols="2"><tbody><row><entry
  436. align="char">
  437. <para>EBADF</para>
  438. </entry><entry
  439. align="char">
  440. <para>fd is not a valid open file descriptor.</para>
  441. </entry>
  442. </row></tbody></tgroup></informaltable>
  443. </section>
  444. <section id="video_fwrite">
  445. <title>write()</title>
  446. <para>DESCRIPTION
  447. </para>
  448. <informaltable><tgroup cols="1"><tbody><row><entry
  449. align="char">
  450. <para>This system call can only be used if VIDEO_SOURCE_MEMORY is selected
  451. in the ioctl call VIDEO_SELECT_SOURCE. The data provided shall be in
  452. PES format, unless the capability allows other formats. If O_NONBLOCK is
  453. not specified the function will block until buffer space is available. The amount
  454. of data to be transferred is implied by count.</para>
  455. </entry>
  456. </row></tbody></tgroup></informaltable>
  457. <para>SYNOPSIS
  458. </para>
  459. <informaltable><tgroup cols="1"><tbody><row><entry
  460. align="char">
  461. <para>size_t write(int fd, const void &#x22C6;buf, size_t count);</para>
  462. </entry>
  463. </row></tbody></tgroup></informaltable>
  464. <para>PARAMETERS
  465. </para>
  466. <informaltable><tgroup cols="2"><tbody><row><entry
  467. align="char">
  468. <para>int fd</para>
  469. </entry><entry
  470. align="char">
  471. <para>File descriptor returned by a previous call to open().</para>
  472. </entry>
  473. </row><row><entry
  474. align="char">
  475. <para>void *buf</para>
  476. </entry><entry
  477. align="char">
  478. <para>Pointer to the buffer containing the PES data.</para>
  479. </entry>
  480. </row><row><entry
  481. align="char">
  482. <para>size_t count</para>
  483. </entry><entry
  484. align="char">
  485. <para>Size of buf.</para>
  486. </entry>
  487. </row></tbody></tgroup></informaltable>
  488. <para>RETURN VALUE</para>
  489. <informaltable><tgroup cols="2"><tbody><row><entry
  490. align="char">
  491. <para>EPERM</para>
  492. </entry><entry
  493. align="char">
  494. <para>Mode VIDEO_SOURCE_MEMORY not selected.</para>
  495. </entry>
  496. </row><row><entry
  497. align="char">
  498. <para>ENOMEM</para>
  499. </entry><entry
  500. align="char">
  501. <para>Attempted to write more data than the internal buffer can
  502. hold.</para>
  503. </entry>
  504. </row><row><entry
  505. align="char">
  506. <para>EBADF</para>
  507. </entry><entry
  508. align="char">
  509. <para>fd is not a valid open file descriptor.</para>
  510. </entry>
  511. </row></tbody></tgroup></informaltable>
  512. </section><section id="VIDEO_STOP"
  513. role="subsection"><title>VIDEO_STOP</title>
  514. <para>DESCRIPTION
  515. </para>
  516. <informaltable><tgroup cols="1"><tbody><row><entry
  517. align="char">
  518. <para>This ioctl call asks the Video Device to stop playing the current stream.
  519. Depending on the input parameter, the screen can be blanked out or displaying
  520. the last decoded frame.</para>
  521. </entry>
  522. </row></tbody></tgroup></informaltable>
  523. <para>SYNOPSIS
  524. </para>
  525. <informaltable><tgroup cols="1"><tbody><row><entry
  526. align="char">
  527. <para>int ioctl(fd, int request = VIDEO_STOP, boolean
  528. mode);</para>
  529. </entry>
  530. </row></tbody></tgroup></informaltable>
  531. <para>PARAMETERS
  532. </para>
  533. <informaltable><tgroup cols="2"><tbody><row><entry
  534. align="char">
  535. <para>int fd</para>
  536. </entry><entry
  537. align="char">
  538. <para>File descriptor returned by a previous call to open().</para>
  539. </entry>
  540. </row><row><entry
  541. align="char">
  542. <para>int request</para>
  543. </entry><entry
  544. align="char">
  545. <para>Equals VIDEO_STOP for this command.</para>
  546. </entry>
  547. </row><row><entry
  548. align="char">
  549. <para>Boolean mode</para>
  550. </entry><entry
  551. align="char">
  552. <para>Indicates how the screen shall be handled.</para>
  553. </entry>
  554. </row><row><entry
  555. align="char">
  556. </entry><entry
  557. align="char">
  558. <para>TRUE: Blank screen when stop.</para>
  559. </entry>
  560. </row><row><entry
  561. align="char">
  562. </entry><entry
  563. align="char">
  564. <para>FALSE: Show last decoded frame.</para>
  565. </entry>
  566. </row></tbody></tgroup></informaltable>
  567. &return-value-dvb;
  568. </section><section id="VIDEO_PLAY"
  569. role="subsection"><title>VIDEO_PLAY</title>
  570. <para>DESCRIPTION
  571. </para>
  572. <informaltable><tgroup cols="1"><tbody><row><entry
  573. align="char">
  574. <para>This ioctl call asks the Video Device to start playing a video stream from the
  575. selected source.</para>
  576. </entry>
  577. </row></tbody></tgroup></informaltable>
  578. <para>SYNOPSIS
  579. </para>
  580. <informaltable><tgroup cols="1"><tbody><row><entry
  581. align="char">
  582. <para>int ioctl(fd, int request = VIDEO_PLAY);</para>
  583. </entry>
  584. </row></tbody></tgroup></informaltable>
  585. <para>PARAMETERS
  586. </para>
  587. <informaltable><tgroup cols="2"><tbody><row><entry
  588. align="char">
  589. <para>int fd</para>
  590. </entry><entry
  591. align="char">
  592. <para>File descriptor returned by a previous call to open().</para>
  593. </entry>
  594. </row><row><entry
  595. align="char">
  596. <para>int request</para>
  597. </entry><entry
  598. align="char">
  599. <para>Equals VIDEO_PLAY for this command.</para>
  600. </entry>
  601. </row></tbody></tgroup></informaltable>
  602. &return-value-dvb;
  603. </section><section id="VIDEO_FREEZE"
  604. role="subsection"><title>VIDEO_FREEZE</title>
  605. <para>DESCRIPTION
  606. </para>
  607. <informaltable><tgroup cols="1"><tbody><row><entry
  608. align="char">
  609. <para>This ioctl call suspends the live video stream being played. Decoding
  610. and playing are frozen. It is then possible to restart the decoding
  611. and playing process of the video stream using the VIDEO_CONTINUE
  612. command. If VIDEO_SOURCE_MEMORY is selected in the ioctl call
  613. VIDEO_SELECT_SOURCE, the DVB subsystem will not decode any more
  614. data until the ioctl call VIDEO_CONTINUE or VIDEO_PLAY is performed.</para>
  615. </entry>
  616. </row></tbody></tgroup></informaltable>
  617. <para>SYNOPSIS
  618. </para>
  619. <informaltable><tgroup cols="1"><tbody><row><entry
  620. align="char">
  621. <para>int ioctl(fd, int request = VIDEO_FREEZE);</para>
  622. </entry>
  623. </row></tbody></tgroup></informaltable>
  624. <para>PARAMETERS
  625. </para>
  626. <informaltable><tgroup cols="2"><tbody><row><entry
  627. align="char">
  628. <para>int fd</para>
  629. </entry><entry
  630. align="char">
  631. <para>File descriptor returned by a previous call to open().</para>
  632. </entry>
  633. </row><row><entry
  634. align="char">
  635. <para>int request</para>
  636. </entry><entry
  637. align="char">
  638. <para>Equals VIDEO_FREEZE for this command.</para>
  639. </entry>
  640. </row></tbody></tgroup></informaltable>
  641. &return-value-dvb;
  642. </section><section id="VIDEO_CONTINUE"
  643. role="subsection"><title>VIDEO_CONTINUE</title>
  644. <para>DESCRIPTION
  645. </para>
  646. <informaltable><tgroup cols="1"><tbody><row><entry
  647. align="char">
  648. <para>This ioctl call restarts decoding and playing processes of the video stream
  649. which was played before a call to VIDEO_FREEZE was made.</para>
  650. </entry>
  651. </row></tbody></tgroup></informaltable>
  652. <para>SYNOPSIS
  653. </para>
  654. <informaltable><tgroup cols="1"><tbody><row><entry
  655. align="char">
  656. <para>int ioctl(fd, int request = VIDEO_CONTINUE);</para>
  657. </entry>
  658. </row></tbody></tgroup></informaltable>
  659. <para>PARAMETERS
  660. </para>
  661. <informaltable><tgroup cols="2"><tbody><row><entry
  662. align="char">
  663. <para>int fd</para>
  664. </entry><entry
  665. align="char">
  666. <para>File descriptor returned by a previous call to open().</para>
  667. </entry>
  668. </row><row><entry
  669. align="char">
  670. <para>int request</para>
  671. </entry><entry
  672. align="char">
  673. <para>Equals VIDEO_CONTINUE for this command.</para>
  674. </entry>
  675. </row></tbody></tgroup></informaltable>
  676. &return-value-dvb;
  677. </section><section id="VIDEO_SELECT_SOURCE"
  678. role="subsection"><title>VIDEO_SELECT_SOURCE</title>
  679. <para>DESCRIPTION
  680. </para>
  681. <informaltable><tgroup cols="1"><tbody><row><entry
  682. align="char">
  683. <para>This ioctl call informs the video device which source shall be used for the input
  684. data. The possible sources are demux or memory. If memory is selected, the
  685. data is fed to the video device through the write command.</para>
  686. </entry>
  687. </row></tbody></tgroup></informaltable>
  688. <para>SYNOPSIS
  689. </para>
  690. <informaltable><tgroup cols="1"><tbody><row><entry
  691. align="char">
  692. <para>int ioctl(fd, int request = VIDEO_SELECT_SOURCE,
  693. video_stream_source_t source);</para>
  694. </entry>
  695. </row></tbody></tgroup></informaltable>
  696. <para>PARAMETERS
  697. </para>
  698. <informaltable><tgroup cols="2"><tbody><row><entry
  699. align="char">
  700. <para>int fd</para>
  701. </entry><entry
  702. align="char">
  703. <para>File descriptor returned by a previous call to open().</para>
  704. </entry>
  705. </row><row><entry
  706. align="char">
  707. <para>int request</para>
  708. </entry><entry
  709. align="char">
  710. <para>Equals VIDEO_SELECT_SOURCE for this command.</para>
  711. </entry>
  712. </row><row><entry
  713. align="char">
  714. <para>video_stream_source_t
  715. source</para>
  716. </entry><entry
  717. align="char">
  718. <para>Indicates which source shall be used for the Video stream.</para>
  719. </entry>
  720. </row></tbody></tgroup></informaltable>
  721. &return-value-dvb;
  722. </section><section id="VIDEO_SET_BLANK"
  723. role="subsection"><title>VIDEO_SET_BLANK</title>
  724. <para>DESCRIPTION
  725. </para>
  726. <informaltable><tgroup cols="1"><tbody><row><entry
  727. align="char">
  728. <para>This ioctl call asks the Video Device to blank out the picture.</para>
  729. </entry>
  730. </row></tbody></tgroup></informaltable>
  731. <para>SYNOPSIS
  732. </para>
  733. <informaltable><tgroup cols="1"><tbody><row><entry
  734. align="char">
  735. <para>int ioctl(fd, int request = VIDEO_SET_BLANK, boolean
  736. mode);</para>
  737. </entry>
  738. </row></tbody></tgroup></informaltable>
  739. <para>PARAMETERS
  740. </para>
  741. <informaltable><tgroup cols="2"><tbody><row><entry
  742. align="char">
  743. <para>int fd</para>
  744. </entry><entry
  745. align="char">
  746. <para>File descriptor returned by a previous call to open().</para>
  747. </entry>
  748. </row><row><entry
  749. align="char">
  750. <para>int request</para>
  751. </entry><entry
  752. align="char">
  753. <para>Equals VIDEO_SET_BLANK for this command.</para>
  754. </entry>
  755. </row><row><entry
  756. align="char">
  757. <para>boolean mode</para>
  758. </entry><entry
  759. align="char">
  760. <para>TRUE: Blank screen when stop.</para>
  761. </entry>
  762. </row><row><entry
  763. align="char">
  764. </entry><entry
  765. align="char">
  766. <para>FALSE: Show last decoded frame.</para>
  767. </entry>
  768. </row></tbody></tgroup></informaltable>
  769. &return-value-dvb;
  770. </section><section id="VIDEO_GET_STATUS"
  771. role="subsection"><title>VIDEO_GET_STATUS</title>
  772. <para>DESCRIPTION
  773. </para>
  774. <informaltable><tgroup cols="1"><tbody><row><entry
  775. align="char">
  776. <para>This ioctl call asks the Video Device to return the current status of the device.</para>
  777. </entry>
  778. </row></tbody></tgroup></informaltable>
  779. <para>SYNOPSIS
  780. </para>
  781. <informaltable><tgroup cols="1"><tbody><row><entry
  782. align="char">
  783. <para> int ioctl(fd, int request = VIDEO_GET_STATUS, struct
  784. video_status &#x22C6;status);</para>
  785. </entry>
  786. </row></tbody></tgroup></informaltable>
  787. <para>PARAMETERS
  788. </para>
  789. <informaltable><tgroup cols="2"><tbody><row><entry
  790. align="char">
  791. <para>int fd</para>
  792. </entry><entry
  793. align="char">
  794. <para>File descriptor returned by a previous call to open().</para>
  795. </entry>
  796. </row><row><entry
  797. align="char">
  798. <para>int request</para>
  799. </entry><entry
  800. align="char">
  801. <para>Equals VIDEO_GET_STATUS for this command.</para>
  802. </entry>
  803. </row><row><entry
  804. align="char">
  805. <para>struct video_status
  806. *status</para>
  807. </entry><entry
  808. align="char">
  809. <para>Returns the current status of the Video Device.</para>
  810. </entry>
  811. </row></tbody></tgroup></informaltable>
  812. &return-value-dvb;
  813. </section><section id="VIDEO_GET_EVENT"
  814. role="subsection"><title>VIDEO_GET_EVENT</title>
  815. <para>DESCRIPTION
  816. </para>
  817. <informaltable><tgroup cols="1"><tbody><row><entry
  818. align="char">
  819. <para>This ioctl call returns an event of type video_event if available. If an event is
  820. not available, the behavior depends on whether the device is in blocking or
  821. non-blocking mode. In the latter case, the call fails immediately with errno
  822. set to EWOULDBLOCK. In the former case, the call blocks until an event
  823. becomes available. The standard Linux poll() and/or select() system calls can
  824. be used with the device file descriptor to watch for new events. For select(),
  825. the file descriptor should be included in the exceptfds argument, and for
  826. poll(), POLLPRI should be specified as the wake-up condition. Read-only
  827. permissions are sufficient for this ioctl call.</para>
  828. </entry>
  829. </row></tbody></tgroup></informaltable>
  830. <para>SYNOPSIS
  831. </para>
  832. <informaltable><tgroup cols="1"><tbody><row><entry
  833. align="char">
  834. <para> int ioctl(fd, int request = VIDEO_GET_EVENT, struct
  835. video_event &#x22C6;ev);</para>
  836. </entry>
  837. </row></tbody></tgroup></informaltable>
  838. <para>PARAMETERS
  839. </para>
  840. <informaltable><tgroup cols="2"><tbody><row><entry
  841. align="char">
  842. <para>int fd</para>
  843. </entry><entry
  844. align="char">
  845. <para>File descriptor returned by a previous call to open().</para>
  846. </entry>
  847. </row><row><entry
  848. align="char">
  849. <para>int request</para>
  850. </entry><entry
  851. align="char">
  852. <para>Equals VIDEO_GET_EVENT for this command.</para>
  853. </entry>
  854. </row><row><entry
  855. align="char">
  856. <para>struct video_event
  857. *ev</para>
  858. </entry><entry
  859. align="char">
  860. <para>Points to the location where the event, if any, is to be
  861. stored.</para>
  862. </entry>
  863. </row></tbody></tgroup></informaltable>
  864. &return-value-dvb;
  865. <informaltable><tgroup cols="2"><tbody><row><entry
  866. align="char">
  867. <para>EWOULDBLOCK</para>
  868. </entry><entry
  869. align="char">
  870. <para>There is no event pending, and the device is in
  871. non-blocking mode.</para>
  872. </entry>
  873. </row><row><entry
  874. align="char">
  875. <para>EOVERFLOW</para>
  876. </entry><entry
  877. align="char">
  878. <para>Overflow in event queue - one or more events were lost.</para>
  879. </entry>
  880. </row></tbody></tgroup></informaltable>
  881. </section><section id="VIDEO_SET_DISPLAY_FORMAT"
  882. role="subsection"><title>VIDEO_SET_DISPLAY_FORMAT</title>
  883. <para>DESCRIPTION
  884. </para>
  885. <informaltable><tgroup cols="1"><tbody><row><entry
  886. align="char">
  887. <para>This ioctl call asks the Video Device to select the video format to be applied
  888. by the MPEG chip on the video.</para>
  889. </entry>
  890. </row></tbody></tgroup></informaltable>
  891. <para>SYNOPSIS
  892. </para>
  893. <informaltable><tgroup cols="1"><tbody><row><entry
  894. align="char">
  895. <para> int ioctl(fd, int request =
  896. VIDEO_SET_DISPLAY_FORMAT, video_display_format_t
  897. format);</para>
  898. </entry>
  899. </row></tbody></tgroup></informaltable>
  900. <para>PARAMETERS
  901. </para>
  902. <informaltable><tgroup cols="2"><tbody><row><entry
  903. align="char">
  904. <para>int fd</para>
  905. </entry><entry
  906. align="char">
  907. <para>File descriptor returned by a previous call to open().</para>
  908. </entry>
  909. </row><row><entry
  910. align="char">
  911. <para>int request</para>
  912. </entry><entry
  913. align="char">
  914. <para>Equals VIDEO_SET_DISPLAY_FORMAT for this
  915. command.</para>
  916. </entry>
  917. </row><row><entry
  918. align="char">
  919. <para>video_display_format_t
  920. format</para>
  921. </entry><entry
  922. align="char">
  923. <para>Selects the video format to be used.</para>
  924. </entry>
  925. </row></tbody></tgroup></informaltable>
  926. &return-value-dvb;
  927. </section><section id="VIDEO_STILLPICTURE"
  928. role="subsection"><title>VIDEO_STILLPICTURE</title>
  929. <para>DESCRIPTION
  930. </para>
  931. <informaltable><tgroup cols="1"><tbody><row><entry
  932. align="char">
  933. <para>This ioctl call asks the Video Device to display a still picture (I-frame). The
  934. input data shall contain an I-frame. If the pointer is NULL, then the current
  935. displayed still picture is blanked.</para>
  936. </entry>
  937. </row></tbody></tgroup></informaltable>
  938. <para>SYNOPSIS
  939. </para>
  940. <informaltable><tgroup cols="1"><tbody><row><entry
  941. align="char">
  942. <para>int ioctl(fd, int request = VIDEO_STILLPICTURE,
  943. struct video_still_picture &#x22C6;sp);</para>
  944. </entry>
  945. </row></tbody></tgroup></informaltable>
  946. <para>PARAMETERS
  947. </para>
  948. <informaltable><tgroup cols="2"><tbody><row><entry
  949. align="char">
  950. <para>int fd</para>
  951. </entry><entry
  952. align="char">
  953. <para>File descriptor returned by a previous call to open().</para>
  954. </entry>
  955. </row><row><entry
  956. align="char">
  957. <para>int request</para>
  958. </entry><entry
  959. align="char">
  960. <para>Equals VIDEO_STILLPICTURE for this command.</para>
  961. </entry>
  962. </row><row><entry
  963. align="char">
  964. <para>struct
  965. video_still_picture
  966. *sp</para>
  967. </entry><entry
  968. align="char">
  969. <para>Pointer to a location where an I-frame and size is stored.</para>
  970. </entry>
  971. </row></tbody></tgroup></informaltable>
  972. &return-value-dvb;
  973. </section><section id="VIDEO_FAST_FORWARD"
  974. role="subsection"><title>VIDEO_FAST_FORWARD</title>
  975. <para>DESCRIPTION
  976. </para>
  977. <informaltable><tgroup cols="1"><tbody><row><entry
  978. align="char">
  979. <para>This ioctl call asks the Video Device to skip decoding of N number of I-frames.
  980. This call can only be used if VIDEO_SOURCE_MEMORY is selected.</para>
  981. </entry>
  982. </row></tbody></tgroup></informaltable>
  983. <para>SYNOPSIS
  984. </para>
  985. <informaltable><tgroup cols="1"><tbody><row><entry
  986. align="char">
  987. <para>int ioctl(fd, int request = VIDEO_FAST_FORWARD, int
  988. nFrames);</para>
  989. </entry>
  990. </row></tbody></tgroup></informaltable>
  991. <para>PARAMETERS
  992. </para>
  993. <informaltable><tgroup cols="2"><tbody><row><entry
  994. align="char">
  995. <para>int fd</para>
  996. </entry><entry
  997. align="char">
  998. <para>File descriptor returned by a previous call to open().</para>
  999. </entry>
  1000. </row><row><entry
  1001. align="char">
  1002. <para>int request</para>
  1003. </entry><entry
  1004. align="char">
  1005. <para>Equals VIDEO_FAST_FORWARD for this command.</para>
  1006. </entry>
  1007. </row><row><entry
  1008. align="char">
  1009. <para>int nFrames</para>
  1010. </entry><entry
  1011. align="char">
  1012. <para>The number of frames to skip.</para>
  1013. </entry>
  1014. </row></tbody></tgroup></informaltable>
  1015. &return-value-dvb;
  1016. <informaltable><tgroup cols="2"><tbody><row><entry
  1017. align="char">
  1018. <para>EPERM</para>
  1019. </entry><entry
  1020. align="char">
  1021. <para>Mode VIDEO_SOURCE_MEMORY not selected.</para>
  1022. </entry>
  1023. </row></tbody></tgroup></informaltable>
  1024. </section><section id="VIDEO_SLOWMOTION"
  1025. role="subsection"><title>VIDEO_SLOWMOTION</title>
  1026. <para>DESCRIPTION
  1027. </para>
  1028. <informaltable><tgroup cols="1"><tbody><row><entry
  1029. align="char">
  1030. <para>This ioctl call asks the video device to repeat decoding frames N number of
  1031. times. This call can only be used if VIDEO_SOURCE_MEMORY is selected.</para>
  1032. </entry>
  1033. </row></tbody></tgroup></informaltable>
  1034. <para>SYNOPSIS
  1035. </para>
  1036. <informaltable><tgroup cols="1"><tbody><row><entry
  1037. align="char">
  1038. <para>int ioctl(fd, int request = VIDEO_SLOWMOTION, int
  1039. nFrames);</para>
  1040. </entry>
  1041. </row></tbody></tgroup></informaltable>
  1042. <para>PARAMETERS
  1043. </para>
  1044. <informaltable><tgroup cols="2"><tbody><row><entry
  1045. align="char">
  1046. <para>int fd</para>
  1047. </entry><entry
  1048. align="char">
  1049. <para>File descriptor returned by a previous call to open().</para>
  1050. </entry>
  1051. </row><row><entry
  1052. align="char">
  1053. <para>int request</para>
  1054. </entry><entry
  1055. align="char">
  1056. <para>Equals VIDEO_SLOWMOTION for this command.</para>
  1057. </entry>
  1058. </row><row><entry
  1059. align="char">
  1060. <para>int nFrames</para>
  1061. </entry><entry
  1062. align="char">
  1063. <para>The number of times to repeat each frame.</para>
  1064. </entry>
  1065. </row></tbody></tgroup></informaltable>
  1066. &return-value-dvb;
  1067. <informaltable><tgroup cols="2"><tbody><row><entry
  1068. align="char">
  1069. <para>EPERM</para>
  1070. </entry><entry
  1071. align="char">
  1072. <para>Mode VIDEO_SOURCE_MEMORY not selected.</para>
  1073. </entry>
  1074. </row></tbody></tgroup></informaltable>
  1075. </section><section id="VIDEO_GET_CAPABILITIES"
  1076. role="subsection"><title>VIDEO_GET_CAPABILITIES</title>
  1077. <para>DESCRIPTION
  1078. </para>
  1079. <informaltable><tgroup cols="1"><tbody><row><entry
  1080. align="char">
  1081. <para>This ioctl call asks the video device about its decoding capabilities. On success
  1082. it returns and integer which has bits set according to the defines in section ??.</para>
  1083. </entry>
  1084. </row></tbody></tgroup></informaltable>
  1085. <para>SYNOPSIS
  1086. </para>
  1087. <informaltable><tgroup cols="1"><tbody><row><entry
  1088. align="char">
  1089. <para>int ioctl(fd, int request = VIDEO_GET_CAPABILITIES,
  1090. unsigned int &#x22C6;cap);</para>
  1091. </entry>
  1092. </row></tbody></tgroup></informaltable>
  1093. <para>PARAMETERS
  1094. </para>
  1095. <informaltable><tgroup cols="2"><tbody><row><entry
  1096. align="char">
  1097. <para>int fd</para>
  1098. </entry><entry
  1099. align="char">
  1100. <para>File descriptor returned by a previous call to open().</para>
  1101. </entry>
  1102. </row><row><entry
  1103. align="char">
  1104. <para>int request</para>
  1105. </entry><entry
  1106. align="char">
  1107. <para>Equals VIDEO_GET_CAPABILITIES for this
  1108. command.</para>
  1109. </entry>
  1110. </row><row><entry
  1111. align="char">
  1112. <para>unsigned int *cap</para>
  1113. </entry><entry
  1114. align="char">
  1115. <para>Pointer to a location where to store the capability
  1116. information.</para>
  1117. </entry>
  1118. </row></tbody></tgroup></informaltable>
  1119. &return-value-dvb;
  1120. </section><section id="VIDEO_SET_ID"
  1121. role="subsection"><title>VIDEO_SET_ID</title>
  1122. <para>DESCRIPTION
  1123. </para>
  1124. <informaltable><tgroup cols="1"><tbody><row><entry
  1125. align="char">
  1126. <para>This ioctl selects which sub-stream is to be decoded if a program or system
  1127. stream is sent to the video device.</para>
  1128. </entry>
  1129. </row></tbody></tgroup></informaltable>
  1130. <para>SYNOPSIS
  1131. </para>
  1132. <informaltable><tgroup cols="1"><tbody><row><entry
  1133. align="char">
  1134. <para>int ioctl(int fd, int request = VIDEO_SET_ID, int
  1135. id);</para>
  1136. </entry>
  1137. </row></tbody></tgroup></informaltable>
  1138. <para>PARAMETERS
  1139. </para>
  1140. <informaltable><tgroup cols="2"><tbody><row><entry
  1141. align="char">
  1142. <para>int fd</para>
  1143. </entry><entry
  1144. align="char">
  1145. <para>File descriptor returned by a previous call to open().</para>
  1146. </entry>
  1147. </row><row><entry
  1148. align="char">
  1149. <para>int request</para>
  1150. </entry><entry
  1151. align="char">
  1152. <para>Equals VIDEO_SET_ID for this command.</para>
  1153. </entry>
  1154. </row><row><entry
  1155. align="char">
  1156. <para>int id</para>
  1157. </entry><entry
  1158. align="char">
  1159. <para>video sub-stream id</para>
  1160. </entry>
  1161. </row></tbody></tgroup></informaltable>
  1162. &return-value-dvb;
  1163. <informaltable><tgroup cols="2"><tbody><row><entry
  1164. align="char">
  1165. <para>EINVAL</para>
  1166. </entry><entry
  1167. align="char">
  1168. <para>Invalid sub-stream id.</para>
  1169. </entry>
  1170. </row></tbody></tgroup></informaltable>
  1171. </section><section id="VIDEO_CLEAR_BUFFER"
  1172. role="subsection"><title>VIDEO_CLEAR_BUFFER</title>
  1173. <para>DESCRIPTION
  1174. </para>
  1175. <informaltable><tgroup cols="1"><tbody><row><entry
  1176. align="char">
  1177. <para>This ioctl call clears all video buffers in the driver and in the decoder hardware.</para>
  1178. </entry>
  1179. </row></tbody></tgroup></informaltable>
  1180. <para>SYNOPSIS
  1181. </para>
  1182. <informaltable><tgroup cols="1"><tbody><row><entry
  1183. align="char">
  1184. <para>int ioctl(fd, int request = VIDEO_CLEAR_BUFFER);</para>
  1185. </entry>
  1186. </row></tbody></tgroup></informaltable>
  1187. <para>PARAMETERS
  1188. </para>
  1189. <informaltable><tgroup cols="2"><tbody><row><entry
  1190. align="char">
  1191. <para>int fd</para>
  1192. </entry><entry
  1193. align="char">
  1194. <para>File descriptor returned by a previous call to open().</para>
  1195. </entry>
  1196. </row><row><entry
  1197. align="char">
  1198. <para>int request</para>
  1199. </entry><entry
  1200. align="char">
  1201. <para>Equals VIDEO_CLEAR_BUFFER for this command.</para>
  1202. </entry>
  1203. </row></tbody></tgroup></informaltable>
  1204. &return-value-dvb;
  1205. </section><section id="VIDEO_SET_STREAMTYPE"
  1206. role="subsection"><title>VIDEO_SET_STREAMTYPE</title>
  1207. <para>DESCRIPTION
  1208. </para>
  1209. <informaltable><tgroup cols="1"><tbody><row><entry
  1210. align="char">
  1211. <para>This ioctl tells the driver which kind of stream to expect being written to it. If
  1212. this call is not used the default of video PES is used. Some drivers might not
  1213. support this call and always expect PES.</para>
  1214. </entry>
  1215. </row></tbody></tgroup></informaltable>
  1216. <para>SYNOPSIS
  1217. </para>
  1218. <informaltable><tgroup cols="1"><tbody><row><entry
  1219. align="char">
  1220. <para>int ioctl(fd, int request = VIDEO_SET_STREAMTYPE,
  1221. int type);</para>
  1222. </entry>
  1223. </row></tbody></tgroup></informaltable>
  1224. <para>PARAMETERS
  1225. </para>
  1226. <informaltable><tgroup cols="2"><tbody><row><entry
  1227. align="char">
  1228. <para>int fd</para>
  1229. </entry><entry
  1230. align="char">
  1231. <para>File descriptor returned by a previous call to open().</para>
  1232. </entry>
  1233. </row><row><entry
  1234. align="char">
  1235. <para>int request</para>
  1236. </entry><entry
  1237. align="char">
  1238. <para>Equals VIDEO_SET_STREAMTYPE for this command.</para>
  1239. </entry>
  1240. </row><row><entry
  1241. align="char">
  1242. <para>int type</para>
  1243. </entry><entry
  1244. align="char">
  1245. <para>stream type</para>
  1246. </entry>
  1247. </row></tbody></tgroup></informaltable>
  1248. &return-value-dvb;
  1249. </section><section id="VIDEO_SET_FORMAT"
  1250. role="subsection"><title>VIDEO_SET_FORMAT</title>
  1251. <para>DESCRIPTION
  1252. </para>
  1253. <informaltable><tgroup cols="1"><tbody><row><entry
  1254. align="char">
  1255. <para>This ioctl sets the screen format (aspect ratio) of the connected output device
  1256. (TV) so that the output of the decoder can be adjusted accordingly.</para>
  1257. </entry>
  1258. </row></tbody></tgroup></informaltable>
  1259. <para>SYNOPSIS
  1260. </para>
  1261. <informaltable><tgroup cols="1"><tbody><row><entry
  1262. align="char">
  1263. <para> int ioctl(fd, int request = VIDEO_SET_FORMAT,
  1264. video_format_t format);</para>
  1265. </entry>
  1266. </row></tbody></tgroup></informaltable>
  1267. <para>PARAMETERS
  1268. </para>
  1269. <informaltable><tgroup cols="2"><tbody><row><entry
  1270. align="char">
  1271. <para>int fd</para>
  1272. </entry><entry
  1273. align="char">
  1274. <para>File descriptor returned by a previous call to open().</para>
  1275. </entry>
  1276. </row><row><entry
  1277. align="char">
  1278. <para>int request</para>
  1279. </entry><entry
  1280. align="char">
  1281. <para>Equals VIDEO_SET_FORMAT for this command.</para>
  1282. </entry>
  1283. </row><row><entry
  1284. align="char">
  1285. <para>video_format_t
  1286. format</para>
  1287. </entry><entry
  1288. align="char">
  1289. <para>video format of TV as defined in section ??.</para>
  1290. </entry>
  1291. </row></tbody></tgroup></informaltable>
  1292. &return-value-dvb;
  1293. <informaltable><tgroup cols="2"><tbody><row><entry
  1294. align="char">
  1295. <para>EINVAL</para>
  1296. </entry><entry
  1297. align="char">
  1298. <para>format is not a valid video format.</para>
  1299. </entry>
  1300. </row></tbody></tgroup></informaltable>
  1301. </section><section id="VIDEO_SET_SYSTEM"
  1302. role="subsection"><title>VIDEO_SET_SYSTEM</title>
  1303. <para>DESCRIPTION
  1304. </para>
  1305. <informaltable><tgroup cols="1"><tbody><row><entry
  1306. align="char">
  1307. <para>This ioctl sets the television output format. The format (see section ??) may
  1308. vary from the color format of the displayed MPEG stream. If the hardware is
  1309. not able to display the requested format the call will return an error.</para>
  1310. </entry>
  1311. </row></tbody></tgroup></informaltable>
  1312. <para>SYNOPSIS
  1313. </para>
  1314. <informaltable><tgroup cols="1"><tbody><row><entry
  1315. align="char">
  1316. <para> int ioctl(fd, int request = VIDEO_SET_SYSTEM ,
  1317. video_system_t system);</para>
  1318. </entry>
  1319. </row></tbody></tgroup></informaltable>
  1320. <para>PARAMETERS
  1321. </para>
  1322. <informaltable><tgroup cols="2"><tbody><row><entry
  1323. align="char">
  1324. <para>int fd</para>
  1325. </entry><entry
  1326. align="char">
  1327. <para>File descriptor returned by a previous call to open().</para>
  1328. </entry>
  1329. </row><row><entry
  1330. align="char">
  1331. <para>int request</para>
  1332. </entry><entry
  1333. align="char">
  1334. <para>Equals VIDEO_SET_FORMAT for this command.</para>
  1335. </entry>
  1336. </row><row><entry
  1337. align="char">
  1338. <para>video_system_t
  1339. system</para>
  1340. </entry><entry
  1341. align="char">
  1342. <para>video system of TV output.</para>
  1343. </entry>
  1344. </row></tbody></tgroup></informaltable>
  1345. &return-value-dvb;
  1346. <informaltable><tgroup cols="2"><tbody><row><entry
  1347. align="char">
  1348. <para>EINVAL</para>
  1349. </entry><entry
  1350. align="char">
  1351. <para>system is not a valid or supported video system.</para>
  1352. </entry>
  1353. </row></tbody></tgroup></informaltable>
  1354. </section><section id="VIDEO_SET_HIGHLIGHT"
  1355. role="subsection"><title>VIDEO_SET_HIGHLIGHT</title>
  1356. <para>DESCRIPTION
  1357. </para>
  1358. <informaltable><tgroup cols="1"><tbody><row><entry
  1359. align="char">
  1360. <para>This ioctl sets the SPU highlight information for the menu access of a DVD.</para>
  1361. </entry>
  1362. </row></tbody></tgroup></informaltable>
  1363. <para>SYNOPSIS
  1364. </para>
  1365. <informaltable><tgroup cols="1"><tbody><row><entry
  1366. align="char">
  1367. <para> int ioctl(fd, int request = VIDEO_SET_HIGHLIGHT
  1368. ,video_highlight_t &#x22C6;vhilite)</para>
  1369. </entry>
  1370. </row></tbody></tgroup></informaltable>
  1371. <para>PARAMETERS
  1372. </para>
  1373. <informaltable><tgroup cols="2"><tbody><row><entry
  1374. align="char">
  1375. <para>int fd</para>
  1376. </entry><entry
  1377. align="char">
  1378. <para>File descriptor returned by a previous call to open().</para>
  1379. </entry>
  1380. </row><row><entry
  1381. align="char">
  1382. <para>int request</para>
  1383. </entry><entry
  1384. align="char">
  1385. <para>Equals VIDEO_SET_HIGHLIGHT for this command.</para>
  1386. </entry>
  1387. </row><row><entry
  1388. align="char">
  1389. <para>video_highlight_t
  1390. *vhilite</para>
  1391. </entry><entry
  1392. align="char">
  1393. <para>SPU Highlight information according to section ??.</para>
  1394. </entry>
  1395. </row></tbody></tgroup></informaltable>
  1396. &return-value-dvb;
  1397. </section><section id="VIDEO_SET_SPU"
  1398. role="subsection"><title>VIDEO_SET_SPU</title>
  1399. <para>DESCRIPTION
  1400. </para>
  1401. <informaltable><tgroup cols="1"><tbody><row><entry
  1402. align="char">
  1403. <para>This ioctl activates or deactivates SPU decoding in a DVD input stream. It can
  1404. only be used, if the driver is able to handle a DVD stream.</para>
  1405. </entry>
  1406. </row></tbody></tgroup></informaltable>
  1407. <para>SYNOPSIS
  1408. </para>
  1409. <informaltable><tgroup cols="1"><tbody><row><entry
  1410. align="char">
  1411. <para> int ioctl(fd, int request = VIDEO_SET_SPU ,
  1412. video_spu_t &#x22C6;spu)</para>
  1413. </entry>
  1414. </row></tbody></tgroup></informaltable>
  1415. <para>PARAMETERS
  1416. </para>
  1417. <informaltable><tgroup cols="2"><tbody><row><entry
  1418. align="char">
  1419. <para>int fd</para>
  1420. </entry><entry
  1421. align="char">
  1422. <para>File descriptor returned by a previous call to open().</para>
  1423. </entry>
  1424. </row><row><entry
  1425. align="char">
  1426. <para>int request</para>
  1427. </entry><entry
  1428. align="char">
  1429. <para>Equals VIDEO_SET_SPU for this command.</para>
  1430. </entry>
  1431. </row><row><entry
  1432. align="char">
  1433. <para>video_spu_t *spu</para>
  1434. </entry><entry
  1435. align="char">
  1436. <para>SPU decoding (de)activation and subid setting according
  1437. to section ??.</para>
  1438. </entry>
  1439. </row></tbody></tgroup></informaltable>
  1440. &return-value-dvb;
  1441. <informaltable><tgroup cols="2"><tbody><row><entry
  1442. align="char">
  1443. <para>EINVAL</para>
  1444. </entry><entry
  1445. align="char">
  1446. <para>input is not a valid spu setting or driver cannot handle
  1447. SPU.</para>
  1448. </entry>
  1449. </row></tbody></tgroup></informaltable>
  1450. </section><section id="VIDEO_SET_SPU_PALETTE"
  1451. role="subsection"><title>VIDEO_SET_SPU_PALETTE</title>
  1452. <para>DESCRIPTION
  1453. </para>
  1454. <informaltable><tgroup cols="1"><tbody><row><entry
  1455. align="char">
  1456. <para>This ioctl sets the SPU color palette.</para>
  1457. </entry>
  1458. </row></tbody></tgroup></informaltable>
  1459. <para>SYNOPSIS
  1460. </para>
  1461. <informaltable><tgroup cols="1"><tbody><row><entry
  1462. align="char">
  1463. <para> int ioctl(fd, int request = VIDEO_SET_SPU_PALETTE
  1464. ,video_spu_palette_t &#x22C6;palette )</para>
  1465. </entry>
  1466. </row></tbody></tgroup></informaltable>
  1467. <para>PARAMETERS
  1468. </para>
  1469. <informaltable><tgroup cols="2"><tbody><row><entry
  1470. align="char">
  1471. <para>int fd</para>
  1472. </entry><entry
  1473. align="char">
  1474. <para>File descriptor returned by a previous call to open().</para>
  1475. </entry>
  1476. </row><row><entry
  1477. align="char">
  1478. <para>int request</para>
  1479. </entry><entry
  1480. align="char">
  1481. <para>Equals VIDEO_SET_SPU_PALETTE for this command.</para>
  1482. </entry>
  1483. </row><row><entry
  1484. align="char">
  1485. <para>video_spu_palette_t
  1486. *palette</para>
  1487. </entry><entry
  1488. align="char">
  1489. <para>SPU palette according to section ??.</para>
  1490. </entry>
  1491. </row></tbody></tgroup></informaltable>
  1492. &return-value-dvb;
  1493. <informaltable><tgroup cols="2"><tbody><row><entry
  1494. align="char">
  1495. <para>EINVAL</para>
  1496. </entry><entry
  1497. align="char">
  1498. <para>input is not a valid palette or driver doesn&#8217;t handle SPU.</para>
  1499. </entry>
  1500. </row></tbody></tgroup></informaltable>
  1501. </section><section id="VIDEO_GET_NAVI"
  1502. role="subsection"><title>VIDEO_GET_NAVI</title>
  1503. <para>DESCRIPTION
  1504. </para>
  1505. <informaltable><tgroup cols="1"><tbody><row><entry
  1506. align="char">
  1507. <para>This ioctl returns navigational information from the DVD stream. This is
  1508. especially needed if an encoded stream has to be decoded by the hardware.</para>
  1509. </entry>
  1510. </row></tbody></tgroup></informaltable>
  1511. <para>SYNOPSIS
  1512. </para>
  1513. <informaltable><tgroup cols="1"><tbody><row><entry
  1514. align="char">
  1515. <para> int ioctl(fd, int request = VIDEO_GET_NAVI ,
  1516. video_navi_pack_t &#x22C6;navipack)</para>
  1517. </entry>
  1518. </row></tbody></tgroup></informaltable>
  1519. <para>PARAMETERS
  1520. </para>
  1521. <informaltable><tgroup cols="2"><tbody><row><entry
  1522. align="char">
  1523. <para>int fd</para>
  1524. </entry><entry
  1525. align="char">
  1526. <para>File descriptor returned by a previous call to open().</para>
  1527. </entry>
  1528. </row><row><entry
  1529. align="char">
  1530. <para>int request</para>
  1531. </entry><entry
  1532. align="char">
  1533. <para>Equals VIDEO_GET_NAVI for this command.</para>
  1534. </entry>
  1535. </row><row><entry
  1536. align="char">
  1537. <para>video_navi_pack_t
  1538. *navipack</para>
  1539. </entry><entry
  1540. align="char">
  1541. <para>PCI or DSI pack (private stream 2) according to section
  1542. ??.</para>
  1543. </entry>
  1544. </row></tbody></tgroup></informaltable>
  1545. &return-value-dvb;
  1546. <informaltable><tgroup cols="2"><tbody><row><entry
  1547. align="char">
  1548. <para>EFAULT</para>
  1549. </entry><entry
  1550. align="char">
  1551. <para>driver is not able to return navigational information</para>
  1552. </entry>
  1553. </row></tbody></tgroup></informaltable>
  1554. </section><section id="VIDEO_SET_ATTRIBUTES"
  1555. role="subsection"><title>VIDEO_SET_ATTRIBUTES</title>
  1556. <para>DESCRIPTION
  1557. </para>
  1558. <informaltable><tgroup cols="1"><tbody><row><entry
  1559. align="char">
  1560. <para>This ioctl is intended for DVD playback and allows you to set certain
  1561. information about the stream. Some hardware may not need this information,
  1562. but the call also tells the hardware to prepare for DVD playback.</para>
  1563. </entry>
  1564. </row></tbody></tgroup></informaltable>
  1565. <para>SYNOPSIS
  1566. </para>
  1567. <informaltable><tgroup cols="1"><tbody><row><entry
  1568. align="char">
  1569. <para> int ioctl(fd, int request = VIDEO_SET_ATTRIBUTE
  1570. ,video_attributes_t vattr)</para>
  1571. </entry>
  1572. </row></tbody></tgroup></informaltable>
  1573. <para>PARAMETERS
  1574. </para>
  1575. <informaltable><tgroup cols="2"><tbody><row><entry
  1576. align="char">
  1577. <para>int fd</para>
  1578. </entry><entry
  1579. align="char">
  1580. <para>File descriptor returned by a previous call to open().</para>
  1581. </entry>
  1582. </row><row><entry
  1583. align="char">
  1584. <para>int request</para>
  1585. </entry><entry
  1586. align="char">
  1587. <para>Equals VIDEO_SET_ATTRIBUTE for this command.</para>
  1588. </entry>
  1589. </row><row><entry
  1590. align="char">
  1591. <para>video_attributes_t
  1592. vattr</para>
  1593. </entry><entry
  1594. align="char">
  1595. <para>video attributes according to section ??.</para>
  1596. </entry>
  1597. </row></tbody></tgroup></informaltable>
  1598. &return-value-dvb;
  1599. <informaltable><tgroup cols="2"><tbody><row><entry
  1600. align="char">
  1601. <para>EINVAL</para>
  1602. </entry><entry
  1603. align="char">
  1604. <para>input is not a valid attribute setting.</para>
  1605. </entry>
  1606. </row></tbody></tgroup></informaltable>
  1607. </section></section>