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.37. ioctl VIDIOC_G_PARM, VIDIOC_S_PARM¶
7.37.1. Tên¶
VIDIOC_G_PARM - VIDIOC_S_PARM - Nhận hoặc đặt tham số phát trực tuyến
7.37.2. Tóm tắt¶
-
VIDIOC_G_PARM¶
ZZ0000ZZ
-
VIDIOC_S_PARM¶
ZZ0000ZZ
7.37.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.37.4. Sự miêu tả¶
Ứng dụng có thể yêu cầu khoảng thời gian khung khác. Việc bắt giữ hoặc thiết bị đầu ra sẽ được cấu hình lại để hỗ trợ khung được yêu cầu khoảng cách nếu có thể. Tùy chọn người lái xe có thể chọn bỏ qua hoặc lặp lại các khung để đạt được khoảng thời gian khung được yêu cầu.
Đối với bộ mã hóa trạng thái (xem ZZ0000ZZ), điều này thể hiện khoảng thời gian khung thường được nhúng trong luồng video được mã hóa.
Việc thay đổi khoảng thời gian khung sẽ không bao giờ thay đổi định dạng. Thay đổi mặt khác, định dạng có thể thay đổi khoảng thời gian khung.
Hơn nữa, những ioctls này có thể được sử dụng để xác định số lượng bộ đệm được sử dụng bên trong bởi trình điều khiển ở chế độ đọc/ghi. Để biết ý nghĩa, hãy xem phần thảo luận về chức năng ZZ0000ZZ.
Để nhận và thiết lập các thông số phát trực tuyến, các ứng dụng hãy gọi ZZ0000ZZ và ZZ0001ZZ ioctl tương ứng. Họ lấy một con trỏ tới cấu trúc ZZ0002ZZ chứa một liên kết giữ các thông số riêng biệt cho các thiết bị đầu vào và đầu ra.
-
type v4l2_streamparm¶
__u32 |
|
The buffer (stream) type, same as struct
|
union { |
|
|
struct |
|
Parameters for capture devices, used when |
struct |
|
Parameters for output devices, used when |
__u8 |
|
A place holder for future extensions. |
} |
||
-
type v4l2_captureparm¶
__u32 |
|
|
__u32 |
|
Set by drivers and applications, see Capture Parameters Flags. |
struct |
|
This is the desired period between successive frames captured by the driver, in seconds. |
|
This will configure the speed at which the video source (e.g. a sensor) generates video frames. If the speed is fixed, then the driver may choose to skip or repeat frames in order to achieve the requested frame rate. For stateful encoders (see Memory-to-Memory Stateful Video Encoder Interface) this represents the frame interval that is typically embedded in the encoded video stream. Applications store here the desired frame period, drivers return the actual frame period. Changing the video standard (also implicitly by switching the video input) may reset this parameter to the nominal frame period. To reset manually applications can just set this field to zero. Drivers support this function only when they set the
|
||
__u32 |
|
Custom (driver specific) streaming parameters. When unused, applications and drivers must set this field to zero. Applications using this field should check the driver name and version, see Querying Capabilities. |
__u32 |
|
Applications set this field to the desired number of buffers used
internally by the driver in |
__u32 |
|
Reserved for future extensions. Drivers and applications must set the array to zero. |
-
type v4l2_outputparm¶
__u32 |
|
|
__u32 |
|
Set by drivers and applications, see Capture Parameters Flags. |
struct |
|
This is the desired period between successive frames output by the driver, in seconds. |
|
The field is intended to repeat frames on the driver side in
For stateful encoders (see Memory-to-Memory Stateful Video Encoder Interface) this represents the frame interval that is typically embedded in the encoded video stream and it provides a hint to the encoder of the speed at which raw frames are queued up to the encoder. Applications store here the desired frame period, drivers return the actual frame period. Changing the video standard (also implicitly by switching the video output) may reset this parameter to the nominal frame period. To reset manually applications can just set this field to zero. Drivers support this function only when they set the
|
||
__u32 |
|
Custom (driver specific) streaming parameters. When unused, applications and drivers must set this field to zero. Applications using this field should check the driver name and version, see Querying Capabilities. |
__u32 |
|
Applications set this field to the desired number of buffers used
internally by the driver in |
__u32 |
|
Reserved for future extensions. Drivers and applications must set the array to zero. |
|
0x1000 |
The frame period can be modified by setting the |
|
0x0001 |
High quality imaging mode. High quality mode is intended for still imaging applications. The idea is to get the best possible image quality that the hardware can deliver. It is not defined how the driver writer may achieve that; it will depend on the hardware and the ingenuity of the driver writer. High quality mode is a different mode from the regular motion video capture modes. In high quality mode:
|
7.37.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.