Initialization and Termination¶
You must initialize the AVBlocks API when your application starts and terminate it before your application ends. The AVBlocks license can be set right after the initialization. If you do not set a license, AVBlocks will work in demo mode.
The TLibrary object initializes AVBlocks when it is created and terminates AVBlocks when it is destroyed.
Mac¶
TLibrary library;
// Set license information. To run AVBlocks in demo mode, comment the next line out
TLibrary::setLicense("license-xml-string");
// AVBlocks is shut down when library goes out of scope
Linux¶
TLibrary library;
// Set license information. To run AVBlocks in demo mode, comment the next line out
TLibrary::setLicense("license-xml-string");
// AVBlocks is shut down when library goes out of scope
Windows¶
You have to call CoInitializeEx / CoUninitialize to enable Windows Media codecs:
// needed for Windows Media codecs
CoInitializeEx(nullptr, COINITBASE_MULTITHREADED);
{
TLibrary library;
// Set license information. To run AVBlocks in demo mode, comment the next line out
TLibrary::setLicense("license-xml-string");
// AVBlocks is shut down when library goes out of scope
}
CoUninitialize();