AVBlocks for C++  3.4
Audio and Video Software Development Kit
Loading...
Searching...
No Matches
primo::avblocks::Library Namespace Reference

Initializes AVBlocks and manages license information. More...

Functions

primo::avblocks::Config * config ()
 Returns the library configuration object.
primo::codecs::AudioStreamInfo * createAudioStreamInfo ()
 Creates an empty audio stream info.
primo::codecs::StreamInfo * createDataStreamInfo ()
 Creates a stream info for generic data.
primo::error::ErrorInfo * createErrorInfo ()
 Creates a new ErrorInfo instance.
primo::avblocks::FloatParameter * createFloatParameter ()
 Creates a float parameter.
primo::codecs::Hardware * createHardware ()
 Creates a Hardware enumeration object.
primo::avblocks::IntParameter * createIntParameter ()
 Creates an integer parameter.
primo::license::LicenseInfo * createLicenseInfo ()
 Creates a new LicenseInfo instance.
primo::codecs::MediaBuffer * createMediaBuffer (int32_t capacity=0)
 Creates a media buffer with the specified capacity.
primo::avblocks::MediaBufferParameter * createMediaBufferParameter ()
 Creates a parameter that holds a MediaBuffer object.
primo::avblocks::MediaInfo * createMediaInfo ()
 Creates a media information object.
primo::avblocks::MediaPin * createMediaPin ()
 Creates a media pin.
primo::codecs::MediaSample * createMediaSample ()
 Creates an empty media sample.
primo::avblocks::MediaSocket * createMediaSocket ()
 Creates a media socket.
primo::avblocks::MediaSocket * createMediaSocket (const char *preset)
 Creates a media socket from an AVBlocks Preset.
primo::avblocks::MediaSocket * createMediaSocket (MediaInfo *mediaInfo)
 Creates a media socket from a MediaInfo object.
primo::codecs::MetaAttribute * createMetaAttribute ()
 Creates an empty MetaAttribute object.
primo::codecs::Metadata * createMetadata ()
 Creates an empty Metadata object.
primo::codecs::MetaPicture * createMetaPicture ()
 Creates an empty MetaPicture object.
primo::avblocks::ParameterList * createParameterList ()
 Creates an empty collection of filter parameters.
primo::avblocks::StringParameter * createStringParameter ()
 Creates a parameter that holds a char_t* string.
Transcoder * createTranscoder ()
 Creates a Transcoder.
primo::codecs::VideoStreamInfo * createVideoStreamInfo ()
 Creates an empty video stream info.
primo::avblocks::VideoStreamInfoParameter * createVideoStreamInfoParameter ()
 Creates a parameter that holds a VideoStreamInfoParameter object.
const char * description ()
 Gets library build description.
bool_t initialize ()
 Initializes the AVBlocks library.
int32_t majorVersion ()
 Gets library major version.
int32_t minorVersion ()
 Gets library minor version.
int32_t patchVersion ()
 Gets library patch version.
int32_t setLicense (const char *license)
 Sets a license string.
void setLicenseTls (bool_t useTls)
 Sets whether TLS (Transport Layer Security) should be used for license validation.
void shutdown ()
 Closes the AVBlocks library and frees the resources that are used (if any).

Detailed Description

Initializes AVBlocks and manages license information.

This namespace contains global functions for the AVBlocks library. These are C++ wrappers of the functions in the pure "C" interface exported by the library.

Function Documentation

◆ config()

Returns the library configuration object.

Returns
A pointer to configuration object. This is never NULL.
See also
primo::avblocks::Config
primo::avblocks::HwConfig

References config().

Referenced by config().

◆ createAudioStreamInfo()

primo::codecs::AudioStreamInfo * createAudioStreamInfo ( )

Creates an empty audio stream info.

The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new AudioStreamInfo object.
See also
Object Management
AudioStreamInfo

References createAudioStreamInfo().

Referenced by createAudioStreamInfo().

◆ createDataStreamInfo()

primo::codecs::StreamInfo * createDataStreamInfo ( )

Creates a stream info for generic data.

The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new StreamInfo object.
Remarks
The media type is always MediaType::Data and cannot be changed.
See also
Object Management

References createDataStreamInfo().

Referenced by createDataStreamInfo().

◆ createErrorInfo()

primo::error::ErrorInfo * createErrorInfo ( )

Creates a new ErrorInfo instance.

Returns
A pointer to ErrorInfo object.
See also
primo::error::ErrorInfo

References createErrorInfo().

Referenced by createErrorInfo().

◆ createFloatParameter()

