media_pad_pipeline(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… media_pad_pipeline β€” like, the Kernel API Manual, bestie ✨

okay so real talk, we're in the Kernel API Manual today and the star of the show is media_pad_pipeline(9). she's small, she's useful, she's giving "one job and she does it." let's go πŸŽ€


🌸 NAME 🌸

media_pad_pipeline β€” get the media pipeline a pad is part of. that's it. that's the whole vibe check. πŸ¦‹


✨ SYNOPSIS ✨

struct media_pipeline * media_pad_pipeline (struct media_pad *pad );

literally one function, one argument, no drama. slay.


🫢 ARGUMENTS 🫢

  • pad β€” the pad. yes bestie, the pad. that's the whole description, it's giving minimalism πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea β˜• β€” this function hands you back the media_pipeline that a pad got associated with back when you were constructing that pipeline with media_pipeline_start. like, "hey, which pipeline does this pad belong to?" and she just knows. πŸ”₯

and the pointer? it stays valid right up until media_pipeline_stop gets called. so don't go holding onto it after that, ngl, that's the deadline. 🫑


πŸ‘‘ RETURN πŸ‘‘

you get back the media_pipeline that the pad is part of πŸ’– β€” or NULL if the pad isn't part of any pipeline at all. no pipeline, no pointer. sorry babe 😭

real ones check for NULL. don't be the person who doesn't check for NULL. πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./include/media/media-entity.h, and then the entire extended friend group, fr fr: enum media_gobj_type(9), struct media_gobj(9), struct media_entity_enum(9), struct media_graph(9), struct media_pipeline(9), struct media_pipeline_pad(9), struct media_pipeline_pad_iter(9), struct media_pipeline_entity_iter(9), struct media_link(9), enum media_pad_signal_type(9), struct media_pad(9), struct media_entity_operations(9), enum media_entity_type(9), struct media_entity(9), media_entity_for_each_pad(9), struct media_interface(9), struct media_intf_devnode(9), media_entity_id(9), media_type(9), media_id(9), media_gobj_gen_id(9), is_media_entity_v4l2_video_device(9), is_media_entity_v4l2_subdev(9), media_entity_enum_init(9), media_entity_enum_cleanup(9), media_entity_enum_zero(9), media_entity_enum_set(9), media_entity_enum_clear(9), media_entity_enum_test(9), media_entity_enum_test_and_set(9), media_entity_enum_empty(9), media_entity_enum_intersects(9), gobj_to_entity(9), gobj_to_pad(9), gobj_to_link(9), gobj_to_intf(9), intf_to_devnode(9), media_gobj_create(9), media_gobj_destroy(9), media_entity_pads_init(9), media_entity_cleanup(9), media_get_pad_index(9), media_create_pad_link(9), media_create_pad_links(9), media_entity_remove_links(9), __media_entity_setup_link(9), media_entity_setup_link(9), media_entity_find_link(9), media_pad_remote_pad_first(9), media_pad_remote_pad_unique(9), media_entity_remote_pad_unique(9), media_entity_remote_source_pad_unique(9), media_pad_is_streaming(9), media_entity_is_streaming(9), media_entity_pipeline(9), media_entity_get_fwnode_pad(9), media_graph_walk_init(9), media_graph_walk_cleanup(9), media_graph_walk_start(9), media_graph_walk_next(9), media_pipeline_start(9), __media_pipeline_start(9), media_pipeline_stop(9), __media_pipeline_stop(9), media_pipeline_for_each_pad(9), media_pipeline_entity_iter_init(9), media_pipeline_entity_iter_cleanup(9), media_pipeline_for_each_entity(9), media_pipeline_alloc_start(9), media_devnode_create(9), media_devnode_remove(9), media_create_intf_link(9), __media_remove_intf_link(9), media_remove_intf_link(9), __media_remove_intf_links(9), media_remove_intf_links(9), media_entity_call(9), media_create_ancillary_link(9), __media_entity_next_link(9), for_each_media_entity_data_link(9).

like, that's a whole group chat right there and every single one of them is iconic. iykyk πŸ§šβ€β™€οΈ


and that's the page, bestie!! πŸŽ€πŸ’œ this little gem lives over in ./include/media and the version on the tin is October 2026 β€” catch you in the next one, muah πŸ’‹πŸ¦‹β­

πŸ“¦ where this page comes from