STRUCT DVB_DEMUX(9)
π struct dvb_demux(9)
okay bestie, so this is struct dvb_demux β it represents a digital TV demux, and it is literally the main character of the DVB demux world. Let's get into it β¨
β¨ SYNOPSIS β¨
struct dvb_demux {
struct dmx_demux dmx;
void *priv;
int filternum;
int feednum;
int (*start_feed)(struct dvb_demux_feed *feed);
int (*stop_feed)(struct dvb_demux_feed *feed);
int (*write_to_decoder)(struct dvb_demux_feed *feed, const u8 *buf,
size_t len);
u32 (*check_crc32)(struct dvb_demux_feed *feed, const u8 *buf,
size_t len);
void (*memcopy)(struct dvb_demux_feed *feed, u8 *dst, const u8 *src,
size_t len);
int users;
#define MAX_DVB_DEMUX_USERS 10;
struct dvb_demux_filter *filter;
struct dvb_demux_feed *feed;
struct list_head frontend_list;
struct dvb_demux_feed *pesfilter[DMX_PES_OTHER];
u16 pids[DMX_PES_OTHER];
#define DMX_MAX_PID 0x2000;
struct list_head feed_list;
u8 tsbuf[204];
int tsbufp;
struct mutex mutex;
spinlock_t lock;
uint8_t *cnt_storage;
ktime_t speed_last_time;
uint32_t speed_pkts_cnt;
};
π Members π
okay so every field is about to get its moment, no skipping, we're doing all of them π
dmxβ the embeddedstruct dmx_demuxthat carries the demux capabilities and callbacks. it's the whole reason this thing can demux at all, so yeah, kind of a big deal πprivβ private data, and it's optional β a DVB driver can use it if it wants. no pressure, no cap π«Άfilternumβ maximum amount of DVB filters.feednumβ maximum amount of DVB feeds.start_feedβ callback routine that gets called to start a DVB feed. go little feed go β¨stop_feedβ callback routine that gets called to stop a DVB feed. bye bestie πwrite_to_decoderβ callback routine that gets called when a new TS packet arrives, but only if the feed is TS and it's routed to an A/V decoder. and ngl it's used only onav7110-av.cβ that's it, one file, iconic behavior πcheck_crc32β callback routine to check CRC. if you don't initialize it,dvb_demuxjust uses an internal one. it's giving self-sufficient πΈmemcopyβ callback routine to memcopy received data. if you don't initialize it,dvb_demuxdefaults tomemcpy. defaults really said "i got you" π¦usersβ counter for the number of demux opened file descriptors. currently it's limited to 10 users. ten. that's the whole capacity.MAX_DVB_DEMUX_USERSsaid what she said πfilterβ pointer tostruct dvb_demux_filter.feedβ pointer tostruct dvb_demux_feed.frontend_listβ astruct list_headwith the frontends used by the demux.pesfilterβ array ofstruct dvb_demux_feedwith the PES types that will be filtered. it's sizedDMX_PES_OTHER, which is right there in the synopsis, don't come for me πpidsβ list of filtered program IDs.feed_listβ astruct list_headwith feeds.tsbufβ temporary buffer used internally to store TS packets.u8 tsbuf[204], yes the 204 is real.tsbufpβ temporary buffer index, used internally.mutexβ pointer tostruct mutexused to protect feed set logic. lock it down, queen πlockβ pointer tospinlock_t, used to protect buffer handling.cnt_storageβ buffer used for TS/TEI continuity check.speed_last_timeβktime_tused for TS speed check.speed_pkts_cntβ packets count used for TS speed check. β‘
quick vibe check bestie: the members block above keepsmutexandlockdescribed as pointers, andwrite_to_decoderdescribed as being used only onav7110-av.cβ both of those are straight from the source, so don't @ me, I'm just the messenger π
π SEE ALSO π
Kernel file ./include/media/dvb_demux.h, plus the whole friend group:
enum dvb_dmx_filter_type(9)enum dvb_dmx_state(9)struct dvb_demux_filter(9)struct dvb_demux_feed(9)dvb_dmx_init(9)dvb_dmx_release(9)dvb_dmx_swfilter_packets(9)dvb_dmx_swfilter(9)dvb_dmx_swfilter_204(9)dvb_dmx_swfilter_raw(9)
and that's the whole page, bestie, you ate that π«Άπ
this lil beauty lives in ./include/media, dated October 2026, and it's filed under struct dvb_demux(9) β periodt. β
π¦ 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