internal

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PacketSize = 188
	PtsWrap    = 1 << 33
	PcrWrap    = PtsWrap * 300
	TimeScale  = 90000
)

Variables

This section is empty.

Functions

func AddPTS added in v0.1.1

func AddPTS(p1, p2 int64) int64

func CalculateSteps added in v0.1.1

func CalculateSteps(timestamps []int64) []int64

func Execute added in v0.1.1

func Execute(w io.Writer, o Options, inFile string, function RunableFunc) error

func GetVersion

func GetVersion() string

GetVersion - get version and also commitHash and commitDate if inserted via Makefile

func SignedPTSDiff added in v0.1.1

func SignedPTSDiff(p2, p1 int64) int64

func ToSdtInfo added in v0.1.1

func ToSdtInfo(sdt *astits.SDTData) sdtInfo

func UnsignedPTSDiff added in v0.1.1

func UnsignedPTSDiff(p2, p1 int64) int64

Types

type ElementaryStreamInfo added in v0.1.1

type ElementaryStreamInfo struct {
	PID   uint16 `json:"pid"`
	Codec string `json:"codec"`
	Type  string `json:"type"`
}

type JsonPrinter added in v0.1.1

type JsonPrinter struct {
	W        io.Writer
	Indent   bool
	AccError error
}

func (*JsonPrinter) Error added in v0.1.1

func (p *JsonPrinter) Error() error

func (*JsonPrinter) Print added in v0.1.1

func (p *JsonPrinter) Print(data any, show bool)

func (*JsonPrinter) PrintPS added in v0.1.1

func (jp *JsonPrinter) PrintPS(pid uint16, psKind string, nr uint32, ps []byte, details any, verbose bool, show bool)

func (*JsonPrinter) PrintSdtInfo added in v0.1.1

func (p *JsonPrinter) PrintSdtInfo(sdt *astits.SDTData, show bool)

func (*JsonPrinter) PrintStatistics added in v0.1.1

func (p *JsonPrinter) PrintStatistics(s StreamStatistics, show bool)

type NaluData added in v0.1.1

type NaluData struct {
	Type string `json:"type"`
	Len  int    `json:"len"`
	Data string `json:"data,omitempty"`
}

type NaluFrameData added in v0.1.1

type NaluFrameData struct {
	PID   uint16     `json:"pid"`
	RAI   bool       `json:"rai"`
	PTS   int64      `json:"pts"`
	DTS   int64      `json:"dts,omitempty"`
	NALUS []NaluData `json:"nalus,omitempty"`
}

type OptionParseFunc added in v0.1.1

type OptionParseFunc func() Options

type Options added in v0.1.1

type Options struct {
	MaxNrPictures  int
	Version        bool
	Indent         bool
	ShowStreamInfo bool
	ShowService    bool
	ShowPS         bool
	VerbosePSInfo  bool
	ShowNALU       bool
	ShowSEI        bool
	ShowStatistics bool
}

func CreateFullOptions added in v0.1.1

func CreateFullOptions(max int) Options

func ParseParams added in v0.1.1

func ParseParams(function OptionParseFunc) (o Options, inFile string)

type PsInfo added in v0.1.1

type PsInfo struct {
	PID          uint16 `json:"pid"`
	ParameterSet string `json:"parameterSet"`
	Nr           uint32 `json:"nr"`
	Hex          string `json:"hex"`
	Length       int    `json:"length"`
	Details      any    `json:"details,omitempty"`
}

type RunableFunc added in v0.1.1

type RunableFunc func(ctx context.Context, w io.Writer, f io.Reader, o Options) error

type StreamStatistics added in v0.1.1

type StreamStatistics struct {
	Type       string  `json:"streamType"`
	Pid        uint16  `json:"pid"`
	FrameRate  float64 `json:"frameRate"`
	TimeStamps []int64 `json:"-"`
	MaxStep    int64   `json:"maxStep,omitempty"`
	MinStep    int64   `json:"minStep,omitempty"`
	AvgStep    int64   `json:"avgStep,omitempty"`
	// RAI-markers
	RAIPTS         []int64 `json:"-"`
	IDRPTS         []int64 `json:"-"`
	RAIGOPDuration int64   `json:"RAIGoPDuration,omitempty"`
	IDRGOPDuration int64   `json:"IDRGoPDuration,omitempty"`
	// Errors
	Errors []string `json:"errors,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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