Initialization and Termination

This topic describes how to initialize and terminate the AVBlocks API.

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.

.NET

Windows

Library.Initialize();

// Set license information. To run AVBlocks in demo mode, comment the next line out
Library.SetLicense("license-xml-string");

Library.Shutdown();

C++

Mac

Library::initialize();

// Set license information. To run AVBlocks in demo mode, comment the next line out
Library::setLicense("license-xml-string");

Library::shutdown();

Linux

Library::initialize();

// Set license information. To run AVBlocks in demo mode, comment the next line out
Library::setLicense("license-xml-string");

Library::shutdown();

Windows

You have to call CoInitializeEx / CoUninitialize to enable Windows Media codecs:

// needed for Windows Media codecs
CoInitializeEx(nullptr, COINITBASE_MULTITHREADED);

Library::initialize();

// Set license information. To run AVBlocks in demo mode, comment the next line out
Library::setLicense("license-xml-string");

Library::shutdown();

CoUninitialize();


Last updated on April 8th, 2017 02:55:54 PM