video-command.rst 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. .. -*- coding: utf-8; mode: rst -*-
  2. .. _VIDEO_COMMAND:
  3. =============
  4. VIDEO_COMMAND
  5. =============
  6. Name
  7. ----
  8. VIDEO_COMMAND
  9. .. attention:: This ioctl is deprecated.
  10. Synopsis
  11. --------
  12. .. c:function:: int ioctl(int fd, VIDEO_COMMAND, struct video_command *cmd)
  13. :name: VIDEO_COMMAND
  14. Arguments
  15. ---------
  16. .. flat-table::
  17. :header-rows: 0
  18. :stub-columns: 0
  19. - .. row 1
  20. - int fd
  21. - File descriptor returned by a previous call to open().
  22. - .. row 2
  23. - int request
  24. - Equals VIDEO_COMMAND for this command.
  25. - .. row 3
  26. - struct video_command \*cmd
  27. - Commands the decoder.
  28. Description
  29. -----------
  30. This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders
  31. this ioctl has been replaced by the
  32. :ref:`VIDIOC_DECODER_CMD` ioctl.
  33. This ioctl commands the decoder. The ``video_command`` struct is a
  34. subset of the ``v4l2_decoder_cmd`` struct, so refer to the
  35. :ref:`VIDIOC_DECODER_CMD` documentation for
  36. more information.
  37. .. c:type:: struct video_command
  38. .. code-block:: c
  39. /* The structure must be zeroed before use by the application
  40. This ensures it can be extended safely in the future. */
  41. struct video_command {
  42. __u32 cmd;
  43. __u32 flags;
  44. union {
  45. struct {
  46. __u64 pts;
  47. } stop;
  48. struct {
  49. /* 0 or 1000 specifies normal speed,
  50. 1 specifies forward single stepping,
  51. -1 specifies backward single stepping,
  52. >1: playback at speed/1000 of the normal speed,
  53. <-1: reverse playback at (-speed/1000) of the normal speed. */
  54. __s32 speed;
  55. __u32 format;
  56. } play;
  57. struct {
  58. __u32 data[16];
  59. } raw;
  60. };
  61. };
  62. Return Value
  63. ------------
  64. On success 0 is returned, on error -1 and the ``errno`` variable is set
  65. appropriately. The generic error codes are described at the
  66. :ref:`Generic Error Codes <gen-errors>` chapter.