package tv.anypoint.proxy.model.agent data class Cue( var id: Long = 0, var ppId: Int = 0, /** 큐 시작 시각 (ms) */ var time: Long = 0, /** 큐 길이 (ms) */ var duration: Int = 0, var type: CueType = CueType.NORMAL, var placementId: Int = 0, var startPts: Long = 0, var multicastUri: String = "", var isPushCue: Boolean = false, var owner: CueOwner = CueOwner.OTT ) { /** 큐 종료 시각 (ms) = [time] + [duration] */ val endTime: Long get() = time + duration } enum class CueType(val v: Byte) { INVALID_CUE_TYPE(Byte.MIN_VALUE), NORMAL(0), CANCEL(1), REPLACE(2) ; companion object { operator fun get(v: Byte): CueType { return values().find { it.v == v } ?: INVALID_CUE_TYPE } } }