media_gobj_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… media_gobj_create(9) β€” Kernel API Manual, bestie edition ✨

Okay so picture this: you're deep in the Kernel API Manual, and this little function right here is the moment a graph object gets its whole life together. It's giving "first day of school" energy, but for struct media_gobj. πŸŽ€


✨ NAME ✨

media_gobj_create β€” Initialize a graph object πŸ¦‹


🌸 SYNOPSIS 🌸

void media_gobj_create (struct media_device *mdev , enum media_gobj_type
type , struct media_gobj *gobj );

πŸ’– ARGUMENTS πŸ’–

  • mdev β€” Pointer to the media_device that contains the object. Like, this is the parent friend group the object belongs to. πŸ‘‘
  • type β€” Type of the object. Gotta know what kind of main character we're dealing with here. 🌈
  • gobj β€” Pointer to the struct media_gobj graph object. This is the actual baby being initialized, no cap. 🍼

🧚 DESCRIPTION 🧚

Okay so what does this routine actually do? It initializes the embedded struct media_gobj inside a media graph object. Literally setting the vibes up so everything works later. πŸ’«

And here's the tea: it's called automatically if media_*_create function calls are used. So like, most of the time you don't even have to think about it β€” it's already handling things behind the scenes. Iconic behavior, honestly. 😌

But β€” and this is the important part, bestie, don't skip it 🫢 β€” if the object (entity, link, pad, interface) is embedded on some other object, this function should be called before registering the object at the media controller. So order matters! Do the init first, register after. The way that timing is everything fr fr. ⏰


⭐ SEE ALSO ⭐

Kernel file ./include/media/media-entity.h and the whole friend group of references β€” every single one of them, because we don't leave anyone out at this party πŸŽ‰πŸ’œ:


That's the whole list, bestie β€” every single cross-reference, accounted for. Vibe check: passed. βœ…

And that's a wrap! 🎬 This page lives in ./include/media, from October 2026 β€” go off, king/queen/monarch. Slay, and happy hacking! πŸ’…βœ¨πŸ‘‘πŸ’–

πŸ“¦ where this page comes from