MHEG-5 provides suitable abstractions for managing active, autonomous, and reusable entities (since it adopts an object-oriented approach).
A class is specified by three kinds of properties:
The most significant classes of MHEG-5 are now breifly described:
The Launch action activates an Application after quitting the active Application. The Quit action ends the active Application, which also terminates the active Scene's presentation. The Ingredients of an Application are available to the different Scenes that become active, thereby allowing an uninterrupted presentation of contents (for example, a bitmap can serve as the common background for all Scenes in an Application).
The OriginalContent attribute maps object and content data. It contains either included content or a reference to an external data source (such as a URL or a DSMCC file name). The ContentHook attribute specifies the encoding format for the content. However, MHEG-5 does not list the supported encoding formats. See coding examples below for the use of content references and hooks.
The action Preload gives hints to the RTE for making the content available for presentation. Especially for streams, this action does not completely download the content, it just sets up the proper network connection to the site where the content is stored. The action Unload frees allocated resources for the content.
The Presentable, Stream, and Link classes are subclasses of the Ingredient class.
The OriginalBoxSize and OriginalPosition attributes respectively specify the size and position of the object's bounding box relative to the Scene's presentation space. The actions SetSize and SetPosition change the current values of these attributes.
The specialized objects in the Visible class include:
Example, to create a simple bitmap object:
(bitmap: BgndInfo content-hook: #bitmapHook content-data: referenced-content: "Info.bitmap" box-size: ( 320 240 ) original-position: ( 0 0 ) )
When a Stream object is running, its streams can be switched on and off independently. This lets users switch between different audio trails (different languages) or choose which video stream(s) to present among a range of available ones. For example, the Turin code example below contains an MPEG-1 Stream composed of one audio and one video component. These components automatically activate when a run action targets the whole Stream because their InitiallyActive attribute is set to true.
Specific events are associated with playback: StreamPlaying/StreamStopped notifies the actual initiation/termination and CounterTrigger notifies the system when a previously booked time-code event occurs. The Turin code example below shows how the CounterTrigger event can be used to synchronize text subtitling and also illustrates the SetCounterPosition and SetCounterEndPosition actions to specify a temporal segment for presentation.
MHEG-5 Action objects consist of a sequence of elementary actions. Elementary actions are comparable to methods in an object-oriented paradigm. The execution of an Action object means that each of its elementary actions are invoked sequentially.
As an example, consider the following Link, which transitions to another Scene when the character A is entered in the EntryField EF1.
Example, to create a simple link:
(link: Link1 event-source: EF1 event-type: #NewChar event-data: 'A' link-effect: (action: transition-to: Scene2) )
In the Turin code example below, Link 49 triggers only if a CounterTrigger event on the video clip occurs with EventData = 3.
Specifically, this lets you associate a different effect with every booked value of the CounterPosition. The LinkEffect comprises a set of actions that are executed in sequence when an event that matches with the LinkCondition occurs. Every action specifies the target object and, possibly, other parameters depending on the type of action. MHEG-5 specifies more than 100 kinds of actions.
(switchbutton: Switch1 style: #radiobutton position: ( 50 70 ) label: "On" )
Example, to create a simple slider:
(slider: Slider1 box-size: ( 40 5 ) original-position: ( 100 100 ) max-value: 20 orientation: #right )