STRUCT VIDTV_MUX(9)
β¨ STRUCT VIDTV_MUX(9) β¨
okay so bestie, welcome to the Kernel API Manual β we're doing a deep dive on struct vidtv_mux, which is described as a muxer abstraction that's loosely based in libavcodec/mpegtsenc.c. Loosely! Like, spiritually. vibe-wise. π
π NAME π
struct vidtv_mux β a muxer abstraction loosely based in libavcodec/mpegtsenc.c
β¨ SYNOPSIS β¨
struct vidtv_mux {
struct dvb_frontend *fe;
struct device *dev;
struct vidtv_mux_timing timing;
u32 mux_rate_kbytes_sec;
unsigned long pid_ctx[1 << (( 3) - 1)];
void (*on_new_packets_available_cb)(void *priv, u8 *buf, u32 npackets);
u8 *mux_buf;
u32 mux_buf_sz;
u32 mux_buf_offset;
struct vidtv_channel *channels;
struct vidtv_mux_si si;
u64 num_streamed_pcr;
u64 num_streamed_si;
struct work_struct mpeg_thread;
bool streaming;
u16 pcr_pid;
u16 transport_stream_id;
u16 network_id;
char *network_name;
void *priv;
};
πΈ MEMBERS πΈ
feβ the frontend structure, and guess who allocated it? the muxer. her house, her rules π«Άdevβ a pointer tostruct device.timingβ keeps track of all the timing-related info. the clock girlie β°mux_rate_kbytes_secβ the bit rate for the TS, in kbytes.pid_ctxβ a hash table that keeps track of per-PID metadata. lowkey the backbone of the whole operation.on_new_packets_available_cbβ a callback that lets everyone know fresh TS packets are ready. it's giving "notify your besties" energy πmux_bufβ a pointer to a buffer for this muxer. TS packets get stored in there and then passed on to the bridge driver. iconic little staging area β¨mux_buf_szβ the size formux_buf.mux_buf_offsetβ the current offset intomux_buf. she knows exactly where she's at, always πchannelsβ the channels associated with this muxer.siβ keeps track of the PSI context.num_streamed_pcrβ number of PCR packets streamed. count 'em π₯num_streamed_siβ the number of PSI packets streamed. also counted, also slaying.mpeg_threadβ the thread responsible for the muxer loop. main character energy fr fr πstreamingβ whethermpeg_threadis running or not. the vibe check flag.pcr_pidβ the TS PID used for the PSI packets. and listen: all channels will share the same PCR. no cap, everybody shares. π€transport_stream_idβ the transport stream ID.network_idβ the network ID.network_nameβ the network name.privβ private data. mind your business π
π¦ SEE ALSO π¦
- Kernel file
./drivers/media/test-drivers/vidtv/vidtv_mux.h struct vidtv_mux_timing(9)struct vidtv_mux_si(9)struct vidtv_mux_pid_ctx(9)struct vidtv_mux_init_args(9)
and that's the whole page, bestie!! go read ./drivers/media/test-drivers/vidtv/vidtv_mux.h and live your truth π
mwah π β this little love letter came from ./drivers/media/test-drivers/v..., dropped in October 2026, and it's part of the Kernel API Manual. 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