rtptime

package
v4.16.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package rtptime contains a time decoder and encoder.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder deprecated

type Encoder struct {
	// Clock rate.
	ClockRate int

	// (optional) initial timestamp.
	// It defaults to a random value.
	InitialTimestamp *uint32
	// contains filtered or unexported fields
}

Encoder is a RTP timestamp encoder.

Deprecated: not used anymore.

func (*Encoder) Encode

func (e *Encoder) Encode(ts time.Duration) uint32

Encode encodes a timestamp.

func (*Encoder) Initialize

func (e *Encoder) Initialize() error

Initialize initializes an Encoder.

type GlobalDecoder deprecated

type GlobalDecoder struct {
	// contains filtered or unexported fields
}

GlobalDecoder is a RTP timestamp decoder.

Deprecated: replaced by GlobalDecoder2.

func NewGlobalDecoder deprecated

func NewGlobalDecoder() *GlobalDecoder

NewGlobalDecoder allocates a GlobalDecoder.

Deprecated: replaced by NewGlobalDecoder2.

func (*GlobalDecoder) Decode

func (d *GlobalDecoder) Decode(
	track GlobalDecoderTrack,
	pkt *rtp.Packet,
) (time.Duration, bool)

Decode decodes a timestamp.

type GlobalDecoder2

type GlobalDecoder2 struct {
	// contains filtered or unexported fields
}

GlobalDecoder2 is a RTP timestamp decoder.

func NewGlobalDecoder2 deprecated

func NewGlobalDecoder2() *GlobalDecoder2

NewGlobalDecoder2 allocates a GlobalDecoder.

Deprecated: replaced by GlobalDecoder2.Initialize().

func (*GlobalDecoder2) Decode

func (d *GlobalDecoder2) Decode(
	track GlobalDecoder2Track,
	pkt *rtp.Packet,
) (int64, bool)

Decode decodes a timestamp.

func (*GlobalDecoder2) Initialize

func (d *GlobalDecoder2) Initialize()

Initialize initializes a GlobalDecoder2.

type GlobalDecoder2Track

type GlobalDecoder2Track interface {
	ClockRate() int
	PTSEqualsDTS(*rtp.Packet) bool
}

GlobalDecoder2Track is a track (RTSP format or WebRTC track) of GlobalDecoder2.

type GlobalDecoderTrack deprecated

type GlobalDecoderTrack interface {
	ClockRate() int
	PTSEqualsDTS(*rtp.Packet) bool
}

GlobalDecoderTrack is a track (RTSP format or WebRTC track) of a GlobalDecoder.

Deprecated: replaced by GlobalDecoderTrack2

Jump to

Keyboard shortcuts

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