Skip to content

Commit

Permalink
refactor: Sofie server related DVE content is renamed to SplitScreen.
Browse files Browse the repository at this point in the history
  • Loading branch information
KvelaGorrrrnio committed Nov 9, 2023
1 parent ad55d0b commit 89e520e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
22 changes: 15 additions & 7 deletions src/tv2-common/content/dve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ export interface DVEPieceMetaData extends PieceMetaData {
userData: ActionSelectDVE
mediaPlayerSessions?: string[] // TODO: Should probably move to a ServerPieceMetaData
serverPlaybackTiming?: Array<{ start?: number; end?: number }>
dve?: DvePieceActionMetadata
splitScreen?: SplitScreenPieceActionMetadata
}

// This is used by the "new" Blueprint in order to put sources into a planned DVE.
export interface DvePieceActionMetadata {
// This is used by the "new" Blueprint in order to put sources into a planned split screen.
export interface SplitScreenPieceActionMetadata {
boxes: BoxConfig[]
audioTimelineObjectsForBoxes: { [inputIndex: number]: TSR.TSRTimelineObj[] }
}
Expand All @@ -132,7 +132,11 @@ export function MakeContentDVEBase<
parsedCue: CueDefinitionDVE,
dveConfig: DVEConfigInput | undefined,
dveGeneratorOptions: DVEOptions
): { content: WithTimeline<SplitsContent>; valid: boolean; dvePieceActionMetadata?: DvePieceActionMetadata } {
): {
content: WithTimeline<SplitsContent>
valid: boolean
splitScreenPieceActionMetadata?: SplitScreenPieceActionMetadata
} {
if (!dveConfig) {
context.core.notifyUserWarning(`DVE ${parsedCue.template} is not configured`)
return {
Expand Down Expand Up @@ -169,7 +173,11 @@ export function MakeContentDVE2<
sources: DVESources | undefined,
dveGeneratorOptions: DVEOptions,
mediaPlayerSessionId?: string
): { content: WithTimeline<SplitsContent>; valid: boolean; dvePieceActionMetadata?: DvePieceActionMetadata } {
): {
content: WithTimeline<SplitsContent>
valid: boolean
splitScreenPieceActionMetadata?: SplitScreenPieceActionMetadata
} {
let template: DVEConfig
try {
template = JSON.parse(dveConfig.DVEJSON) as DVEConfig
Expand Down Expand Up @@ -304,7 +312,7 @@ export function MakeContentDVE2<
}
})

const dvePieceActionMetadata: DvePieceActionMetadata = {
const splitScreenPieceActionMetadata: SplitScreenPieceActionMetadata = {
boxes,
audioTimelineObjectsForBoxes
}
Expand All @@ -329,7 +337,7 @@ export function MakeContentDVE2<
}

return {
dvePieceActionMetadata,
splitScreenPieceActionMetadata,
valid,
content: literal<WithTimeline<SplitsContent>>({
boxSourceConfiguration: boxSources,
Expand Down
12 changes: 8 additions & 4 deletions src/tv2_afvd_showstyle/helpers/content/dve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import {
CueDefinitionDVE,
DVEConfigInput,
DVEOptions,
DvePieceActionMetadata,
MakeContentDVEBase,
PartDefinition,
ShowStyleContext
ShowStyleContext,
SplitScreenPieceActionMetadata
} from 'tv2-common'
import { GalleryBlueprintConfig } from '../../../tv2_afvd_showstyle/helpers/config'
import { CasparLLayer, SisyfosLLAyer } from '../../../tv2_afvd_studio/layers'
import { GalleryBlueprintConfig } from '../config'

export const NUMBER_OF_DVE_BOXES = 4

Expand All @@ -34,6 +34,10 @@ export function MakeContentDVE(
partDefinition: PartDefinition,
parsedCue: CueDefinitionDVE,
dveConfig: DVEConfigInput | undefined
): { content: WithTimeline<SplitsContent>; valid: boolean; dvePieceActionMetadata?: DvePieceActionMetadata } {
): {
content: WithTimeline<SplitsContent>
valid: boolean
splitScreenPieceActionMetadata?: SplitScreenPieceActionMetadata
} {
return MakeContentDVEBase(context, partDefinition, parsedCue, dveConfig, AFVD_DVE_GENERATOR_OPTIONS)
}
2 changes: 1 addition & 1 deletion src/tv2_afvd_showstyle/helpers/pieces/dve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function EvaluateDVE(
content: content.content,
prerollDuration: Number(context.config.studio.CasparPrerollDuration) || 0,
metaData: {
dve: content.dvePieceActionMetadata,
splitScreen: content.splitScreenPieceActionMetadata,
type: Tv2PieceType.SPLIT_SCREEN,
outputLayer: Tv2OutputLayer.PROGRAM,
mediaPlayerSessions: [partDefinition.segmentExternalId],
Expand Down

0 comments on commit 89e520e

Please sign in to comment.