primo::avblocks::Library¶
Initializes AVBlocks and manages license information.
-
inline bool_t primo::avblocks::Library::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.
-
inline void primo::avblocks::Library::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.
-
inline const char *primo::avblocks::Library::description()¶
Gets library build description.
Remark
Contains details about the build including full version, architecture (x86/x64), configuration (Release/Debug), license (OEM/Demo) and platform (OS).
- Returns:
ANSI string.
-
inline int32_t primo::avblocks::Library::majorVersion()¶
Gets library major version.
- Returns:
major version
-
inline int32_t primo::avblocks::Library::minorVersion()¶
Gets library minor version.
- Returns:
minor version
-
inline int32_t primo::avblocks::Library::patchVersion()¶
Gets library patch version.
Remark
The patch version is used for bug fixes and small improvements that do not involve API changes
- Returns:
patch version
-
inline void primo::avblocks::Library::setLicenseTls(bool_t useTls)¶
Sets whether TLS (Transport Layer Security) should be used for license validation.
By default TLS is disabled (not used).
Remark
This method must be called before Library::setLicense to have an effect.
- Parameters:
useTls – If TRUE the library will use TLS to validate the license. If FALSE the library will not use TLS to validate the license.
-
inline int32_t primo::avblocks::Library::setLicense(const char *license)¶
Sets a license string.
The supplied license is appended to the library license state.
Remark
A Demo build of the library cannot be licensed and always returns LicenseStatusFlags::DemoBuild.
- Parameters:
license – A 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.
-
inline primo::license::LicenseInfo *primo::avblocks::Library::createLicenseInfo()¶
Creates a new LicenseInfo instance.
See also
- Returns:
A pointer to LicenseInfo object.
-
inline Transcoder *primo::avblocks::Library::createTranscoder()¶
Creates a Transcoder.
The caller is responsible for releasing the object when it is not needed anymore.
See also
See also
- Returns:
A pointer to the new Transcoder object.
-
inline primo::error::ErrorInfo *primo::avblocks::Library::createErrorInfo()¶
Creates a new ErrorInfo instance.
See also
- Returns:
A pointer to ErrorInfo object.
-
inline primo::codecs::AudioStreamInfo *primo::avblocks::Library::createAudioStreamInfo()¶
Creates an empty audio stream info.
The caller is responsible for releasing the object when it is not needed anymore.
See also
See also
- Returns:
A pointer to the new AudioStreamInfo object.
-
inline primo::codecs::VideoStreamInfo *primo::avblocks::Library::createVideoStreamInfo()¶
Creates an empty video stream info.
The caller is responsible for releasing the object when it is not needed anymore.
See also
See also
- Returns:
A pointer to the new VideoStreamInfo object.
-
inline primo::codecs::StreamInfo *primo::avblocks::Library::createDataStreamInfo()¶
Creates a stream info for generic data.
The caller is responsible for releasing the object when it is not needed anymore.
Remark
The media type is always MediaType::Data and cannot be changed.
See also
- Returns:
A pointer to the new StreamInfo object.
-
inline primo::codecs::MediaSample *primo::avblocks::Library::createMediaSample()¶
Creates an empty media sample.
The caller is responsible for releasing the object when it is not needed anymore.
See also
See also
- Returns:
A pointer to the new MediaSample object.
-
inline primo::codecs::MediaBuffer *primo::avblocks::Library::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.
Remark
The returned object has a capacity that has been specified by the capacity parameter. It contains no data, i.e. dataSize() == 0.
See also
See also
- Parameters:
capacity – The required capacity must be greater or equal to 0.
- Returns:
A pointer to the new MediaBuffer object if capacity >= 0, otherwise NULL.
-
inline primo::avblocks::MediaPin *primo::avblocks::Library::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.
See also
See also
See also
See also
- Returns:
A pointer to the new MediaPin object.
-
inline primo::avblocks::MediaSocket *primo::avblocks::Library::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.
See also
See also
See also
See also
- Returns:
A pointer to the new MediaSocket object.
-
inline primo::avblocks::MediaSocket *primo::avblocks::Library::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.
-
inline primo::avblocks::MediaSocket *primo::avblocks::Library::createMediaSocket(MediaInfo *mediaInfo)¶
Creates a media socket from a MediaInfo object.
This method will call MediaInfo::load, if the MediaInfo has not been loaded.
This method is meant to help in setting correctly the inputs of the Transcoder. The intended usage is as follows:
Use MediaInfo to load information for a file or user stream.
Create a media socket from the MediaInfo object (Library::createMediaSocket(MediaInfo*)).
Add the newly created socket to the inputs of the Transcoder (Transcoder::inputs(), MediaSocketList::add()).
Release the media socket if it will not be used outside of the Transcoder.
See also
See also
- 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 mediaInfoparameter.
The caller is responsible for releasing the returned media socket when it is not needed anymore.
- Returns:
NULL if there was an error. In this case call MediaInfo::error() for detailed error information.
-
inline primo::avblocks::MediaInfo *primo::avblocks::Library::createMediaInfo()¶
Creates a media information object.
The caller is responsible for releasing the object when it is not needed anymore.
See also
See also
- Returns:
A pointer to the new MediaInfo object.
-
inline primo::avblocks::MediaBufferParameter *primo::avblocks::Library::createMediaBufferParameter()¶
Creates a parameter that holds a MediaBuffer object.
The caller is responsible for releasing the object when it is not needed anymore.
See also
See also
- Returns:
A pointer to the new Parameter object.
-
inline primo::avblocks::StringParameter *primo::avblocks::Library::createStringParameter()¶
Creates a parameter that holds a char_t* string.
The caller is responsible for releasing the object when it is not needed anymore.
See also
See also
- Returns:
A pointer to the new Parameter object.
-
inline primo::avblocks::VideoStreamInfoParameter *primo::avblocks::Library::createVideoStreamInfoParameter()¶
Creates a parameter that holds a VideoStreamInfoParameter object.
The caller is responsible for releasing the object when it is not needed anymore.
See also
See also
- Returns:
A pointer to the new Parameter object.
-
inline primo::avblocks::IntParameter *primo::avblocks::Library::createIntParameter()¶
Creates an integer parameter.
The caller is responsible for releasing the object when it is not needed anymore.
See also
See also
- Returns:
A pointer to the new Parameter object.
-
inline primo::avblocks::FloatParameter *primo::avblocks::Library::createFloatParameter()¶
Creates a float parameter.
The caller is responsible for releasing the object when it is not needed anymore.
See also
See also
- Returns:
A pointer to the new Parameter object.
-
inline primo::avblocks::ParameterList *primo::avblocks::Library::createParameterList()¶
Creates an empty collection of filter parameters.
The caller is responsible for releasing the object when it is not needed anymore.
See also
See also
- Returns:
A pointer to the new ParameterList object.
-
inline primo::codecs::Metadata *primo::avblocks::Library::createMetadata()¶
Creates an empty Metadata object.
The caller is responsible for releasing the object when it is not needed anymore.
See also
See also
See also
See also
- Returns:
A pointer to the new Metadata object.
-
inline primo::codecs::MetaAttribute *primo::avblocks::Library::createMetaAttribute()¶
Creates an empty MetaAttribute object.
The caller is responsible for releasing the object when it is not needed anymore.
See also
See also
See also
- Returns:
A pointer to the new MetaAttribute object.
-
inline primo::codecs::MetaPicture *primo::avblocks::Library::createMetaPicture()¶
Creates an empty MetaPicture object.
The caller is responsible for releasing the object when it is not needed anymore.
See also
See also
See also
- Returns:
A pointer to the new MetaPicture object.
-
inline primo::codecs::Hardware *primo::avblocks::Library::createHardware()¶
Creates a Hardware enumeration object.
The caller is responsible for releasing the object when it is not needed anymore.
See also
See also
- Returns:
A pointer to the new Hardware object.