STRUCT SKELETON(9)
β¨ NAME β¨
struct skeleton β literally all the internal data for one (1) instance of a device, bestie. One struct, one device, that's the whole vibe π
πΈ SYNOPSIS πΈ
struct skeleton {
struct pci_dev *pdev;
struct v4l2_device v4l2_dev;
struct video_device vdev;
struct v4l2_ctrl_handler ctrl_handler;
struct mutex lock;
v4l2_std_id std;
struct v4l2_dv_timings timings;
struct v4l2_pix_format format;
unsigned input;
struct vb2_queue queue;
spinlock_t qlock;
struct list_head buf_list;
unsigned field;
unsigned sequence;
};
No cap, that's the whole blueprint π
π Members π
Okay so let's go through every single one of these, because they all matter, periodt:
pdevβ the PCI device. Like, the actual hardware babe π«Άv4l2_devβ the top-levelv4l2device struct, the main character of the operation πvdevβ the video node structure πctrl_handlerβ the control handler structure, holding all the controls together β¨lockβ the ioctl serialization mutex. It keeps your ioctls from stepping on each other's toes πstdβ the current SDTV standard πΊtimingsβ the current HDTV timings, fancy β¨formatβ the current pix format πinputβ the current video input (0= SDTV,1= HDTV). Pick your fighter π¦queueβ thevb2video capture queue πΈqlockβ spinlock controlling access tobuf_listandsequence. Not me being protective of just those two πbuf_listβ the list of buffers queued for DMA πfieldβ the field (TOP/BOTTOM/other) of the current buffer βsequenceβ the frame sequence counter, counting frames like it's a stan counter π₯
π₯ SEE ALSO π₯
- Kernel file
./samples/v4l/v4l2-pci-skeleton.cβ go read it, iykyk π§
And that's the whole page bestie π«Ά this little icon came from ./samples/v4l, dated October 2026, living its life as struct skeleton(9) in the Kernel API Manual π slay.
π¦ 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