STRUCT UVC_META_BUF(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct uvc_meta_buf(9) β€” the Kernel API Manual, but make it cute

okay so bestie, this page is from the Kernel API Manual and it's literally all about struct uvc_meta_buf β€” one little building block that metadata buffers are made of. it's giving "tiny but crucial" ngl πŸŽ€


✨ NAME ✨

struct uvc_meta_buf β€” the metadata buffer building block. that's it, that's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

struct uvc_meta_buf {
    __u64 ns;
    __u16 sof;
    __u8 length;
    __u8 flags;
    __u8 buf[];
 };

look at her. five fields. absolutely iconic layout. πŸ‘‘


πŸ’– Members πŸ’–

  • ns β€” the system timestamp of the payload, in nanoseconds. yes, nanoseconds, she's precise. ⏱️
  • sof β€” the USB Frame Number. frame number bestie, frame number. πŸ”’
  • length β€” length of the payload header. πŸ“
  • flags β€” the payload header flags. 🚩
  • buf β€” optional device-specific header data. optional!! she doesn't have to show up if she doesn't want to. πŸ™ˆ

🫢 Description 🫢

so here's the tea: UVC metadata nodes fill buffers with possibly multiple instances of this struct. like, more than one, packed in there. no cap. 🧚

the first two fields β€” that's ns and sof β€” are added by the driver. and what are they for? clock synchronisation, bestie. that's their whole main character energy. πŸ•°οΈβœ¨

the rest is an exact copy of a UVC payload header. exact. character for character. she does not paraphrase. πŸ’…

and the important bit: only complete objects with complete buffers are included. no half-finished little guys, no partial vibes. so because of that, the thing is always

sizeof(meta->ns) + sizeof(meta->sof) + meta->length

bytes large. always. periodt. πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘

  • the kernel file ./include/uapi/linux/uvcvideo.h β€” go read her, she's right there. πŸ“‚

and that's the whole page!! mwah πŸ’‹

this cutie lives in ./include/uapi/linux, dated October 2026, and she goes by struct uvc_meta_buf(9). go off queen πŸŒˆπŸ’œπŸ“

πŸ“¦ where this page comes from