License and Error Codes

Enumerations for license status and error handling.

LicenseStatusFlags

class avblocks.LicenseStatusFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntFlag

Defines the AVBlocks license status.

When a license is set it may take some time until the license is resolved by the library.

DemoBuild = 2

This is a Demo build of AVBlocks. The library cannot be licensed and always operates in Demo mode.

Ready = 0

The licensed state is permanent. It can be changed only by calling Library.set_license.

Note: The Ready status does not imply that the library or any component is successfully licensed.

ValidationInProgress = 1

The license is being validated and the current licensed state in AVBlocks is temporary.

ErrorFacility

class avblocks.ErrorFacility(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

Describes the AVBlocks facilities that could generate errors.

Each facility represents either an external component or a component implemented by AVBlocks.

Note: Often error codes will have the same value, but different meaning depending on the facility that generated the error.

AVBlocks = 5

AVBlocks API error. The error code is a value from the AVBlocksError enum.

Codec = 9

Codec error. The error code is a value from the CodecError enum.

Success = 0

Not a facility. This is a special value that indicates a successful operation.

SystemMacMach = 3

Mach Error (Mac)

SystemMacOSStatus = 2

MacOS Status (Mac)

SystemPosix = 4

POSIX Error (Linux, Mac)

SystemWindows = 1

Windows System Error

Transcoder = 6

Transcoder error. The error code is a value from the TranscoderError enum.

AVBlocksError

class avblocks.AVBlocksError(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

Defines API usage errors.

These errors are raised when the AVBlocks API is used incorrectly.

LibraryNotInitialized = 10

Library is not initialized.

UnlicensedFeature = 9

A required feature (codec/format) is not licensed and demo mode is not enabled.

TranscoderError

class avblocks.TranscoderError(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

Defines Transcoder specific errors.

The Transcoder may also return errors like AVBlocksError, CodecError and others.

InputFull = 6

Cannot accept more input through Transcoder.push. Call Transcoder.pull to obtain output samples.

InputNeeded = 7

Cannot return output through Transcoder.pull. Call Transcoder.push to provide input samples.

NoChain = 1

The transcoder could not build a processing chain based on its inputs and outputs. Either the transcoder inputs and outputs are not configured properly or they are not compatible with each other. This error is returned by Transcoder.open.

NoCodec = 4

A required encoder or decoder is not available.

UndefinedSocketType = 2

The stream type of a MediaSocket is not defined. When a media socket describes a file, the stream type is deduced from the file extension. When a media socket describes a stream the stream type must be set explicitly. This error is returned by Transcoder.open.

UnsupportedInterlacedConversion = 3

It is not possible to convert from progressive to interlaced video. Also it is not possible to switch interlace type from top-first to bottom-first or vice versa. This error is returned by Transcoder.open.

UnsupportedVideoConversion = 5

It is not possible to convert from one uncompressed video format to another.

CodecError

class avblocks.CodecError(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

Common errors for encoders, decoders, muxers, demuxers and other A/V components.

Alloc = 10

Failed to allocate memory.

BufferFull = 20

One of the input/output buffers is full and cannot accept more data.

EOS = 9

End of stream; no more data.

Failed = 6

The operation failed for unknown reason.

Init = 1

Failed to initialize or open a codec.

InvalidOperation = 14

The operation is not allowed. Check ErrorInfo.hint for details.

InvalidParams = 13

At least one of the input parameters has an invalid value for the specified operation. Check ErrorInfo.hint for details.

InvalidStream = 11

Invalid bitstream.

MissingDependency = 15

A required library/dependency is not present. Check ErrorInfo.hint for details.

MissingHardwareAmdVce = 22

AMD VCE hardware not found.

MissingHardwareIntelQuickSync = 21

Intel QuickSync Video hardware not found.

MissingHardwareNvidiaNVENC = 23

NVIDIA NVENC hardware not found.

NoConfigData = 2

Decoder config data is required, but missing.

NoOutput = 3

No output has been generated.

NotImplemented = 12

The operation is not implemented yet.

NotInitialized = 7

The operation cannot be completed because the component is not initialized.

Null = 8

One or more of the input parameters are null but are expected to be valid pointers/references.

OutputBufferNotEnough = 4

The output buffer is not big enough for the generated output data.

StreamOpen = 16

Could not open a user stream.

StreamRead = 17

Could not read from a user stream.

StreamSeek = 19

Could not seek in a user stream.

StreamWrite = 18

Could not write to a user stream.

Unsupported = 5

Unsupported format or operation.