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.