segment

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompositionState

type CompositionState uint8
const (
	CompositionStateNormal CompositionState = iota
	CompositionStateAcquisitionState
	CompositionStateEpochStart
)

type LastInSequenceFlag

type LastInSequenceFlag uint8
const (
	LastInSequenceFlagLastInSequence LastInSequenceFlag = iota
	LastInSequenceFlagFirstInSequence
	LastInSequenceFlagFirstAndLastInSequence
)

type ObjectDefinitionSegment

type ObjectDefinitionSegment struct {
	ObjectId            int
	ObjectVersionNumber int
	LastInSequenceFlag  LastInSequenceFlag
	ObjectDataLength    int
	Width               *int
	Height              *int
	ObjectData          buffer.BufferAdapter

	Segment
}

type PaletteDefinitionSegment

type PaletteDefinitionSegment struct {
	PaletteId            int
	PaletteVersionNumber int
	PaletteEntries       []PaletteEntry

	Segment
}

type PaletteEntry

type PaletteEntry struct {
	PaletteEntryId      int
	Luminance           int
	ColorDifferenceRed  int
	ColorDifferenceBlue int
	Transparency        int
}

type PresentationCompositionSegment

type PresentationCompositionSegment struct {
	Width                            int
	Height                           int
	CompositionNumber                int
	CompositionState                 CompositionState
	PaletteUpdateFlag                bool
	PaletteId                        int
	CompositionObjectCount           int
	ObjectId                         int
	WindowId                         int
	ObjectCroppedFlag                bool
	ObjectHorizontalPosition         int
	ObjectVerticalPosition           int
	ObjectCroppingHorizontalPosition int
	ObjectCroppingVerticalPosition   int
	ObjectCroppingWidth              int
	ObjectCroppingHeight             int

	Segment
}

type Segment

type Segment struct {
	Header SegmentHeader
}

type SegmentHeader

type SegmentHeader struct {
	PresentationTimestamp int
	DecodingTimestamp     int
	SegmentType           SegmentType
	SegmentSize           int
	StartTime             time.Duration
}

type SegmentMapper

type SegmentMapper interface {
	ToSegmentType(b byte) (SegmentType, error)

	ToCompositionState(b byte) (CompositionState, error)

	ToPaletteUpdateFlag(b byte) (bool, error)

	ToObjectCroppedFlag(b byte) (bool, error)

	ToLastInSequenceFlag(b byte) (LastInSequenceFlag, error)
}

func NewSegmentMapper

func NewSegmentMapper() SegmentMapper

type SegmentType

type SegmentType uint8
const (
	SegmentTypePds SegmentType = iota
	SegmentTypeOds
	SegmentTypePcs
	SegmentTypeWds
	SegmentTypeEnd
)

type WindowDefinition

type WindowDefinition struct {
	WindowId                 int
	WindowHorizontalPosition int
	WindowVerticalPosition   int
	WindowWidth              int
	WindowHeight             int
}

type WindowDefinitionSegment

type WindowDefinitionSegment struct {
	WindowCount       int
	WindowDefinitions []WindowDefinition

	Segment
}

Jump to

Keyboard shortcuts

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