ebp

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package ebp is used to detect and extract EBP information. EBP information is stored in a packet adaptation field in the private data section.

Index

Constants

View Source
const (
	ComcastEbpTag             = uint8(0xA9)
	CableLabsEbpTag           = uint8(0xDF)
	CableLabsFormatIdentifier = 0x45425030
)

EBP tags

View Source
const (
	InvalidStreamSyncSignal = uint8(0xFF)
	StreamNotSynchronized   = uint8(0x1C)
	StreamSynchronized      = uint8(0x1D)
)

Stream Sync constants

Variables

This section is empty.

Functions

func CreateCableLabsEbp

func CreateCableLabsEbp() cableLabsEbp

CreateCableLabsEbp returns a new cableLabsEbp with default values.

func CreateComcastEBP

func CreateComcastEBP() comcastEbp

CreateComcastEBP returns a new comcastEbp with default values.

Types

type EncoderBoundaryPoint

type EncoderBoundaryPoint interface {
	// SegmentFlag returns true if the segment flag is set.
	SegmentFlag() bool
	// SetSegmentFlag sets the segment flag.
	SetSegmentFlag(bool)
	// FragmentFlag returns true if the fragment flag is set.
	FragmentFlag() bool
	// SetFragmentFlag sets the fragment flag.
	SetFragmentFlag(bool)
	// TimeFlag returns true if the time flag is set.
	TimeFlag() bool
	// SetTimeFlag sets the time flag
	SetTimeFlag(bool)
	// GroupingFlag returns true if the grouping flag is set.
	GroupingFlag() bool
	// SetGroupingFlag sets the grouping flag.
	SetGroupingFlag(bool)
	// EBPTime returns the EBP time as a UTC time.
	EBPTime() time.Time
	// SetEBPTime sets the time of the EBP. Takes UTC time as an input.
	SetEBPTime(time.Time)
	// EBPSuccessReadTime defines when the EBP was read successfully.
	EBPSuccessReadTime() time.Time
	// SapFlag returns true if the sap flag is set.
	SapFlag() bool
	// SetSapFlag sets the sap flag.
	SetSapFlag(bool)
	// Sap returns the sap of the EBP.
	Sap() byte
	// SetSap sets the sap of the EBP.
	SetSap(byte)
	// ExtensionFlag returns true if the extension flag is set.
	ExtensionFlag() bool
	// SetExtensionFlag sets the extension flag.
	SetExtensionFlag(bool)
	// EBPtype returns the type (what is the format) of the EBP.
	EBPType() byte
	// IsEmpty returns if the EBP is empty (zero length)
	IsEmpty() bool
	// SetIsEmpty sets if the EBP is empty (zero length)
	SetIsEmpty(bool)
	// StreamSyncSignal returns Stream Sync byte
	StreamSyncSignal() uint8
	// Data will return the raw bytes of the EBP
	Data() []byte
}

EncoderBoundaryPoint represents shared operations available on an all EBPs.

func ReadEncoderBoundaryPoint

func ReadEncoderBoundaryPoint(data []byte) (ebp EncoderBoundaryPoint, err error)

ReadEncoderBoundaryPoint parses and creates an EncoderBoundaryPoint from the given reader. If the bytes do not conform to a know EBP type, an error is returned.

Jump to

Keyboard shortcuts

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