Setting License Info
This topic describes how to use an DVDBuilder license file.
DVDBuilder License File
The DVDBuilder license file is sent to you via email when you purchase a license. The license file is an XML document that looks similar to this one:
<!--
This file contains PrimoSoftware license(s).
Line breaks and indentation between elements can be edited,
but any other reformatting may invalidate the license(s).
-->
<primoSoftware>
<license version='1.0'>
<token>abcd1234efghi5678</token>
<revision>2</revision>
<issueDate>2015-01-02</issueDate>
<expireDate>2017-01-03</expireDate>
<updateTime>2015-12-09 04:50:15</updateTime>
<item id='avb-win'>
<product>avb</product>
<feature id='aac-dec' />
<feature id='ac3-dec' />
<feature id='mpa-dec' />
<feature id='mpa-enc' />
<feature id='vorbis-dec' />
<feature id='wma-dec' />
<feature id='h261-dec' />
<feature id='h263-dec' />
<feature id='h264-dec' />
<feature id='mjpeg-dec' />
<feature id='mpeg2-dec' />
<feature id='mpeg2-enc' />
<feature id='mpeg4-dec' />
<feature id='vc1-dec' />
<feature id='vp8-dec' />
<feature id='wmv-dec' />
<feature id='pcm' />
</item>
<item id='dvdb-win'>
<product>dvdb</product>
</item>
<signature>very_very_long_signature_string_here</signature>
</license>
</primoSoftware>
In C++, you have to pass the XML as a string to Library::setLicense. You can use a C++11 string literal, e.g. R"xml( xml goes here )xml"
.
Windows
This code requires Visual Studio 2013.
// SetLicense.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
static const char* licenseXml = R"xml(
<!--
This file contains PrimoSoftware license(s).
Line breaks and indentation between elements can be edited,
but any other reformatting may invalidate the license(s).
-->
<primoSoftware>
<license version='1.0'>
<token>abcd1234efghi5678</token>
<revision>2</revision>
<issueDate>2015-01-02</issueDate>
<expireDate>2017-01-03</expireDate>
<updateTime>2015-12-09 04:50:15</updateTime>
<item id='avb-win'>
<product>avb</product>
<feature id='aac-dec' />
<feature id='ac3-dec' />
<feature id='mpa-dec' />
<feature id='mpa-enc' />
<feature id='vorbis-dec' />
<feature id='wma-dec' />
<feature id='h261-dec' />
<feature id='h263-dec' />
<feature id='h264-dec' />
<feature id='mjpeg-dec' />
<feature id='mpeg2-dec' />
<feature id='mpeg2-enc' />
<feature id='mpeg4-dec' />
<feature id='vc1-dec' />
<feature id='vp8-dec' />
<feature id='wmv-dec' />
<feature id='pcm' />
</item>
<item id='dvdb-win'>
<product>dvdb</product>
</item>
<signature>very_very_long_signature_string_here</signature>
</license>
</primoSoftware>
)xml";
int _tmain(int argc, _TCHAR* argv[])
{
namespace avb = primo::avblocks;
namespace dvdb = primo::dvdbuilder;
namespace pb = primo::burner;
// DVD authoring
dvdb::Library::setLicense(licenseXml);
// Video encoding (if you want to use AVBlocks)
avb::Library::initialize();
avb::Library::setLicense(licenseXml);
// DVD burning (if you want to use PrimoBurner)
pb::Library::setLicense(licenseXml);
// TODO: Add your code here instead
{
using namespace primo::license;
primo::ref<LicenseInfo> licenseInfo(dvdb::Library::createLicenseInfo());
assert(LicenseStatusFlags::Ready == licenseInfo->licenseStatus());
}
// AVBlocks cleanup (if you used AVBlocks)
avb::Library::shutdown();
return 0;
}
Last updated on February 26th, 2018 08:03:14 PM