Expand description
The CI TS data-plane device: CiDataDevice.
Separate-CI hardware (CXD2099-class CI bridges — a PCIe/USB CI card with no
integrated demod) exposes two devices. The control plane is the CA device
(CaDevice, caM): the EN 50221 APDU exchange
(resource manager, sessions, ca_pmt). The data plane is ciM: the host
writes the scrambled Transport Stream into it and reads the
descrambled TS back out. This module abstracts the data plane the same way
CaDevice abstracts the control plane, so the
host-fed descramble path can be driven by a real device (linux feature) or
an in-memory mock.
All TS I/O is in whole 188-byte packets (TS_PACKET_LEN); a non-aligned
buffer is rejected with io::ErrorKind::InvalidInput.
Structs§
- Mock
CiData Device - In-memory
CiDataDevicefor tests and the differential harness. - Partial
Write - Payload of the
io::ErrorKind::WouldBlockerror aCiDataDevice::writereturns when the device buffer filled before all of the TS was accepted. Read it back withpartial_write_progress.
Constants§
- TS_
PACKET_ LEN - MPEG-2 TS packet length (ISO/IEC 13818-1): 188 bytes. Size of one MPEG-TS packet (ETSI EN 300 468 §3.2, ISO/IEC 13818-1 §2.4.3.2).
Traits§
- CiData
Device - The TS data-plane device of a separate-CI module (
/dev/dvb/adapterN/ciM).
Functions§
- partial_
write_ progress - The whole-packet byte count a
CiDataDevice::writeerror accepted before the device filled, orNonewhenerris not aPartialWrite.