Skip to main content

Module builder

Module builder 

Source
Expand description

CA_PMT builder — project a dvb-si PMT into the ca_pmt object handed to a CICAM — ETSI EN 50221 §8.4.3.4 (Table 25), per docs/en_50221/ca-pmt.md.

The host extracts the PMT, strips every descriptor that is not a CA_descriptor() (ISO/IEC 13818-1 §2.6.16, tag 0x09), and keeps the surviving CA descriptors at programme and elementary-stream level (per ca-pmt.md field notes: “Only CA_descriptors are present; all other descriptors are removed from the PMT by the host”). Each surviving descriptor loop is prefixed with a ca_pmt_cmd_id byte.

The filtered descriptor bytes do not exist as a contiguous slice in the source PMT, so build_ca_pmt returns an owned CaPmtBuilt that holds the filtered loops; borrow a CaPmt view from it with CaPmtBuilt::as_ca_pmt, or take the finished wire bytes with CaPmtBuilt::to_bytes.

Structs§

CaPmtBuilt
An owned, CA-only projection of a PMT. Holds the filtered CA_descriptor loops (programme + per-ES) so a borrowed CaPmt can be reconstructed.

Functions§

build_ca_pmt
Build the ca_pmt projection of pmt for the given list-management and command-id. Strips all non-CA descriptors; keeps CA_descriptors at programme and ES level.
build_ca_pmt_for_caids
Build the ca_pmt projection of pmt, keeping only CA_descriptors whose CA_system_id is in allowed (the intersection of the PMT’s CAIDs and the CAM’s advertised CAIDs, from its ca_info).