dmx_section_cb(9)
π dmx_section_cb π
okay so real talk, this is a page from the Kernel API Manual and it's all about dmx_section_cb(9) β a function callback prototype for DVB demux TS filtering. yes bestie, we're in kernel land and it's iconic π
β¨ NAME β¨
dmx_section_cb β the DVB demux TS filter callback function prototype. that's the whole vibe, she's a prototype, not the real implementation, and we respect her for it π
πΈ SYNOPSIS πΈ
int dmx_section_cb (const u8 *buffer1 , size_t buffer1_len , const u8
*buffer2 , size_t buffer2_len , struct dmx_section_filter *source , u32
*buffer_flags );
look at all those parameters, she's got range π₯
π¦ ARGUMENTS π¦
buffer1β pointer to the start of the filtered section, like e.g. sitting inside the circular buffer of the demux driver. that's where the tea (the section) begins πbuffer1_lenβ the length of the filtered section data inbuffer1, and yes it includes the headers and the CRC. no sneaky exclusions, count it all π―buffer2β pointer to the tail of the filtered section data, orNULLif there isn't one. super useful when you gotta handle the wrapping of a circular buffer, iykyk πbuffer2_lenβ length of the filtered section data inbuffer2, headers and CRC included, same rules as her sister above πsourceβ tells you which section feed is the source of the callback. like a little name tag at the party πbuffer_flagsβ the address where the buffer flags are stored. these are used to report discontinuity to users via the DVB memory mapped API, as defined byenum dmx_buffer_flags. literally the receipts π
π DESCRIPTION π
so this function callback prototype is provided by the client of the demux API and it gets called from the demux code. main character callback energy, periodt β¨
the function is only called when filtering of sections has been enabled using the function dmx_ts_feed.start_filtering. no enabling, no callback, that's the rule π¨
when the demux driver has received a complete section that matches at least one section filter, the client gets notified via this callback function. normally this function is called for each received section β but lowkey it's also possible to deliver multiple sections with one callback, for example when the system load is high. multi-tasking queen π
if an error occurs while receiving a section, this function should be called with the corresponding error type set in the success field, whether or not there is data to deliver. like, no data? still call it. that's the assignment π«Ά
the Section Feed implementation should maintain a circular buffer for received sections. however, this is not necessary if the Section Feed API is implemented as a client of the TS Feed API, because the TS Feed implementation then buffers the received data for you. convenient? we love π
the size of the circular buffer can be configured using the dmx_ts_feed.set function in the Section Feed API. customizable and cute πΈ
β οΈ okay important one, bestie: if there is no room in the circular buffer when a new section is received, the section must be discarded. and if that happens, the value of thesuccessparameter should beDMX_OVERRUN_ERRORon the next callback. don't forget, fr fr π
π₯ SEE ALSO π₯
kernel file ./include/media/demux.h, plus all her friends:
enum ts_filter_type(9)struct dmx_ts_feed(9)struct dmx_section_filter(9)struct dmx_section_feed(9)dmx_ts_cb(9)enum dmx_frontend_source(9)struct dmx_frontend(9)enum dmx_demux_caps(9)DMX_FE_ENTRY(9)struct dmx_demux(9)
and that's the page, bestie!! π§ from ./include/media, dated October 2026, and she's officially dmx_section_cb(9). go forth and filter those sections, you're gonna slay πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms