Documentation/userspace-api/media/v4l/streaming-par.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / V4L

V4L2 스트리밍 매개변수

프레임 속도, 고품질 캡처, 프레임 건너뛰기와 내부 버퍼 매개변수를 설명합니다.

Source pathDocumentation/userspace-api/media/v4l/streaming-par.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설, 영어 원문, 전체 번역을 구분해 실었습니다. API 이름, 코드 심벌, 소스 경로는 원문 표기를 유지합니다.

1. 요약·해설

원문의 핵심 내용을 정리하고 커널 프로그래밍에 필요한 설명을 덧붙였습니다. 아래의 전체 번역과는 별도로 작성한 해설입니다.

요약·해설

streaming-par.rst:1-34

프레임 속도, 고품질 캡처, 프레임 건너뛰기와 내부 버퍼 매개변수를 설명합니다.

2. 영어 원문 전체

번역에 사용한 Linux v6.18.37 원문입니다. 줄 번호는 해당 버전의 소스 파일을 기준으로 합니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2 .. c:namespace:: V4L
3
4 .. _streaming-par:
5
6 ********************
7 Streaming Parameters
8 ********************
9
10 Streaming parameters are intended to optimize the video capture process
11 as well as I/O. Presently applications can request a high quality
12 capture mode with the :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl.
13
14 The current video standard determines a nominal number of frames per
15 second. If less than this number of frames is to be captured or output,
16 applications can request frame skipping or duplicating on the driver
17 side. This is especially useful when using the
18 :c:func:`read()` or :c:func:`write()`, which are
19 not augmented by timestamps or sequence counters, and to avoid
20 unnecessary data copying.
21
22 Finally these ioctls can be used to determine the number of buffers used
23 internally by a driver in read/write mode. For implications see the
24 section discussing the :c:func:`read()` function.
25
26 To get and set the streaming parameters applications call the
27 :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
28 :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take
29 a pointer to a struct :c:type:`v4l2_streamparm`, which
30 contains a union holding separate parameters for input and output
31 devices.
32
33 These ioctls are optional, drivers need not implement them. If so, they
34 return the ``EINVAL`` error code.
35

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미에 맞춰 전체 내용을 번역했습니다. 코드, 함수명, 코드 심벌, URL은 원문 표기를 유지합니다.

캡처 품질, 프레임 속도 및 내부 버퍼

1-34

스트리밍 매개변수는 비디오 캡처 과정과 I/O를 최적화하기 위한 설정입니다. 현재 응용 프로그램은 `VIDIOC_S_PARM`을 사용해 고품질 캡처 모드를 요청할 수 있습니다.

현재 비디오 표준은 명목 초당 프레임 수를 정합니다. 응용 프로그램이 그보다 적은 프레임을 캡처하거나 출력하려면 드라이버 측 프레임 건너뛰기 또는 복제를 요청할 수 있습니다. 타임스탬프나 시퀀스 카운터가 없는 `read()` 및 `write()` I/O에서 특히 유용하며 불필요한 데이터 복사를 줄일 수 있습니다.

`VIDIOC_G_PARM`과 `VIDIOC_S_PARM`은 각각 현재 스트리밍 매개변수를 조회하고 설정합니다. 인수는 입력 및 출력 장치용 매개변수를 별도 union에 담는 `v4l2_streamparm` 구조체 포인터입니다. read/write 모드에서 드라이버가 내부적으로 사용하는 버퍼 수도 이 호출로 확인할 수 있습니다.

두 ioctl은 선택 사항이므로 드라이버가 구현하지 않아도 됩니다. 구현하지 않은 드라이버는 `EINVAL`을 반환합니다.

스트리밍 매개변수 적용
현재 비디오 표준에서 명목 프레임 속도를 확인합니다.응용 프로그램이 v4l2_streamparm으로 원하는 캡처 또는 출력 속도와 품질을 요청합니다.드라이버가 필요하면 프레임을 건너뛰거나 복제하고 내부 버퍼를 운용합니다.

표준 프레임 속도와 응용 프로그램 요청 사이의 처리 흐름입니다.

.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L

.. _streaming-par:

********************
Streaming Parameters
********************

Streaming parameters are intended to optimize the video capture process
as well as I/O. Presently applications can request a high quality
capture mode with the :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl.

The current video standard determines a nominal number of frames per
second. If less than this number of frames is to be captured or output,
applications can request frame skipping or duplicating on the driver
side. This is especially useful when using the
:c:func:`read()` or :c:func:`write()`, which are
not augmented by timestamps or sequence counters, and to avoid
unnecessary data copying.

Finally these ioctls can be used to determine the number of buffers used
internally by a driver in read/write mode. For implications see the
section discussing the :c:func:`read()` function.

To get and set the streaming parameters applications call the
:ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
:ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take
a pointer to a struct :c:type:`v4l2_streamparm`, which
contains a union holding separate parameters for input and output
devices.

These ioctls are optional, drivers need not implement them. If so, they
return the ``EINVAL`` error code.