Lưu ý
Mục đích của file này là để độc giả tiếng Việt có thể đọc và hiểu tài liệu nhân kernel dễ dàng hơn, không phải để tạo ra một nhánh tài liệu riêng. Nếu bạn có bất kỳ nhận xét hoặc cập nhật nào cho file này, vui lòng thử cập nhật file tiếng Anh gốc trước. Nếu bạn thấy có sự khác biệt giữa bản dịch và bản gốc, hoặc có vấn đề về bản dịch, vui lòng gửi góp ý hoặc patch cho người dịch của file này, hoặc nhờ người bảo trì và người review tài liệu tiếng Việt giúp đỡ.
- Bản gốc:
- Người dịch:
Google Translate (machine translation)
- Phiên bản gốc:
8541d8f725c6
Cảnh báo
Tài liệu này được dịch tự động bằng máy và chưa được review bởi người dịch. Nội dung có thể không chính xác hoặc khó hiểu ở một số chỗ. Khi có sự khác biệt với bản gốc, bản gốc luôn là chuẩn. Bản dịch chất lượng cao (được review) được đặt trong thư mục vi_VN/.
7.48. ioctl VIDIOC_QUERYCAP¶
7.48.1. Tên¶
VIDIOC_QUERYCAP - Khả năng của thiết bị truy vấn
7.48.2. Tóm tắt¶
-
VIDIOC_QUERYCAP¶
ZZ0000ZZ
7.48.3. Đối số¶
- ZZ0001ZZ
Bộ mô tả tệp được trả về bởi ZZ0000ZZ.
- ZZ0001ZZ
Con trỏ tới cấu trúc ZZ0000ZZ.
7.48.4. Sự miêu tả¶
Tất cả các thiết bị V4L2 đều hỗ trợ ZZ0001ZZ ioctl. Nó được sử dụng để xác định các thiết bị hạt nhân tương thích với thông số kỹ thuật này và để có được thông tin về trình điều khiển và khả năng phần cứng. ioctl mất một con trỏ tới cấu trúc ZZ0000ZZ được lấp đầy bởi người lái xe. Khi trình điều khiển không tương thích với điều này đặc điểm kỹ thuật ioctl trả về mã lỗi ZZ0002ZZ.
-
type v4l2_capability¶
__u8 |
|
Name of the driver, a unique NUL-terminated ASCII string. For example: “bttv”. Driver specific applications can use this information to verify the driver identity. It is also useful to work around known bugs, or to identify drivers in error reports. Storing strings in fixed sized arrays is bad practice but unavoidable here. Drivers and applications should take precautions to never read or write beyond the end of the array and to make sure the strings are properly NUL-terminated. |
__u8 |
|
Name of the device, a NUL-terminated UTF-8 string. For example:
“Yoyodyne TV/FM”. One driver may support different brands or
models of video hardware. This information is intended for users,
for example in a menu of available devices. Since multiple TV
cards of the same brand may be installed which are supported by
the same driver, this name should be combined with the character
device file name (e. g. |
__u8 |
|
Location of the device in the system, a NUL-terminated ASCII string. For example: “PCI:0000:05:06.0”. This information is intended for users, to distinguish multiple identical devices. If no such information is available the field must simply count the devices controlled by the driver (“platform:vivid-000”). The bus_info must start with “PCI:” for PCI boards, “PCIe:” for PCI Express boards, “usb-” for USB devices, “I2C:” for i2c devices, “ISA:” for ISA devices, “parport” for parallel port devices and “platform:” for platform devices. |
__u32 |
|
Version number of the driver. Starting with kernel 3.1, the version reported is provided by the V4L2 subsystem following the kernel numbering scheme. However, it may not always return the same version as the kernel if, for example, a stable or distribution-modified kernel uses the V4L2 stack from a newer kernel. The version number is formatted using the |
|
|
||
__u32 |
|
Available capabilities of the physical device as a whole, see
Device Capabilities Flags. The same physical device can export
multiple devices in /dev (e.g. /dev/videoX, /dev/vbiY and
/dev/radioZ). The |
__u32 |
|
Device capabilities of the opened device, see
Device Capabilities Flags. Should contain the available
capabilities of that specific device node. So, for example,
|
__u32 |
|
Reserved for future extensions. Drivers must set this array to zero. |
|
0x00000001 |
The device supports the single-planar API through the Video Capture interface. |
|
0x00001000 |
The device supports the multi-planar API through the Video Capture interface. |
|
0x00000002 |
The device supports the single-planar API through the Video Output interface. |
|
0x00002000 |
The device supports the multi-planar API through the Video Output interface. |
|
0x00008000 |
The device supports the single-planar API through the Video Memory-To-Memory interface. |
|
0x00004000 |
The device supports the multi-planar API through the Video Memory-To-Memory interface. |
|
0x00000004 |
The device supports the Video Overlay interface. A video overlay device typically stores captured images directly in the video memory of a graphics card, with hardware clipping and scaling. |
|
0x00000010 |
The device supports the Raw VBI Capture interface, providing Teletext and Closed Caption data. |
|
0x00000020 |
The device supports the Raw VBI Output interface. |
|
0x00000040 |
The device supports the Sliced VBI Capture interface. |
|
0x00000080 |
The device supports the Sliced VBI Output interface. |
|
0x00000100 |
The device supports the RDS capture interface. |
|
0x00000200 |
The device supports the Video Output Overlay (OSD)
interface. Unlike the Video Overlay interface, this is a
secondary function of video output devices and overlays an image
onto an outgoing video signal. When the driver sets this flag, it
must clear the |
|
0x00000400 |
The device supports the ioctl VIDIOC_S_HW_FREQ_SEEK ioctl for hardware frequency seeking. |
|
0x00000800 |
The device supports the RDS output interface. |
|
0x00010000 |
The device has some sort of tuner to receive RF-modulated video signals. For more information about tuner programming see Tuners and Modulators. |
|
0x00020000 |
The device has audio inputs or outputs. It may or may not support audio recording or playback, in PCM or compressed formats. PCM audio support must be implemented as ALSA or OSS interface. For more information on audio inputs and outputs see Audio Inputs and Outputs. |
|
0x00040000 |
This is a radio receiver. |
|
0x00080000 |
The device has some sort of modulator to emit RF-modulated video/audio signals. For more information about modulator programming see Tuners and Modulators. |
|
0x00100000 |
The device supports the SDR Capture interface. |
|
0x00200000 |
The device supports the struct
|
|
0x00400000 |
The device supports the SDR Output interface. |
|
0x00800000 |
The device supports the Metadata Interface capture interface. |
|
0x01000000 |
|
|
0x02000000 |
The device stores the EDID for a video input, or retrieves the EDID for a video output. It is a standalone EDID device, so no video streaming etc. will take place. For a video input this is typically an eeprom that supports the VESA Enhanced Display Data Channel Standard. It can be something else as well, for example a micro controller. For a video output this is typically read from an external device such as an HDMI splitter accessed by a serial port. |
|
0x04000000 |
The device supports the streaming I/O method. |
|
0x08000000 |
The device supports the Metadata Interface output interface. |
|
0x10000000 |
This is a touch device. |
|
0x20000000 |
There is only one input and/or output seen from userspace. The whole video topology configuration, including which I/O entity is routed to the input/output, is configured by userspace via the Media Controller. See Part IV - Media Controller API. |
|
0x80000000 |
The driver fills the |
7.48.5. Giá trị trả về¶
Khi thành công, trả về 0, lỗi -1 và biến ZZ0001ZZ được đặt một cách thích hợp. Các mã lỗi chung được mô tả tại Chương ZZ0000ZZ.