18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
28c2ecf20Sopenharmony_ci.. c:namespace:: DTV.video
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci.. _VIDEO_SELECT_SOURCE:
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci===================
78c2ecf20Sopenharmony_ciVIDEO_SELECT_SOURCE
88c2ecf20Sopenharmony_ci===================
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciName
118c2ecf20Sopenharmony_ci----
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ciVIDEO_SELECT_SOURCE
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci.. attention:: This ioctl is deprecated.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciSynopsis
188c2ecf20Sopenharmony_ci--------
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci.. c:macro:: VIDEO_SELECT_SOURCE
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci``int ioctl(fd, VIDEO_SELECT_SOURCE, video_stream_source_t source)``
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ciArguments
258c2ecf20Sopenharmony_ci---------
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci.. flat-table::
288c2ecf20Sopenharmony_ci    :header-rows:  0
298c2ecf20Sopenharmony_ci    :stub-columns: 0
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci    -  .. row 1
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci       -  int fd
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci       -  File descriptor returned by a previous call to open().
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci    -  .. row 2
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci       -  int request
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci       -  Equals VIDEO_SELECT_SOURCE for this command.
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci    -  .. row 3
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci       -  video_stream_source_t source
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci       -  Indicates which source shall be used for the Video stream.
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ciDescription
508c2ecf20Sopenharmony_ci-----------
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ciThis ioctl is for Digital TV devices only. This ioctl was also supported by the
538c2ecf20Sopenharmony_ciV4L2 ivtv driver, but that has been replaced by the ivtv-specific
548c2ecf20Sopenharmony_ci``IVTV_IOC_PASSTHROUGH_MODE`` ioctl.
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ciThis ioctl call informs the video device which source shall be used for
578c2ecf20Sopenharmony_cithe input data. The possible sources are demux or memory. If memory is
588c2ecf20Sopenharmony_ciselected, the data is fed to the video device through the write command.
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci.. c:type:: video_stream_source_t
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ci.. code-block:: c
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci	typedef enum {
658c2ecf20Sopenharmony_ci		VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */
668c2ecf20Sopenharmony_ci		VIDEO_SOURCE_MEMORY /* If this source is selected, the stream
678c2ecf20Sopenharmony_ci				comes from the user through the write
688c2ecf20Sopenharmony_ci				system call */
698c2ecf20Sopenharmony_ci	} video_stream_source_t;
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ciReturn Value
728c2ecf20Sopenharmony_ci------------
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ciOn success 0 is returned, on error -1 and the ``errno`` variable is set
758c2ecf20Sopenharmony_ciappropriately. The generic error codes are described at the
768c2ecf20Sopenharmony_ci:ref:`Generic Error Codes <gen-errors>` chapter.
77