Skip to main content

PacketSinkError

Enum PacketSinkError 

Source
#[non_exhaustive]
pub enum PacketSinkError {
Show 24 variants UnsupportedOption(&'static str), StreamCopyUnsupported, UnsupportedStream { kind: &'static str, }, EncoderNotWhitelisted { kind: &'static str, encoder: String, allowed: &'static str, }, BFramesUnsupported { encoder: String, }, NoStreams, MissingExtradata { stream_index: usize, }, InvalidExtradata { stream_index: usize, reason: String, }, InvalidTimeBase { stream_index: usize, num: i32, den: i32, }, PacketTimeBaseMismatch { stream_index: usize, packet_num: i32, packet_den: i32, stream_num: i32, stream_den: i32, }, MissingTimestamp { stream_index: usize, which: &'static str, }, NonMonotonicDts { stream_index: usize, prev: i64, current: i64, }, DuplicatePts { stream_index: usize, pts: i64, }, PtsBeforeDts { stream_index: usize, pts: i64, dts: i64, }, TimestampOverflow { stream_index: usize, }, MissingDuration { stream_index: usize, }, MalformedPacket { stream_index: usize, reason: String, }, PhaseViolation { stream_index: usize, }, ConfigChange { stream_index: usize, what: String, }, InBandParameterSets { stream_index: usize, }, StreamInfoCallbackFailed { error: PacketCallbackError, }, PacketCallbackFailed { stream_index: usize, error: PacketCallbackError, }, ChannelDisconnected, JobFailed { message: String, },
}
Expand description

Errors specific to packet-sink outputs (Output::new_by_packet_sink).

The strict tier fails fast: configuration problems surface from build() or from the job before any sink callback runs; per-packet violations stop the job with the offending packet never delivered. Clone is deliberate — for delivery-path errors the same value is recorded as the job error and handed to the sink’s on_delivery_error callback. JobFailed is the exception: it is synthesized for that callback only, while first-error-wins may leave the job result owned by a sibling worker’s error.

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.
§

UnsupportedOption(&'static str)

A builder option the packet sink cannot honor was set: either a container-only option (no container is written, so it could never take effect) or a pipeline feature outside the strict tier’s delivery contract (filters, bitstream filters, subtitle codecs — rejected as policy, not for lack of a container).

§

StreamCopyUnsupported

A stream was configured as copy; packet sinks require encoded streams.

§

UnsupportedStream

The output mapped a stream the strict tier cannot deliver (non-H.264 video, non-AAC audio, or a non-audio/video kind).

Fields

§kind: &'static str

Label describing the rejected stream kind (e.g. “non-H.264 video”, “non-AAC audio”).

§

EncoderNotWhitelisted

The configured encoder is outside the strict-tier v1 whitelist.

Fields

§kind: &'static str

Media kind of the stream (“video” or “audio”).

§encoder: String

The encoder name that was configured.

§allowed: &'static str

The encoder names the strict tier accepts for this kind.

§

BFramesUnsupported

An admitted video encoder was given an explicit B-frame option outside the strict-tier verified scope (bf=0 / max_b_frames=0).

Unset keys are not this error: they keep the wrapper default. This crate does not rewrite the caller’s options.

Fields

§encoder: String

The encoder name that was configured.

§

NoStreams

No stream was mapped to the packet-sink output.

§

MissingExtradata

An encoder finalized without the out-of-band codec configuration the strict tier delivers via on_stream_info.

Fields

§stream_index: usize

Index of the offending output stream.

§

InvalidExtradata

The encoder’s codec configuration failed strict-tier validation.

Fields

§stream_index: usize

Index of the offending output stream.

§reason: String

Why the codec configuration failed validation.

§

InvalidTimeBase

A stream’s time base is not a positive rational.

Fields

§stream_index: usize

Index of the offending output stream.

§num: i32

Numerator of the rejected time base.

§den: i32

Denominator of the rejected time base.

§

PacketTimeBaseMismatch

A packet was stamped in a time base other than its stream’s.

Fields

§stream_index: usize

Index of the offending output stream.

§packet_num: i32

Numerator of the packet’s time base.

§packet_den: i32

Denominator of the packet’s time base.

§stream_num: i32

Numerator of the stream’s time base.

§stream_den: i32

Denominator of the stream’s time base.

§

MissingTimestamp

A packet carries no pts or dts (AV_NOPTS_VALUE).

Fields

§stream_index: usize

Index of the offending output stream.

§which: &'static str

Which timestamp is missing: “pts” or “dts”.

§

NonMonotonicDts

A packet’s dts did not strictly increase within its stream.

Fields

§stream_index: usize

Index of the offending output stream.

§prev: i64

dts of the previous packet, in stream time-base units.

§current: i64

dts of the offending packet, in stream time-base units.

§

DuplicatePts

A packet’s pts collided with a still-pending pts on the same stream.

Fields

§stream_index: usize

Index of the offending output stream.

§pts: i64

The duplicated pts value, in stream time-base units.

§

PtsBeforeDts

A packet’s pts is earlier than its dts.

Fields

§stream_index: usize

Index of the offending output stream.

§pts: i64

The packet’s pts, in stream time-base units.

§dts: i64

The packet’s dts, in stream time-base units.

§

TimestampOverflow

Rescaling a timestamp onto the shared time origin overflowed.

Fields

§stream_index: usize

Index of the offending output stream.

§

MissingDuration

A packet has no positive duration and none could be derived from the stream configuration (frame rate / codec frame size).

Fields

§stream_index: usize

Index of the offending output stream.

§

MalformedPacket

The packet payload failed bitstream validation.

Fields

§stream_index: usize

Index of the offending output stream.

§reason: String

Description of the bitstream validation failure.

§

PhaseViolation

Internal sequencing violation: a packet surfaced outside the delivery phase.

Fields

§stream_index: usize

Index of the offending output stream.

§

ConfigChange

The stream configuration changed after on_stream_info delivered it.

Fields

§stream_index: usize

Index of the offending output stream.

§what: String

Description of the configuration change that was detected.

§

InBandParameterSets

An H.264 access unit carried in-band SPS/PPS parameter sets.

Fields

§stream_index: usize

Index of the offending output stream.

§

StreamInfoCallbackFailed

The sink’s on_stream_info callback rejected the configuration.

Fields

§error: PacketCallbackError

The error the callback returned.

§

PacketCallbackFailed

The sink’s on_packet callback returned an error.

Fields

§stream_index: usize

Index of the offending output stream.

§error: PacketCallbackError

The error the callback returned.

§

ChannelDisconnected

The channel adapter’s receiver was dropped, cancelling delivery and the job.

§

JobFailed

The job failed outside this sink’s delivery path; handed to on_delivery_error only, while wait() keeps the original error.

Fields

§message: String

Display rendering of the error that actually failed the job.

Trait Implementations§

Source§

impl Clone for PacketSinkError

Source§

fn clone(&self) -> PacketSinkError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PacketSinkError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for PacketSinkError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for PacketSinkError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<PacketSinkError> for Error

Source§

fn from(source: PacketSinkError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more