Enum nvidia_video_codec_sdk::safe::ErrorKind
source · pub enum ErrorKind {
Show 26 variants
NoEncodeDevice,
UnsupportedDevice,
InvalidEncoderDevice,
InvalidDevice,
DeviceNotExist,
InvalidPtr,
InvalidEvent,
InvalidParam,
InvalidCall,
OutOfMemory,
EncoderNotInitialized,
UnsupportedParam,
LockBusy,
NotEnoughBuffer,
InvalidVersion,
MapFailed,
NeedMoreInput,
EncoderBusy,
EventNotRegistered,
Generic,
IncompatibleClientKey,
Unimplemented,
ResourceRegisterFailed,
ResourceNotRegistered,
ResourceNotMapped,
NeedMoreOutput,
}
Expand description
Wrapper enum around NVENCSTATUS
.
Variants§
NoEncodeDevice
No encode capable devices were detected.
UnsupportedDevice
The device passed by the client is not supported.
InvalidEncoderDevice
The encoder device supplied by the client is not valid.
InvalidDevice
The device passed to the API call is invalid.
DeviceNotExist
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
One or more of the pointers passed to the API call is invalid.
InvalidEvent
The completion event passed in the [EncodeAPI.encode_picture
]
call is invalid.
InvalidParam
One or more of the parameter passed to the API call is invalid.
InvalidCall
An API call was made in wrong sequence or order.
OutOfMemory
the API call failed because it was unable to allocate enough memory to perform the requested operation.
EncoderNotInitialized
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
An unsupported parameter was passed by the client.
LockBusy
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
The size of the user buffer passed by the client is insufficient for the requested operation.
InvalidVersion
An invalid struct version was used by the client.
MapFailed
[EncodeAPI.map_input_resource
] failed to map the client provided
input resource.
NeedMoreInput
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
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
The completion event passed in [EncodeAPI.encode_picture
]
has not been registered with encoder driver using
[EncodeAPI.register_async_event
].
Generic
An unknown internal error has occurred.
IncompatibleClientKey
The client is attempting to use a feature that is not available for the license type for the current system.
Unimplemented
the client is attempting to use a feature that is not implemented for the current version.
ResourceRegisterFailed
[EncodeAPI.register_resource
] failed to register the resource.
ResourceNotRegistered
The client is attempting to unregister a resource that has not been successfully registered.
ResourceNotMapped
The client is attempting to unmap a resource that has not been successfully mapped.
NeedMoreOutput
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 From<_NVENCSTATUS> for ErrorKind
impl From<_NVENCSTATUS> for ErrorKind
source§fn from(status: NVENCSTATUS) -> Self
fn from(status: NVENCSTATUS) -> Self
source§impl Ord for ErrorKind
impl Ord for ErrorKind
source§impl PartialEq<ErrorKind> for ErrorKind
impl PartialEq<ErrorKind> for ErrorKind
source§impl PartialOrd<ErrorKind> for ErrorKind
impl PartialOrd<ErrorKind> for ErrorKind
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more