scte35

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package scte35 implements parts of SCTE-35 according to SCTE-214-1 from 2022.

Index

Constants

View Source
const (
	SchemeIDURI = "urn:scte:scte35:2013:bin"
)

Variables

This section is empty.

Functions

func CreateEmsgAhead

func CreateEmsgAhead(segStart, segEnd, timescale uint64, perMinute int) (*mp4.EmsgBox, error)

CreateEmsgAhead generates an emsg SCTE-35 box if the the segment covers the time 7s before the ad start. Depending on perMinute parameter, the splice inserts are as follows:: 1: 10s after full minute (20s duration) 2: 10s and 40s after full minute (10 duration) 3: 10s, 36s, 46s after full minute (10s duration)

func CreateSpliceInsertPayload

func CreateSpliceInsertPayload(p SpliceInsertParams) []byte

CreateSpliceInsertPayload creates a SCTE-35 splice_info_section including CRC.

func IsValidSCTE35Interval

func IsValidSCTE35Interval(adsPerMinute int) error

Returns if requested adsPerMinute value is valid (1, 2, or 3)

Types

type SpliceInsertParams

type SpliceInsertParams struct {
	PtsTime                    uint64
	Duration                   uint64
	SpliceEventID              uint32
	Tier                       uint16
	UniqueProgramID            uint16
	AvailNum                   uint8
	AvailsExpected             uint8
	SpliceEventCancelIndicator bool
	OutOfNetworkIndicator      bool
	SpliceImmediateFlag        bool
	AutoReturn                 bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL