STRUCT DMXDEV(9)
π struct dmxdev(9) π
okay so bestie, gather round, because we're diving into the Kernel API Manual and this one is literally the blueprint for a digital TV demux device, no cap. it's giving "backstage pass to the whole demux operation" and i am obsessed. π
β¨ NAME β¨
struct dmxdev β describes a digital TV demux device. that's it, that's the vibe. it's the main character struct that holds the entire demux life together. π
π¦ SYNOPSIS π¦
struct dmxdev {
struct dvb_device *dvbdev;
struct dvb_device *dvr_dvbdev;
struct dmxdev_filter *filter;
struct dmx_demux *demux;
int filternum;
int capabilities;
unsigned int may_do_mmap:1;
unsigned int exit:1;
#define DMXDEV_CAP_DUPLEX 1;
struct dmx_frontend *dvr_orig_fe;
struct dvb_ringbuffer dvr_buffer;
#define DVR_BUFFER_SIZE (10*188*1024);
struct dvb_vb2_ctx dvr_vb2_ctx;
struct mutex mutex;
spinlock_t lock;
};
look at her. every field is doing its job. iconic behavior honestly. π«Ά
πΈ Members πΈ
these are the squad members, and yes, each one has a role and each one ate:
dvbdevβ pointer tostruct dvb_deviceassociated with the demux device node. basically the demux node's official rep. πdvr_dvbdevβ pointer tostruct dvb_deviceassociated with the dvr device node. same energy, but for the dvr side of things.filterβ pointer tostruct dmxdev_filter. the filter crew, linked up.demuxβ pointer tostruct dmx_demux. the actual demux brain trust.filternumβ number of filters. a count. a lil number. lowkey important.capabilitiesβ demux capabilities as defined byenum dmx_demux_caps. this is where the flex-worthy features get declared. β¨may_do_mmapβ flag used to indicate if the device may dommap. permission slip energy, fr fr.exitβ flag to indicate that the demux is being released. the goodbye flag. πdvr_orig_feβ pointer tostruct dmx_frontend.dvr_bufferβ embeddedstruct dvb_ringbufferfor DVB output. the ring buffer stays embedded, we love a self-contained queen.dvr_vb2_ctxβ control struct for VB2 handler.mutexβ protects the usage of this structure. do not skip the mutex, i'm begging. π₯lockβ protects access todmxdev->filter->data. different lock, different job, same "respect it or regret it" energy.
bestie pls note:mutexandlockare two separate things guarding two separate things β don't be out here mixing them up π
π§ SEE ALSO π§
go read these next, they're all part of the same lore drop:
- Kernel file
./include/media/dmxdev.h enum dmxdev_type(9)enum dmxdev_state(9)struct dmxdev_feed(9)struct dmxdev_filter(9)dvb_dmxdev_init(9)dvb_dmxdev_release(9)
and that's the whole page bestie, you understood it perfectly, i'm so proud π₯Ή
sign-off time: this masterpiece lives in ./include/media, dated October 2026, and it's brought to you as struct dmxdev(9). slay, periodt, go read the kernel. ππβ
π¦ 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