libdvb
libdvb is an interface library for DVB API v5 devices in Linux.
Supports three types of delivery systems:
- Satellite: DVB-S, DVB-S2
- Terrestrial: DVB-T, DVB-T2, ATSC, ISDB-T
- Cable: DVB-C
TODO:
- Cenelec EN 50221 - Common Interface Specification for Conditional Access and other Digital Video Broadcasting Decoder Applications
- DiSEqC 1.0
- DiSEqC 1.1
- EN 50494 - Unicable I
- EN 50607 - Unicable II
FeDevice
Frontend tune commands use typed DVBv5 properties instead of raw u32
property/value pairs.
Example DVB-S2 tune:
use ;
let cmdseq = vec!;
let fe = open_rw?;
fe.set_properties?;
Frontend information is available through explicit accessors:
let fe = open_ro?;
println!;
println!;
print!;
for v in fe.delivery_systems
println!;
println!;
println!;
println!;
Frontend status:
let fe = open_ro?;
let mut status = default;
status.read?;
println!;
FeStatus also exposes parsed values via methods such as
delivery_system(), modulation(), signal_strength_decibel(),
signal_strength(), snr_decibel(), snr(), ber(), and unc().
Demux
DmxDevice opens /dev/dvb/adapterN/demuxM and supports PES filters,
buffer sizing, and explicit start/stop:
use ;
let dmx = open?;
let filter = DmxPesFilterParams ;
dmx.set_pes_filter?;
NetDevice
Network interfaces are removed automatically when NetInterface is dropped.
Use mac() to read the interface MAC address.
use NetDevice;
let dev = open?;
let interface = dev.add_if?;
println!;
println!;
File Descriptors
CA, demux, frontend, and network device handles implement AsFd and
AsRawFd, so they can be passed to APIs that operate on borrowed or raw file
descriptors.
Code Formatting
rustfmt --config "group_imports=StdExternalCrate,imports_granularity=Crate,imports_layout=Vertical,newline_style=Unix,spaces_around_ranges=true,struct_lit_single_line=true,use_field_init_shorthand=true"