vidtv_pes_write_into(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vidtv_pes_write_into(9) β€” like, the whole manual, bestie

okay so welcome to the Kernel API Manual page for vidtv_pes_write_into, bestie. this is the one. the main character of PES-to-TS packet writing. let's get into it ✨


🌸 NAME 🌸

vidtv_pes_write_into β€” write a PES packet as MPEG-TS packets into a buffer. that's the whole vibe. no cap.


πŸŽ€ SYNOPSIS πŸŽ€

u32 vidtv_pes_write_into (struct pes_write_args *args );

literally that's the call. one function, one pointer, iconic πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • args β€” the args to use when writing. yes that's the whole description, it's giving brevity, and we respect it 🫢

✨ DESCRIPTION ✨

so what does this function actually do? okay so. it translates the ES data for one access unit from an encoder into MPEG TS packets. how? two-step glow-up:

  1. first it encapsulates the data with a PES header 🎁
  2. then it splits the whole thing into TS packets βœ‚οΈ

after that, the data is written into the buffer pointed to by args.buf. that's it. that's the function. slay πŸ’–


πŸ”₯ RETURN πŸ”₯

it returns the number of bytes written into the buffer.

and listen β€” this is usually NOT equal to the size of the access unit. like, don't be shocked. we needed space for PES headers, TS headers, and padding bytes, if any. the sizes are just built different, okay? 😭


🌈 SEE ALSO 🌈

  • Kernel file ./drivers/media/test-drivers/vidtv/vidtv_pes.h
  • struct pes_header_write_args(9)
  • struct pes_ts_header_write_args(9)
  • struct pes_write_args(9)

go read them, iykyk πŸ‘‘


fr fr don't assume return value == access unit size. headers and padding are eating bytes and they're not sorry. πŸ’€

okay that's the page!! mwah πŸŽ€ this was written from ./drivers/media/test-drivers/v... and it's dated October 2026 β€” so yeah, future-coded and flawless. bye bestie, go write some packets πŸ’œπŸ§š

πŸ“¦ where this page comes from