diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-01-07 06:17:35 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-02-04 07:24:16 -0500 |
commit | 1c656c87ac3f7a602cfa9b39b6cb955b27f2f0b0 (patch) | |
tree | e74d25a02e7f6c904d765faabed82e811e8828a7 /Documentation/DocBook | |
parent | 1b962087a792556f67191b88a2f80bf949175e54 (diff) |
[media] DocBook media: Cleanup some sections at common.xml
Updates sections "Querying Capabilities", "Application Priority",
"Video Inputs and Outputs" and "Audio Inputs and Outputs".
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r-- | Documentation/DocBook/media/v4l/common.xml | 89 |
1 files changed, 35 insertions, 54 deletions
diff --git a/Documentation/DocBook/media/v4l/common.xml b/Documentation/DocBook/media/v4l/common.xml index 1ddf354aa997..5a97935e75a1 100644 --- a/Documentation/DocBook/media/v4l/common.xml +++ b/Documentation/DocBook/media/v4l/common.xml | |||
@@ -240,15 +240,15 @@ methods</link> supported by the device.</para> | |||
240 | 240 | ||
241 | <para>Starting with kernel version 3.1, VIDIOC-QUERYCAP will return the | 241 | <para>Starting with kernel version 3.1, VIDIOC-QUERYCAP will return the |
242 | V4L2 API version used by the driver, with generally matches the Kernel version. | 242 | V4L2 API version used by the driver, with generally matches the Kernel version. |
243 | There's no need of using &VIDIOC-QUERYCAP; to check if an specific ioctl is | 243 | There's no need of using &VIDIOC-QUERYCAP; to check if a specific ioctl is |
244 | supported, the V4L2 core now returns ENOIOCTLCMD if a driver doesn't provide | 244 | supported, the V4L2 core now returns ENOTTY if a driver doesn't provide |
245 | support for an ioctl.</para> | 245 | support for an ioctl.</para> |
246 | 246 | ||
247 | <para>Other features can be queried | 247 | <para>Other features can be queried |
248 | by calling the respective ioctl, for example &VIDIOC-ENUMINPUT; | 248 | by calling the respective ioctl, for example &VIDIOC-ENUMINPUT; |
249 | to learn about the number, types and names of video connectors on the | 249 | to learn about the number, types and names of video connectors on the |
250 | device. Although abstraction is a major objective of this API, the | 250 | device. Although abstraction is a major objective of this API, the |
251 | ioctl also allows driver specific applications to reliable identify | 251 | &VIDIOC-QUERYCAP; ioctl also allows driver specific applications to reliably identify |
252 | the driver.</para> | 252 | the driver.</para> |
253 | 253 | ||
254 | <para>All V4L2 drivers must support | 254 | <para>All V4L2 drivers must support |
@@ -278,9 +278,7 @@ Applications requiring a different priority will usually call | |||
278 | the &VIDIOC-QUERYCAP; ioctl.</para> | 278 | the &VIDIOC-QUERYCAP; ioctl.</para> |
279 | 279 | ||
280 | <para>Ioctls changing driver properties, such as &VIDIOC-S-INPUT;, | 280 | <para>Ioctls changing driver properties, such as &VIDIOC-S-INPUT;, |
281 | return an &EBUSY; after another application obtained higher priority. | 281 | return an &EBUSY; after another application obtained higher priority.</para> |
282 | An event mechanism to notify applications about asynchronous property | ||
283 | changes has been proposed but not added yet.</para> | ||
284 | </section> | 282 | </section> |
285 | 283 | ||
286 | <section id="video"> | 284 | <section id="video"> |
@@ -288,9 +286,9 @@ changes has been proposed but not added yet.</para> | |||
288 | 286 | ||
289 | <para>Video inputs and outputs are physical connectors of a | 287 | <para>Video inputs and outputs are physical connectors of a |
290 | device. These can be for example RF connectors (antenna/cable), CVBS | 288 | device. These can be for example RF connectors (antenna/cable), CVBS |
291 | a.k.a. Composite Video, S-Video or RGB connectors. Only video and VBI | 289 | a.k.a. Composite Video, S-Video or RGB connectors. Video and VBI |
292 | capture devices have inputs, output devices have outputs, at least one | 290 | capture devices have inputs. Video and VBI output devices have outputs, |
293 | each. Radio devices have no video inputs or outputs.</para> | 291 | at least one each. Radio devices have no video inputs or outputs.</para> |
294 | 292 | ||
295 | <para>To learn about the number and attributes of the | 293 | <para>To learn about the number and attributes of the |
296 | available inputs and outputs applications can enumerate them with the | 294 | available inputs and outputs applications can enumerate them with the |
@@ -299,30 +297,13 @@ available inputs and outputs applications can enumerate them with the | |||
299 | ioctl also contains signal status information applicable when the | 297 | ioctl also contains signal status information applicable when the |
300 | current video input is queried.</para> | 298 | current video input is queried.</para> |
301 | 299 | ||
302 | <para>The &VIDIOC-G-INPUT; and &VIDIOC-G-OUTPUT; ioctl return the | 300 | <para>The &VIDIOC-G-INPUT; and &VIDIOC-G-OUTPUT; ioctls return the |
303 | index of the current video input or output. To select a different | 301 | index of the current video input or output. To select a different |
304 | input or output applications call the &VIDIOC-S-INPUT; and | 302 | input or output applications call the &VIDIOC-S-INPUT; and |
305 | &VIDIOC-S-OUTPUT; ioctl. Drivers must implement all the input ioctls | 303 | &VIDIOC-S-OUTPUT; ioctls. Drivers must implement all the input ioctls |
306 | when the device has one or more inputs, all the output ioctls when the | 304 | when the device has one or more inputs, all the output ioctls when the |
307 | device has one or more outputs.</para> | 305 | device has one or more outputs.</para> |
308 | 306 | ||
309 | <!-- | ||
310 | <figure id=io-tree> | ||
311 | <title>Input and output enumeration is the root of most device properties.</title> | ||
312 | <mediaobject> | ||
313 | <imageobject> | ||
314 | <imagedata fileref="links.pdf" format="ps" /> | ||
315 | </imageobject> | ||
316 | <imageobject> | ||
317 | <imagedata fileref="links.gif" format="gif" /> | ||
318 | </imageobject> | ||
319 | <textobject> | ||
320 | <phrase>Links between various device property structures.</phrase> | ||
321 | </textobject> | ||
322 | </mediaobject> | ||
323 | </figure> | ||
324 | --> | ||
325 | |||
326 | <example> | 307 | <example> |
327 | <title>Information about the current video input</title> | 308 | <title>Information about the current video input</title> |
328 | 309 | ||
@@ -330,20 +311,20 @@ device has one or more outputs.</para> | |||
330 | &v4l2-input; input; | 311 | &v4l2-input; input; |
331 | int index; | 312 | int index; |
332 | 313 | ||
333 | if (-1 == ioctl (fd, &VIDIOC-G-INPUT;, &index)) { | 314 | if (-1 == ioctl(fd, &VIDIOC-G-INPUT;, &index)) { |
334 | perror ("VIDIOC_G_INPUT"); | 315 | perror("VIDIOC_G_INPUT"); |
335 | exit (EXIT_FAILURE); | 316 | exit(EXIT_FAILURE); |
336 | } | 317 | } |
337 | 318 | ||
338 | memset (&input, 0, sizeof (input)); | 319 | memset(&input, 0, sizeof(input)); |
339 | input.index = index; | 320 | input.index = index; |
340 | 321 | ||
341 | if (-1 == ioctl (fd, &VIDIOC-ENUMINPUT;, &input)) { | 322 | if (-1 == ioctl(fd, &VIDIOC-ENUMINPUT;, &input)) { |
342 | perror ("VIDIOC_ENUMINPUT"); | 323 | perror("VIDIOC_ENUMINPUT"); |
343 | exit (EXIT_FAILURE); | 324 | exit(EXIT_FAILURE); |
344 | } | 325 | } |
345 | 326 | ||
346 | printf ("Current input: %s\n", input.name); | 327 | printf("Current input: %s\n", input.name); |
347 | </programlisting> | 328 | </programlisting> |
348 | </example> | 329 | </example> |
349 | 330 | ||
@@ -355,9 +336,9 @@ int index; | |||
355 | 336 | ||
356 | index = 0; | 337 | index = 0; |
357 | 338 | ||
358 | if (-1 == ioctl (fd, &VIDIOC-S-INPUT;, &index)) { | 339 | if (-1 == ioctl(fd, &VIDIOC-S-INPUT;, &index)) { |
359 | perror ("VIDIOC_S_INPUT"); | 340 | perror("VIDIOC_S_INPUT"); |
360 | exit (EXIT_FAILURE); | 341 | exit(EXIT_FAILURE); |
361 | } | 342 | } |
362 | </programlisting> | 343 | </programlisting> |
363 | </example> | 344 | </example> |
@@ -397,7 +378,7 @@ available inputs and outputs applications can enumerate them with the | |||
397 | also contains signal status information applicable when the current | 378 | also contains signal status information applicable when the current |
398 | audio input is queried.</para> | 379 | audio input is queried.</para> |
399 | 380 | ||
400 | <para>The &VIDIOC-G-AUDIO; and &VIDIOC-G-AUDOUT; ioctl report | 381 | <para>The &VIDIOC-G-AUDIO; and &VIDIOC-G-AUDOUT; ioctls report |
401 | the current audio input and output, respectively. Note that, unlike | 382 | the current audio input and output, respectively. Note that, unlike |
402 | &VIDIOC-G-INPUT; and &VIDIOC-G-OUTPUT; these ioctls return a structure | 383 | &VIDIOC-G-INPUT; and &VIDIOC-G-OUTPUT; these ioctls return a structure |
403 | as <constant>VIDIOC_ENUMAUDIO</constant> and | 384 | as <constant>VIDIOC_ENUMAUDIO</constant> and |
@@ -408,11 +389,11 @@ applications call the &VIDIOC-S-AUDIO; ioctl. To select an audio | |||
408 | output (which presently has no changeable properties) applications | 389 | output (which presently has no changeable properties) applications |
409 | call the &VIDIOC-S-AUDOUT; ioctl.</para> | 390 | call the &VIDIOC-S-AUDOUT; ioctl.</para> |
410 | 391 | ||
411 | <para>Drivers must implement all input ioctls when the device | 392 | <para>Drivers must implement all audio input ioctls when the device |
412 | has one or more inputs, all output ioctls when the device has one | 393 | has multiple selectable audio inputs, all audio output ioctls when the |
413 | or more outputs. When the device has any audio inputs or outputs the | 394 | device has multiple selectable audio outputs. When the device has any |
414 | driver must set the <constant>V4L2_CAP_AUDIO</constant> flag in the | 395 | audio inputs or outputs the driver must set the <constant>V4L2_CAP_AUDIO</constant> |
415 | &v4l2-capability; returned by the &VIDIOC-QUERYCAP; ioctl.</para> | 396 | flag in the &v4l2-capability; returned by the &VIDIOC-QUERYCAP; ioctl.</para> |
416 | 397 | ||
417 | <example> | 398 | <example> |
418 | <title>Information about the current audio input</title> | 399 | <title>Information about the current audio input</title> |
@@ -420,14 +401,14 @@ driver must set the <constant>V4L2_CAP_AUDIO</constant> flag in the | |||
420 | <programlisting> | 401 | <programlisting> |
421 | &v4l2-audio; audio; | 402 | &v4l2-audio; audio; |
422 | 403 | ||
423 | memset (&audio, 0, sizeof (audio)); | 404 | memset(&audio, 0, sizeof(audio)); |
424 | 405 | ||
425 | if (-1 == ioctl (fd, &VIDIOC-G-AUDIO;, &audio)) { | 406 | if (-1 == ioctl(fd, &VIDIOC-G-AUDIO;, &audio)) { |
426 | perror ("VIDIOC_G_AUDIO"); | 407 | perror("VIDIOC_G_AUDIO"); |
427 | exit (EXIT_FAILURE); | 408 | exit(EXIT_FAILURE); |
428 | } | 409 | } |
429 | 410 | ||
430 | printf ("Current input: %s\n", audio.name); | 411 | printf("Current input: %s\n", audio.name); |
431 | </programlisting> | 412 | </programlisting> |
432 | </example> | 413 | </example> |
433 | 414 | ||
@@ -437,13 +418,13 @@ printf ("Current input: %s\n", audio.name); | |||
437 | <programlisting> | 418 | <programlisting> |
438 | &v4l2-audio; audio; | 419 | &v4l2-audio; audio; |
439 | 420 | ||
440 | memset (&audio, 0, sizeof (audio)); /* clear audio.mode, audio.reserved */ | 421 | memset(&audio, 0, sizeof(audio)); /* clear audio.mode, audio.reserved */ |
441 | 422 | ||
442 | audio.index = 0; | 423 | audio.index = 0; |
443 | 424 | ||
444 | if (-1 == ioctl (fd, &VIDIOC-S-AUDIO;, &audio)) { | 425 | if (-1 == ioctl(fd, &VIDIOC-S-AUDIO;, &audio)) { |
445 | perror ("VIDIOC_S_AUDIO"); | 426 | perror("VIDIOC_S_AUDIO"); |
446 | exit (EXIT_FAILURE); | 427 | exit(EXIT_FAILURE); |
447 | } | 428 | } |
448 | </programlisting> | 429 | </programlisting> |
449 | </example> | 430 | </example> |