Initialization and Termination
This topic describes how to initialize and terminate the DVDBuilder API.
DVDBuilder
You must initialize the DVDBuilder API when your application starts and terminate it before your application ends. The DVDBuilder license can be set right after the initialization. If you do not set a license, DVDBuilder will work in demo mode.
namespace InitAndTerminate
{
using dvdb = PrimoSoftware.DVDBuilder;
class Program
{
static void Main(string[] args)
{
dvdb.Library.Initialize();
// Set license. To run DVDBuilder in demo mode, comment the next line out
dvdb.Library.SetLicense("license-xml-string");
// Code that uses DVDBuilder goes here
dvdb.Library.Shutdown();
}
}
}
AVBlocks and PrimoBurner
DVDBuilder takes MPEG-2 video as input and creates a VIDEO_TS
directory. You can use AVBlocks to convert different video formats to MPEG-2. DVDBuilder does not support DVD burning, but you can use PrimoBurner to burn a VIDEO_TS
directory to a DVD.
AVBlocks and PrimoBurner are already included in the DVDBuilder SDK. You must initialize AVBlocks and PrimoBurner before using them.
namespace InitAndTerminate
{
using avb = PrimoSoftware.AVBlocks;
using dvdb = PrimoSoftware.DVDBuilder;
using pb = PrimoSoftware.Burner;
class Program
{
static void Main(string[] args)
{
avb.Library.Initialize();
dvdb.Library.Initialize();
pb.Library.Initialize();
// Set license
avb.Library.SetLicense("license-xml-string");
dvdb.Library.SetLicense("license-xml-string");
pb.Library.SetLicense("license-xml-string");
// Code that uses AVBlocks, DVDBuilder, and PrimoBurner goes here
pb.Library.Shutdown();
dvdb.Library.Shutdown();
avb.Library.Shutdown();
}
}
}
Last updated on May 6th, 2015 12:00:00 AM