Download Video for Linux Two API Specification

Transcript
Table of Contents
Introduction........................................................................................................................................ix
1. Common API Elements.................................................................................................................. 1
1.1. Opening and Closing Devices .............................................................................................. 1
1.1.1. Device Naming ........................................................................................................ 1
1.1.2. Related Devices ....................................................................................................... 2
1.1.3. Multiple Opens ........................................................................................................ 2
1.1.4. Shared Data Streams................................................................................................ 3
1.1.5. Functions ................................................................................................................. 3
1.2. Querying Capabilities .......................................................................................................... 3
1.3. Application Priority.............................................................................................................. 3
1.4. Video Inputs and Outputs..................................................................................................... 4
1.5. Audio Inputs and Outputs .................................................................................................... 5
1.6. Tuners and Modulators......................................................................................................... 6
1.6.1. Tuners ...................................................................................................................... 6
1.6.2. Modulators............................................................................................................... 6
1.6.3. Radio Frequency...................................................................................................... 7
1.6.4. Satellite Receivers ................................................................................................... 7
1.7. Video Standards ................................................................................................................... 7
1.8. Controls ................................................................................................................................ 9
1.9. Data Formats ...................................................................................................................... 13
1.9.1. Data Format Negotiation ....................................................................................... 14
1.9.2. Image Format Enumeration ................................................................................... 14
1.10. Cropping and Scaling....................................................................................................... 15
1.11. Streaming Parameters....................................................................................................... 18
2. Image Formats .............................................................................................................................. 21
2.1. Standard Image Formats .................................................................................................... 21
2.2. Colorspaces ........................................................................................................................ 22
2.3. RGB Formats ..................................................................................................................... 25
2.4. YUV Formats ..................................................................................................................... 27
V4L2_PIX_FMT_GREY (’GREY’) ............................................................................... 27
V4L2_PIX_FMT_YUYV (’YUYV’).............................................................................. 28
V4L2_PIX_FMT_UYVY (’UYVY’).............................................................................. 29
V4L2_PIX_FMT_Y41P (’Y41P’)................................................................................... 30
V4L2_PIX_FMT_YVU420 (’YV12’), V4L2_PIX_FMT_YUV420 (’YU12’).............. 31
V4L2_PIX_FMT_YVU410 (’YVU9’), V4L2_PIX_FMT_YUV410 (’YUV9’)............ 32
V4L2_PIX_FMT_YUV422P (’422P’)............................................................................ 33
V4L2_PIX_FMT_YUV411P (’411P’)............................................................................ 34
V4L2_PIX_FMT_NV12 (’NV12’), V4L2_PIX_FMT_NV21 (’NV21’) ....................... 35
2.5. Compressed Formats.......................................................................................................... 36
2.6. Reserved Format Identifiers ............................................................................................... 36
3. Input/Output ................................................................................................................................. 37
3.1. Read/Write ......................................................................................................................... 37
3.2. Streaming I/O (Memory Mapping) .................................................................................... 37
3.3. Streaming I/O (User Pointers)............................................................................................ 40
3.4. Asynchronous I/O .............................................................................................................. 41
3.5. Buffers................................................................................................................................ 41
3.5.1. Timecodes.............................................................................................................. 45
3.6. Field Order ......................................................................................................................... 46
iii