STRUCT EM28XX_BUFFER(9)
π struct em28xx_buffer(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β today's main character is struct em28xx_buffer, and honestly? it's giving "one video frame's whole support system." let's get into it π
πΈ NAME πΈ
struct em28xx_buffer β the buffer that holds one (1) single video frame, no more no less π¦
β¨ SYNOPSIS β¨
struct em28xx_buffer {
struct vb2_v4l2_buffer vb;
struct list_head list;
void *mem;
unsigned int length;
int top_field;
unsigned int pos;
char *vb_buf;
};
like, that's the whole vibe right there. copy it exactly if you're writing code, i'm begging π
π«Ά Members π«Ά
vbβ the common v4l buffer stuff. literally the standard-issue V4L2 buffer bits living inside this thing πlistβ a list head so this buffer can link up with all the other buffers. it's a group chat, and every buffer is in it πmemβ pointer to the buffer itself, as returned byvb2_plane_vaddr. that's where the actual memory lives β¨lengthβ how long the buffer is, as returned byvb2_plane_size. the size check, the vibe check πtop_fieldβ if this is non-zero, it means the buffer is the top field. that's it, that's the flag πposβ tells you the next position in the buffer that's gonna get filled. the "we're up to here" marker π₯vb_bufβ pointer to thevmallocmemory address invb. lowkey the real address energy β
π Description π
NOTE: in interlaced mode,posgets reset to zero at the start of each new field β not frame! π¨ like please do not get this twisted, the field/frame distinction is doing so much work here. fields are the little guys; frames are the big picture.posstarts over per field. periodt π
π SEE ALSO π
- Kernel file
./drivers/media/usb/em28xx/em28xx.h struct em28xx_usb_bufs(9)struct em28xx_usb_ctl(9)struct em28xx_fmt(9)enum em28xx_amux(9)
go read those next, iykyk π§
and that's the whole page bestie, no cap π β this one came from ./drivers/media/usb/em28xx, dated October 2026, and it's struct em28xx_buffer(9) saying bye ππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms