nal_hevc_write_sps(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nal_hevc_write_sps(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual, section 9 πŸŽ€ β€” this is the little function that takes your SPS and makes it RBSP. Ngl it's giving "small function, big job" energy and we're obsessed ✨


🌸 NAME 🌸

nal_hevc_write_sps β€” literally writes an SPS NAL unit into RBSP format πŸ’– that's it, that's the whole vibe.


✨ SYNOPSIS ✨

ssize_t nal_hevc_write_sps (const struct device *dev , void *dest ,
       size_t n , struct nal_hevc_sps *sps );

look at her 😭 so clean, so iconic, so many arguments. let's go through them one by one, no skipping, i promise 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the device pointer. yeah, that one. the device bestie πŸ’…
  • dest β€” the buffer that gets filled with RBSP data πŸŽ€ this is the glow-up location, where the data goes to become beautiful
  • n β€” the maximum size of dest, in bytes. it's the vibe check on how much room dest actually has πŸ”₯
  • sps β€” the struct nal_hevc_sps we're converting to RBSP. the main character of this whole operation πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

so what does she do? she converts sps to RBSP data and writes it right into dest ✨ that's the whole gig, and she does it flawlessly.

but β€” and this is the important part, don't scroll past it β€” the size of the SPS NAL unit is not known in advance πŸ™ˆ so there's no cute little pre-flight check you can do beforehand. and this function will fail if dest does not hold sufficient space for the SPS NAL unit πŸ’€ like, she's not gonna squeeze it in, she's not gonna improvise, she's just gonna fail. so pls, pls, pls give her enough room πŸ™


🌈 RETURN 🌈

she returns the number of bytes written to dest πŸŽ‰ (slay) β€” or a negative error code 😭 if things didn't work out. check it! always check it! periodt πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group fr fr 🧚✨


and that's the page!! πŸŽ€ sign-off time: this one came from ./drivers/media/platform/alleg... and it's dated October 2026, filed under nal_hevc_write_sps(9) πŸ’– mwah, go write some RBSP, you got this πŸ’…πŸŒŸ

πŸ“¦ where this page comes from