요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.dmx
.. _DMX_ADD_PID:
===========
DMX_ADD_PID
===========
Name
----
DMX_ADD_PID
Synopsis
--------
.. c:macro:: DMX_ADD_PID
``int ioctl(fd, DMX_ADD_PID, __u16 *pid)``
Arguments
---------
``fd``
File descriptor returned by :c:func:`open()`.
``pid``
PID number to be filtered.
Description
-----------
This ioctl call allows to add multiple PIDs to a transport stream filter
previously set up with :ref:`DMX_SET_PES_FILTER` and output equal to
:c:type:`DMX_OUT_TSDEMUX_TAP <dmx_output>`.
Return Value
------------
On success 0 is returned.
On error -1 is returned, and the ``errno`` variable is set
appropriately.
Generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
이름과 호출 형식
1-20이 문서는 GFDL-1.1-no-invariants-or-later 라이선스와 `DTV.dmx` C namespace를 사용하며 `DMX_ADD_PID` ioctl을 설명합니다.
호출 형식은 `int ioctl(fd, DMX_ADD_PID, __u16 *pid)`입니다. 세 번째 인자는 필터에 추가할 16비트 PID 값을 가리킵니다.
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.dmx
.. _DMX_ADD_PID:
===========
DMX_ADD_PID
===========
Name
----
DMX_ADD_PID
Synopsis
--------
.. c:macro:: DMX_ADD_PID
``int ioctl(fd, DMX_ADD_PID, __u16 *pid)``
인자와 PID 추가 조건
21-36`fd`는 앞서 `open()`이 반환한 Demux 장치의 file descriptor이고, `pid`는 필터링할 PID 번호를 가리키는 포인터입니다.
이 ioctl은 이미 `DMX_SET_PES_FILTER`로 구성한 전송 스트림 필터에 여러 PID를 추가할 수 있게 합니다.
대상 필터의 출력은 `DMX_OUT_TSDEMUX_TAP <dmx_output>`과 같아야 합니다. 즉, 임의의 PES 출력 모드가 아니라 TS demux tap 출력으로 설정된 필터에 적용하는 확장 동작입니다.
기존 TS demux tap 필터를 확장하는 순서입니다.
Arguments
---------
``fd``
File descriptor returned by :c:func:`open()`.
``pid``
PID number to be filtered.
Description
-----------
This ioctl call allows to add multiple PIDs to a transport stream filter
previously set up with :ref:`DMX_SET_PES_FILTER` and output equal to
:c:type:`DMX_OUT_TSDEMUX_TAP <dmx_output>`.
반환값
37-47성공하면 0을 반환합니다. 오류가 발생하면 -1을 반환하고 `errno`를 상황에 맞게 설정합니다.
공통 오류 코드는 `Generic Error Codes <gen-errors>` 장에서 설명합니다.
Return Value
------------
On success 0 is returned.
On error -1 is returned, and the ``errno`` variable is set
appropriately.
Generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.
요약·해설
dmx-add-pid.rst:1-47DMX_ADD_PID는 DMX_SET_PES_FILTER로 만들고 DMX_OUT_TSDEMUX_TAP 출력을 선택한 기존 필터에 여러 PID를 추가합니다.