primo::avblocks::FloatParameter * createFloatParameter ( )

Creates a float parameter.

The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new Parameter object.
See also
Object Management
ParameterList

References createFloatParameter().

Referenced by createFloatParameter().

◆ createHardware()

primo::codecs::Hardware * createHardware ( )

Creates a Hardware enumeration object.

The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new Hardware object.
See also
Object Management
primo::codecs::Hardware

References createHardware().

Referenced by createHardware().

◆ createIntParameter()

primo::avblocks::IntParameter * createIntParameter ( )

Creates an integer parameter.

The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new Parameter object.
See also
Object Management
ParameterList

References createIntParameter().

Referenced by createIntParameter().

◆ createLicenseInfo()

primo::license::LicenseInfo * createLicenseInfo ( )

Creates a new LicenseInfo instance.

Returns
A pointer to LicenseInfo object.
See also
primo::license::LicenseInfo

References createLicenseInfo().

Referenced by createLicenseInfo().

◆ createMediaBuffer()

primo::codecs::MediaBuffer * createMediaBuffer ( int32_t capacity = 0)

Creates a media buffer with the specified capacity.

The caller is responsible for releasing the object when it is not needed anymore.

Parameters
capacityThe required capacity must be greater or equal to 0.
Returns
A pointer to the new MediaBuffer object if capacity >= 0, otherwise NULL.
Remarks
The returned object has a capacity that has been specified by the capacity parameter. It contains no data, i.e. dataSize() == 0.
See also
Object Management
MediaBuffer

References createMediaBuffer().

Referenced by createMediaBuffer().

◆ createMediaBufferParameter()

primo::avblocks::MediaBufferParameter * createMediaBufferParameter ( )

Creates a parameter that holds a MediaBuffer object.

The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new Parameter object.
See also
Object Management
ParameterList

References createMediaBufferParameter().

Referenced by createMediaBufferParameter().

◆ createMediaInfo()

primo::avblocks::MediaInfo * createMediaInfo ( )

Creates a media information object.

The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new MediaInfo object.
See also
Object Management
MediaInfo

References createMediaInfo().

Referenced by createMediaInfo().

◆ createMediaPin()

primo::avblocks::MediaPin * createMediaPin ( )

Creates a media pin.

It is used in input and output sockets of the transcoder. The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new MediaPin object.
See also
Object Management
MediaPin
MediaSocket
Transcoder

References createMediaPin().

Referenced by createMediaPin().

◆ createMediaSample()

primo::codecs::MediaSample * createMediaSample ( )

Creates an empty media sample.

The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new MediaSample object.
See also
Object Management
MediaSample

References createMediaSample().

Referenced by createMediaSample().

◆ createMediaSocket() [1/3]

primo::avblocks::MediaSocket * createMediaSocket ( )

Creates a media socket.

It is used as an input or output point of the transcoder. The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new MediaSocket object.
See also
Object Management
MediaSocket
MediaPin
Transcoder

References createMediaSocket().

Referenced by createMediaSocket(), createMediaSocket(), and createMediaSocket().

◆ createMediaSocket() [2/3]

primo::avblocks::MediaSocket * createMediaSocket ( const char * preset)

Creates a media socket from an AVBlocks Preset.

Parameters
preset[in] A pointer to a preset string. The known presets are listed in the primo::avblocks::Preset namespace.
Returns
A pointer to the new MediaSocket object which is configured according to the specified preset.

References createMediaSocket().

◆ createMediaSocket() [3/3]

primo::avblocks::MediaSocket * createMediaSocket ( MediaInfo * mediaInfo)

Creates a media socket from a MediaInfo object.

This method will call MediaInfo::load, if the MediaInfo has not been loaded.

Parameters
mediaInfo[in] A pointer to a MediaInfo object with audio/video information. This object is not needed after the method returns.
Returns
A pointer to a new MediaSocket object.
The pointer to a new MediaSocket object contains the information supplied by the mediaInfo parameter.
The caller is responsible for releasing the returned media socket when it is not needed anymore.
NULL if there was an error. In this case call MediaInfo::error() for detailed error information.

This method is meant to help in setting correctly the inputs of the Transcoder. The intended usage is as follows:

  1. Use MediaInfo to load information for a file or user stream.
  2. Create a media socket from the MediaInfo object (Library::createMediaSocket(MediaInfo*)).
  3. Add the newly created socket to the inputs of the Transcoder (Transcoder::inputs(), MediaSocketList::add()).
  4. Release the media socket if it will not be used outside of the Transcoder.
