Skip to main content

PacketSinkError

Enum PacketSinkError 

Source
#[non_exhaustive]
pub enum PacketSinkError {
Show 23 variants UnsupportedOption(&'static str), StreamCopyUnsupported, UnsupportedStream { kind: &'static str, }, EncoderNotWhitelisted { kind: &'static str, encoder: String, allowed: &'static str, }, 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
§

EncoderNotWhitelisted

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

Fields

§kind: &'static str
§encoder: String
§allowed: &'static str
§

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
§

InvalidExtradata

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

Fields

§stream_index: usize
§reason: String
§

InvalidTimeBase

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

Fields

§stream_index: usize
§num: i32
§den: i32
§

PacketTimeBaseMismatch

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

Fields

§stream_index: usize
§packet_num: i32
§packet_den: i32
§stream_num: i32
§stream_den: i32
§

MissingTimestamp

A packet carries no pts or dts (AV_NOPTS_VALUE).

Fields

§stream_index: usize
§which: &'static str
§

NonMonotonicDts

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

Fields

§stream_index: usize
§prev: i64
§current: i64
§

DuplicatePts

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

Fields

§stream_index: usize
§pts: i64
§

PtsBeforeDts

A packet’s pts is earlier than its dts.

Fields

§stream_index: usize
§pts: i64
§dts: i64
§

TimestampOverflow

Rescaling a timestamp onto the shared time origin overflowed.

Fields

§stream_index: usize
§

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
§

MalformedPacket

The packet payload failed bitstream validation.

Fields

§stream_index: usize
§reason: String
§

PhaseViolation

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

Fields

§stream_index: usize
§

ConfigChange

The stream configuration changed after on_stream_info delivered it.

Fields

§stream_index: usize
§what: String
§

InBandParameterSets

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

Fields

§stream_index: usize
§

StreamInfoCallbackFailed

The sink’s on_stream_info callback rejected the configuration.

§

PacketCallbackFailed

The sink’s on_packet callback returned an error.

Fields

§stream_index: usize
§

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

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, 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> 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 = Infallible

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,