#[non_exhaustive]pub enum PidFilter {
Keep {
pids: BTreeSet<u16>,
},
Service {
program_number: u16,
},
}Expand description
Configuration for TsFixBuilder::filter_pids.
#[non_exhaustive] — future modes may be added without a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Keep
Keep only packets whose PID is in pids (PAT PID 0x0000 is always added).
Constructed via PidFilter::keep.
Service
Extract one programme: resolve its PMT PID via the PAT, then keep
{PAT, pmt_pid, pcr_pid, …es_pids} and drop all other PIDs.
Constructed via PidFilter::service.
Implementations§
Source§impl PidFilter
impl PidFilter
Sourcepub fn keep(pids: impl IntoIterator<Item = u16>) -> Self
pub fn keep(pids: impl IntoIterator<Item = u16>) -> Self
Build a keep-set filter.
PAT PID 0x0000 is always implicitly included regardless of the supplied set — the PAT must be preserved for any downstream demuxer to work.
§Example
use ts_fix::PidFilter;
let cfg = PidFilter::keep([0x0101, 0x0102]);Trait Implementations§
Auto Trait Implementations§
impl Freeze for PidFilter
impl RefUnwindSafe for PidFilter
impl Send for PidFilter
impl Sync for PidFilter
impl Unpin for PidFilter
impl UnsafeUnpin for PidFilter
impl UnwindSafe for PidFilter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more