See also
MediaInfo
Object Management

References createMediaSocket().

◆ createMetaAttribute()

primo::codecs::MetaAttribute * createMetaAttribute ( )

Creates an empty MetaAttribute object.

The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new MetaAttribute object.
See also
Object Management
Metadata
Metadata::attributes

References createMetaAttribute().

Referenced by createMetaAttribute().

◆ createMetadata()

primo::codecs::Metadata * createMetadata ( )

Creates an empty Metadata object.

The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new Metadata object.
See also
Object Management
Metadata
MediaSocket::setMetadata
MediaSocket::metadata

References createMetadata().

Referenced by createMetadata().

◆ createMetaPicture()

primo::codecs::MetaPicture * createMetaPicture ( )

Creates an empty MetaPicture object.

The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new MetaPicture object.
See also
Object Management
Metadata
Metadata::pictures

References createMetaPicture().

Referenced by createMetaPicture().

◆ createParameterList()

primo::avblocks::ParameterList * createParameterList ( )

Creates an empty collection of filter parameters.

The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new ParameterList object.
See also
Object Management
ParameterList

References createParameterList().

Referenced by createParameterList().

◆ createStringParameter()

primo::avblocks::StringParameter * createStringParameter ( )

Creates a parameter that holds a char_t* string.

The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new Parameter object.
See also
Object Management
ParameterList

References createStringParameter().

Referenced by createStringParameter().

◆ createTranscoder()

Transcoder * createTranscoder ( )

Creates a Transcoder.

The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new Transcoder object.
See also
Object Management
Transcoder

References createTranscoder().

Referenced by createTranscoder().

◆ createVideoStreamInfo()

primo::codecs::VideoStreamInfo * createVideoStreamInfo ( )

Creates an empty video stream info.

The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new VideoStreamInfo object.
See also
Object Management
VideoStreamInfo

References createVideoStreamInfo().

Referenced by createVideoStreamInfo().

◆ createVideoStreamInfoParameter()

primo::avblocks::VideoStreamInfoParameter * createVideoStreamInfoParameter ( )

Creates a parameter that holds a VideoStreamInfoParameter object.

The caller is responsible for releasing the object when it is not needed anymore.

Returns
A pointer to the new Parameter object.
See also
Object Management
ParameterList

References createVideoStreamInfoParameter().

Referenced by createVideoStreamInfoParameter().

◆ description()

const char * description ( )

Gets library build description.

Returns
ANSI string.
Remarks
Contains details about the build including full version, architecture (x86/x64), configuration (Release/Debug), license (OEM/Demo) and platform (OS).

References description().

Referenced by description().

◆ initialize()

bool_t initialize ( )

Initializes the AVBlocks library.

Must be called once before the library is used, usually when the application starts.

Returns
TRUE if the library is successfully initialized, otherwise FALSE.

References initialize().

Referenced by initialize().

◆ majorVersion()

int32_t majorVersion ( )

Gets library major version.

Returns
major version

References majorVersion().

Referenced by majorVersion().

◆ minorVersion()

int32_t minorVersion ( )

Gets library minor version.

Returns
minor version

References minorVersion().

Referenced by minorVersion().

◆ patchVersion()

int32_t patchVersion ( )

Gets library patch version.

Returns
patch version
Remarks
The patch version is used for bug fixes and small improvements that do not involve API changes

References patchVersion().

Referenced by patchVersion().

◆ setLicense()

int32_t setLicense ( const char * license)

Sets a license string.

The supplied license is appended to the library license state.

Parameters
licenseA string with license information. If the license string is NULL the library license state is cleared.
Returns
The status after the license is set. The returned value is a combination of flags from the LicenseStatusFlags enum.
Remarks
A Demo build of the library cannot be licensed and always returns LicenseStatusFlags::DemoBuild.
See also
primo::license::LicenseStatusFlags::Enum

References setLicense().

Referenced by setLicense().

◆ setLicenseTls()

void setLicenseTls ( bool_t useTls)

Sets whether TLS (Transport Layer Security) should be used for license validation.

By default TLS is disabled (not used).

Remarks
This method must be called before Library::setLicense to have an effect.
Parameters
useTlsIf TRUE the library will use TLS to validate the license. If FALSE the library will not use TLS to validate the license.

References setLicenseTls().

Referenced by setLicenseTls().

◆ shutdown()

void shutdown ( )

Closes the AVBlocks library and frees the resources that are used (if any).

Should be called when the library will not be used anymore, e.g. when the application ends.

References shutdown().

Referenced by shutdown().