Platform SDK: Broadcast Architecture

Sending Announcements, Packages, and Triggers

After obtaining the interfaces, a content server application creates an announcement and a package and makes the connections. These tasks can be performed in any order. You may wish to call IATVEFSend::Connect first, since creating the connections involves a certain amount of overhead.

The object implementing IATVEFSend does not enforce any particular sequence for sending announcements, packages, and triggers. It is therefore up to the content server application to ensure that announcements, packages, and triggers are sent in the proper order to broadcast clients. In general, an announcement must be sent before any packages or triggers, because it tells the clients where to listen for them, and a package must be sent before any of its files can be triggered. You may send more than one package under the same announcement, and you may send more than one package before sending any triggers.

A typical broadcast round consists of the sending of one announcement, followed by one or more packages, each containing one or more enhancement files, and one or more triggers to control when the enhancements are displayed or otherwise activated on the broadcast client. A typical round can be illustrated like this:

ANNC ->PACK1->TRIGG->TRIGG... PACK2->TRIGG->TRIGG... PACK3->TRIGG

A typical broadcast session consists of a series of rounds:

ANNC_CREAT -> ROUND -> ANNC_CREAT -> ROUND -> ANNC_CREAT -> ROUND

As a general rule, you should resend the same rounds at different times throughout a session, so that viewers who tune in late have access to all the enhancements. To resend an announcement, call SendAnnouncement.

After the announcement has been sent, use the methods of IATVEFSend to send the package and then the triggers at the appropriate times. For information on how to obtain the pISend pointer, see Co-creating an Inserter, or Multicast Class Instance. For information on how to obtain and configure the pIPackage pointer, see Co-creating a Package Class Instance and Creating Packages.

// If you have modified the announcement, the old
// trigger and package connections are cut
pIAnnouncement->ConfigureTriggerTransmission(...);
 
// Okay to send announcement now
pISend->SendAnnouncement();
 
// Establish new connections for the package and
// trigger streams
pISend->Connect();
 
// A package must be sent far enough in advance so that
// the client has time to unzip it before it
// receives any triggers for the files inside the package
 
pISend->SendPackage(pIPackage);
 
//...wait until it's time to send a trigger
 
// Triggers are sent at specific times to immediately "trigger"
// enhancements on the client. How you manage the synchronizing
// of triggers with the video feed is up to you.
pISend->SendTrigger(...);

Note  In the ATVEF specification, announcements are sent on a well-known IP address (224.0.1.113) and port (2670). This IP address and port have been registered with the IANA.