Platform SDK: Broadcast Architecture |
After co-creating and obtaining the interfaces for a CSendATVEFInserter or CSendATVEFMulticast object, the next step is to initialize the object (by calling IATVEFInserterConfig::Initialize, or IATVEFMulticastConfig::Initialize, respectively). The settings made during initialization remain in effect for the lifetime of the object and cannot be changed. That means, for example, that if you initialize the object to use a specific host, you cannot for the lifetime of the object change the host. The following simple example illustrates initializing an CSendATVEFInserter object to use the local host.
char* szInserterAddress = "n.n.n.n"; //the Inserter IP address USHORT usInserterPort = 5001; // inet_addr returns the address in network order // so we use ntohl to convert to host order ULONG ulInserterIPAddr = ntohl(inet_addr(szInserterAddress));
hr = pIInserterConfig->Initialize( ulInserterIPAddr, //Inserter IP address in host order usInserterPort //port number );