|
|
@ -127,7 +127,19 @@ public class YamlPlayoutBuilder( |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int flattenCount = 0; |
|
|
|
|
|
|
|
while (context.Definition.Playout.Any(x => x is YamlPlayoutSequenceInstruction)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (flattenCount > 10) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
logger.LogError( |
|
|
|
|
|
|
|
"YAML playout definition contains sequence nesting that is too deep; this introduces undefined behavior"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FlattenSequences(context); |
|
|
|
FlattenSequences(context); |
|
|
|
|
|
|
|
flattenCount++; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// handle all playout instructions
|
|
|
|
// handle all playout instructions
|
|
|
|
while (context.CurrentTime < finish) |
|
|
|
while (context.CurrentTime < finish) |
|
|
@ -204,10 +216,14 @@ public class YamlPlayoutBuilder( |
|
|
|
.Filter(s => s.Key == sequenceInstruction.Sequence) |
|
|
|
.Filter(s => s.Key == sequenceInstruction.Sequence) |
|
|
|
.HeadOrNone() |
|
|
|
.HeadOrNone() |
|
|
|
.Map(s => s.Items) |
|
|
|
.Map(s => s.Items) |
|
|
|
.Flatten(); |
|
|
|
.Flatten() |
|
|
|
|
|
|
|
.ToList(); |
|
|
|
|
|
|
|
|
|
|
|
var sequenceGuid = Guid.NewGuid(); |
|
|
|
var sequenceGuid = Guid.NewGuid(); |
|
|
|
|
|
|
|
int repeat = sequenceInstruction.Repeat > 0 ? sequenceInstruction.Repeat : 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (var r = 0; r < repeat; r++) |
|
|
|
|
|
|
|
{ |
|
|
|
// insert all instructions from the sequence
|
|
|
|
// insert all instructions from the sequence
|
|
|
|
foreach (YamlPlayoutInstruction i in sequenceInstructions) |
|
|
|
foreach (YamlPlayoutInstruction i in sequenceInstructions) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -223,6 +239,8 @@ public class YamlPlayoutBuilder( |
|
|
|
|
|
|
|
|
|
|
|
context.Definition.Playout.Add(i); |
|
|
|
context.Definition.Playout.Add(i); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
context.Definition.Playout.Add(instruction); |
|
|
|
context.Definition.Playout.Add(instruction); |
|
|
|