media_get_pad_index(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… media_get_pad_index(9)

okay bestie, welcome to the Kernel API Manual ✨ β€” this is the page for media_get_pad_index, and yes it's as niche as it sounds, but we're gonna slay it together 🫢


✨ SYNOPSIS ✨

int media_get_pad_index (struct media_entity *entity , u32 pad_type ,
       enum media_pad_signal_type sig_type );

like, three args, one int back, no drama periodt πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • entity β€” the entity where the pads belong πŸ¦‹ this is your little home base, the thing we're digging around inside.
  • pad_type β€” the type of the pad, one of MEDIA_PAD_FL_* pad types πŸ‘‘ (yes, that literal family of flags, don't get creative with it).
  • sig_type β€” type of signal of the pad to be search πŸ” i.e. which signal flavor we're out here looking for.

🌸 DESCRIPTION 🌸

okay so. this helper function finds the first pad index inside an entity that satisfies both the is_sink and sig_type conditions. both. not one. both. it's giving picky and honestly? we respect it 😌

On success, return the pad number πŸ’– if the pad was not found or the media entity is a NULL pointer, return -EINVAL πŸ’€ (yes, NULL entity gets you the same error as "nope, not here" β€” that's just how it is, no notes).


πŸ”₯ SEE ALSO πŸ”₯

literally the whole friend group, no cap:


and that's the whole page, mwah πŸ’‹ signed off from ./include/media, dated October 2026, living in the Kernel API Manual β€” go forth and find those pads, bestie 🌈⭐

πŸ“¦ where this page comes from