STRUCT MEDIA_GOBJ(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct media_gobj(9) β€” the Kernel API Manual moment

okay bestie, buckle up, because we're talking about struct media_gobj from the ✨ Kernel API Manual ✨ β€” it's giving "small struct, huge responsibilities" and honestly? iconic.

🌸 NAME 🌸

struct media_gobj β€” Define a graph object. that's it, that's the whole vibe. it defines a graph object 🫢

✨ SYNOPSIS ✨

struct media_gobj {
    struct media_device     *mdev;
    u32 id;
    struct list_head        list;
 };

no cap, that's the whole struct. three little members, living their best life πŸŽ€

πŸ¦‹ Members πŸ¦‹

  • mdev β€” a pointer to the struct media_device that owns this object. every gobj has a parent device, it's giving family energy πŸ’–
  • id β€” the non-zero object ID identifier. lowkey important: the ID should be unique inside a media_device, because it's composed by MEDIA_BITS_PER_TYPE (to store the type) plus MEDIA_BITS_PER_ID (to store the ID). so yeah, it's a bit-packing situation and it's serving 🧚
  • list β€” list entry stored in one of the per-type mdev object lists. that's where it lives, that's its home 🏠

πŸ‘‘ Description πŸ‘‘

All objects on the media graph should have this struct embedded. that's the rule, periodt. every single object on the media graph? needs this struct embedded. no exceptions, bestie πŸ’…

πŸ”₯ SEE ALSO πŸ”₯

the friend group is massive, so here's every single one of them, in the original order, no one left behind 🫢


and that's the whole page, bestie!! 🌈✨ this little icon lives over in ./include/media and the docs are stamped October 2026 β€” so if anyone asks, you now know struct media_gobj better than you know your own sleep schedule. go embed it in everything (the media graph objects, specifically). mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from