Enum ErrorKind

Source
pub enum ErrorKind {
Show 26 variants NoEncodeDevice = 1, UnsupportedDevice = 2, InvalidEncoderDevice = 3, InvalidDevice = 4, DeviceNotExist = 5, InvalidPtr = 6, InvalidEvent = 7, InvalidParam = 8, InvalidCall = 9, OutOfMemory = 10, EncoderNotInitialized = 11, UnsupportedParam = 12, LockBusy = 13, NotEnoughBuffer = 14, InvalidVersion = 15, MapFailed = 16, NeedMoreInput = 17, EncoderBusy = 18, EventNotRegistered = 19, Generic = 20, IncompatibleClientKey = 21, Unimplemented = 22, ResourceRegisterFailed = 23, ResourceNotRegistered = 24, ResourceNotMapped = 25, NeedMoreOutput = 26,
}
Expand description

Wrapper enum around NVENCSTATUS.

Variants§

§

NoEncodeDevice = 1

No encode capable devices were detected.

§

UnsupportedDevice = 2

The device passed by the client is not supported.

§

InvalidEncoderDevice = 3

The encoder device supplied by the client is not valid.

§

InvalidDevice = 4

The device passed to the API call is invalid.

§

DeviceNotExist = 5

The device passed to the API call is no longer available and needs to be reinitialized. The clients need to destroy the current encoder session by freeing the allocated input output buffers and destroying the device and create a new encoding session.

§

InvalidPtr = 6

One or more of the pointers passed to the API call is invalid.

§

InvalidEvent = 7

The completion event passed in the [EncodeAPI.encode_picture] call is invalid.

§

InvalidParam = 8

One or more of the parameter passed to the API call is invalid.

§

InvalidCall = 9

An API call was made in wrong sequence or order.

§

OutOfMemory = 10

the API call failed because it was unable to allocate enough memory to perform the requested operation.

§

EncoderNotInitialized = 11

The encoder has not been initialized with [EncodeAPI.initialize_encoder] or that initialization has failed. The client cannot allocate input or output buffers or do any encoding related operation before successfully initializing the encoder.

§

UnsupportedParam = 12

An unsupported parameter was passed by the client.

§

LockBusy = 13

The [EncodeAPI.lock_bitstream] failed to lock the output buffer. This happens when the client makes a non-blocking lock call to access the output bitstream by passing the doNotWait flag. This is not a fatal error and client should retry the same operation after few milliseconds.

§

NotEnoughBuffer = 14

The size of the user buffer passed by the client is insufficient for the requested operation.

§

InvalidVersion = 15

An invalid struct version was used by the client.

§

MapFailed = 16

[EncodeAPI.map_input_resource] failed to map the client provided input resource.

§

NeedMoreInput = 17

The encode driver requires more input buffers to produce an output bitstream. If this error is returned from [EncodeAPI.encode_picture], this is not a fatal error. If the client is encoding with B frames then, [EncodeAPI.encode_picture] might be buffering the input frame for re-ordering.

A client operating in synchronous mode cannot call [EncodeAPI.lock_bitstream] on the output bitstream buffer if [EncodeAPI.encode_picture] returned this variant. The client must continue providing input frames until encode driver returns successfully. After a success the client can call [EncodeAPI.lock_bitstream] on the output buffers in the same order in which it has called [EncodeAPI.encode_picture].

§

EncoderBusy = 18

The hardware encoder is busy encoding and is unable to encode the input. The client should call [EncodeAPI.encode_picture] again after few milliseconds.

§

EventNotRegistered = 19

The completion event passed in [EncodeAPI.encode_picture] has not been registered with encoder driver using [EncodeAPI.register_async_event].

§

Generic = 20

An unknown internal error has occurred.

§

IncompatibleClientKey = 21

The client is attempting to use a feature that is not available for the license type for the current system.

§

Unimplemented = 22

the client is attempting to use a feature that is not implemented for the current version.

§

ResourceRegisterFailed = 23

[EncodeAPI.register_resource] failed to register the resource.

§

ResourceNotRegistered = 24

The client is attempting to unregister a resource that has not been successfully registered.

§

ResourceNotMapped = 25

The client is attempting to unmap a resource that has not been successfully mapped.

§

NeedMoreOutput = 26

The encode driver requires more output buffers to write an output bitstream. If this error is returned from [EncodeAPI.restore_encoder_state], this is not a fatal error. If the client is encoding with B frames then, [EncodeAPI.restore_encoder_state] API might be requiring the extra output buffer for accommodating overlay frame output in a separate buffer, for AV1 codec. In this case, the client must call [EncodeAPI.restore_encoder_state] API again with an output bitstream as input along with the parameters in the previous call. When operating in asynchronous mode of encoding, client must also specify the completion event.

Trait Implementations§

Source§

impl Clone for ErrorKind

Source§

fn clone(&self) -> ErrorKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ErrorKind

Source§

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

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

impl From<_NVENCSTATUS> for ErrorKind

Source§

fn from(status: NVENCSTATUS) -> Self

Converts to this type from the input type.
Source§

impl Hash for ErrorKind

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for ErrorKind

Source§

fn cmp(&self, other: &ErrorKind) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for ErrorKind

Source§

fn eq(&self, other: &ErrorKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for ErrorKind

Source§

fn partial_cmp(&self, other: &ErrorKind) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for ErrorKind

Source§

impl Eq for ErrorKind

Source§

impl StructuralPartialEq for ErrorKind

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