pub struct DmxDevice { /* private fields */ }
Expand description
A reference to the demux device and device information
Implementations§
Source§impl DmxDevice
impl DmxDevice
Sourcepub fn open_ro(adapter: u32, device: u32) -> Result<Self>
pub fn open_ro(adapter: u32, device: u32) -> Result<Self>
Attempts to open frontend device in read-only mode
Sourcepub fn open_rw(adapter: u32, device: u32) -> Result<Self>
pub fn open_rw(adapter: u32, device: u32) -> Result<Self>
Attempts to open frontend device in read-write mode
Sourcepub fn set_pes_filter(&self, filter: &DmxPesFilterParams) -> Result<()>
pub fn set_pes_filter(&self, filter: &DmxPesFilterParams) -> Result<()>
Attempts to set demux PES filter parameters. By a PES filter is meant a filter that is based just on the packet identifier (PID), i.e. no PES header or payload filtering capability is supported.
There is a flag field where it is possible to state whether a section should be CRC-checked, whether the filter should be a “one-shot” filter, i.e. if the filtering operation should be stopped after the first section is received, and whether the filtering operation should be started immediately (without waiting for a DMX_START ioctl call).
Sourcepub fn add_pid(&self, pid: u16) -> Result<()>
pub fn add_pid(&self, pid: u16) -> Result<()>
Tries to add multiple PIDs to a transport stream filter previously set up with set_pes_filter and output equal to DMX_OUT_TSDEMUX_TAP.
Sourcepub fn remove_pid(&self, pid: u16) -> Result<()>
pub fn remove_pid(&self, pid: u16) -> Result<()>
This ioctl call allows to remove a PID when multiple PIDs are set on a transport stream filter, e. g. a filter previously set up with output equal to DMX_OUT_TSDEMUX_TAP, created via either set_pes_filter or add_pid.
Sourcepub fn set_filter(&self, filter: &DmxSctFilterParams) -> Result<()>
pub fn set_filter(&self, filter: &DmxSctFilterParams) -> Result<()>
Attempts to set demux SCT filter parameters. A timeout may be defined stating number of seconds to wait for a section to be loaded. A value of 0 means that no timeout should be applied. Finally there is a flag field where it is possible to state whether a section should be CRC-checked, whether the filter should be a “one-shot” filter, i.e. if the filtering operation should be stopped after the first section is received, and whether the filtering operation should be started immediately (without waiting for a DMX_START ioctl call).
If a filter was previously set-up, this filter will be canceled, and the receive buffer will be flushed.
Sourcepub fn set_buffer_size(&self, size: u32) -> Result<()>
pub fn set_buffer_size(&self, size: u32) -> Result<()>
Attempts to set the size of the circular buffer used for filtered data. The default size is two maximum sized sections, i.e. if this function is not called a buffer size of 2 * 4096 bytes will be used.