Expand description
Get information about video
§Example
use ferrix_lib::drm::Video;
use ferrix_lib::traits::ToJson;
let video = Video::new().unwrap();
for dev in &video.devices {
dbg!(dev);
}
let json = video.to_json().unwrap();
dbg!(json);§EDID structure, version 1.4
From WikiPedia
| Bytes | Description |
|---|---|
| 0-7 | Fixed header pattern 00 FF FF FF FF FF FF 00 |
| 8-9 | Manufacturer ID. “IBM”, “PHL” |
| 10-11 | Manufacturer product code. 16-bit hex number, little endian. “PHL” + “C0CF” |
| 12-15 | Serial number. 32 bits, little-endian |
| 16 | Week of manufacture; or FF model year flag |
| 17 | Year of manufacture, or year or model, if model year flag is set. Year = datavalue + 1990 |
| 18 | EDID version, usually 01 (for 1.3 and 1.4) |
| 19 | EDID revision, usually 03 (for 1.3) or 04 (for 1.4) |
| 20 | Video input parameters bitmap |
| 21 | Horizontal screen size, in cm (range 1-255). If vertical screen size is 0, landscape aspect ratio (range 1.00-3.54), datavalue = (ARx100) - 99 (example: 16:9, 79; 4:3, 34.) |
| 22 | Vertical screen size, in cm |
| 23 | Display gamma, factory default (range 1.00 - 3.54), datavalue = (gamma x 100) - 100 = (gamma - 1) x 100. If 255, gamma is defined by DI-EXT block |
| 24 | Supported features bitmap |
| … | … |
EDID Detailed Timing Descriptor (TODO)
| Bytes | Description |
|---|---|
| 0-1 | Pixel clock. 00 - reserved; otherwise in 10 kHz units (0.01 - 655.35 MHz, little-endian) |
| 2 | Horizontal active pixels 8 lsbits (0-255) |
| 3 | Horizontal blanking pixels 8 lsbits (0-255) |
| 4 | … |
| 5 | Vertical active lines 8 lsbits (0-255) |
| 6 | Vertical blanking lines 8 lsbits (0-255) |
| 7 | … |
| 8 | Horizontal front porch (sync offset) pixels 8 lsbits (0-255) from blanking start |
| 9 | Horizontal sync pulse width pixels 8 lsbits (0-255) |
| 10 | … |
| 11 | … |
| 12 | Horizontal image size, mm, 8 lsbits (0-255 mm, 161 in) |
| 13 | Vertical image size, mm, … |
| … | … |
Structs§
- DRM
- Information about selected display
- EDID
- Information from
edidfile (EDID v1.4 only supported yet) - Video
- Information about video devices
- Video
Input Params Analog - Video
Input Params Digital - Digital input
Enums§
- BitDepth
- Bit depth
- Video
Input Params - Video input parameters bitmap
- Video
Interface - Video interface (EDID data may be incorrect)