Scheduling functions – Grass Valley K2 TX/MAM Database Protocol Manual v.2.2 User Manual

Page 33

Advertising
background image

TX/MAM Database Protocol Manual - document version: 2.2

– Page 33

11.

Scheduling functions

To manipulate the current schedule, following functions are provided.

11.1 Creating a new main event with import fields and formats

This function creates a new main event at the time indicated by StartTimeDate, with the main
asset AssetId and applying Formats. If Duration is other than -1, this duration is used as the
duration of the resulting main event. Otherwise the use_duration of the asset is applied.
The resulting main event is added to the playlist using OptOut. All asset information is taken from
the asset database at AssetAddress / AssetPort.

No precautions are taken with regards to any items present at the same StartTimeDate. The
caller is responsible for schedule under runs and over runs.

long long

cob_create_main_event_dyn_format( long long AssetId, long long StartTimeDate, int Duration,

long long ChannelId, int OptOut, int MainEventType,

long long BlockId, char *PlayoutAddress, int PlayoutPort,

char *AssetAddress, int AssetPort, char *ImportFields,

char *Formats, char *MainEventName, long long iLockID,

char *TcIn, char *TcOut );



Parameters

Name

Description

long long AssetId

The main asset id, e.g. 302.

long long StartTimeDate

The starttime of the main_event as Cobalt time field.

int Duration

The duration in milliseconds (-1 if the asset duration can be used).

long long ChannelId

Asset ID of the Channel Asset specifying the actual playout server
to schedule to.

int OptOut

The optout to use (reserved for future use), e.g. 0.

MainEventType

0=Follow, 1=Manual, 2=Fixed.

BlockId

ID of the scheduled block. If a new Block is started (i.e. event type
has fixed starttime) this can be -1 to create a new block.

char* PlayoutAddress

The ip-address of the playout machine.

int PlayoutPort

The ip-port of the playout machine.

char *AssetAddress

The virtual ip-address of the TX/MAM database, e.g.
"192.168.7.210".

int AssetPort

The port of the TX/MAM database, e.g. 5020.

char* ImportFields

XML-structure with Import fields e.g.
<XML>
<FIELD name="ranking">nr 5</FIELD>
<FIELD name="rating">PG</FIELD>
</XML>

Advertising