Documentation/userspace-api/media/dvb/dmx-set-buffer-size.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / DVB / Demux

DMX_SET_BUFFER_SIZE

필터 데이터 circular buffer의 크기를 설정합니다.

Source pathDocumentation/userspace-api/media/dvb/dmx-set-buffer-size.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

dmx-set-buffer-size.rst:1-48

DMX_SET_BUFFER_SIZE를 호출하지 않으면 필터링 데이터용 circular buffer의 크기는 최대 크기의 section 두 개에 해당하는 8192바이트입니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2 .. c:namespace:: DTV.dmx
3
4 .. _DMX_SET_BUFFER_SIZE:
5
6 ===================
7 DMX_SET_BUFFER_SIZE
8 ===================
9
10 Name
11 ----
12
13 DMX_SET_BUFFER_SIZE
14
15 Synopsis
16 --------
17
18 .. c:macro:: DMX_SET_BUFFER_SIZE
19
20 ``int ioctl(int fd, DMX_SET_BUFFER_SIZE, unsigned long size)``
21
22 Arguments
23 ---------
24
25 ``fd``
26 File descriptor returned by :c:func:`open()`.
27
28 ``size``
29 Unsigned long size
30
31 Description
32 -----------
33
34 This ioctl call is used to set the size of the circular buffer used for
35 filtered data. The default size is two maximum sized sections, i.e. if
36 this function is not called a buffer size of ``2 * 4096`` bytes will be
37 used.
38
39 Return Value
40 ------------
41
42 On success 0 is returned.
43
44 On error -1 is returned, and the ``errno`` variable is set
45 appropriately.
46
47 The generic error codes are described at the
48 :ref:`Generic Error Codes <gen-errors>` chapter.
49

3. 한국어 전문 번역

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

이름과 호출 형식

1-20

이 문서는 GFDL-1.1-no-invariants-or-later 라이선스와 `DTV.dmx` C namespace를 사용하며 `DMX_SET_BUFFER_SIZE` ioctl을 설명합니다.

호출 형식은 `int ioctl(int fd, DMX_SET_BUFFER_SIZE, unsigned long size)`입니다.

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

.. _DMX_SET_BUFFER_SIZE:

===================
DMX_SET_BUFFER_SIZE
===================

Name
----

DMX_SET_BUFFER_SIZE

Synopsis
--------

.. c:macro:: DMX_SET_BUFFER_SIZE

``int ioctl(int fd, DMX_SET_BUFFER_SIZE, unsigned long size)``

인자와 circular buffer 크기

21-37

`fd`는 `open()`이 반환한 file descriptor이고, `size`는 설정할 크기를 unsigned long 형식으로 나타낸 값입니다.

이 ioctl은 필터링된 데이터를 저장하는 circular buffer의 크기를 설정합니다.

기본 크기는 최대 크기의 section 두 개에 해당합니다. 이 함수를 호출하지 않으면 `2 * 4096`, 즉 8192바이트를 사용합니다.

필터 버퍼 크기
항목설명
기본값2 * 4096바이트(8192바이트)
사용자 설정DMX_SET_BUFFER_SIZE의 unsigned long size

명시적 설정 여부에 따른 크기를 구분합니다.


Arguments
---------

``fd``
    File descriptor returned by :c:func:`open()`.

``size``
    Unsigned long size

Description
-----------

This ioctl call is used to set the size of the circular buffer used for
filtered data. The default size is two maximum sized sections, i.e. if
this function is not called a buffer size of ``2 * 4096`` bytes will be
used.

반환값

38-48

성공하면 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.

The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.