rtptime

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 3 Imported by: 0

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

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

Encoder is a RTP timestamp encoder.

func NewEncoder

func NewEncoder(clockRate int, initialTimestamp uint32) *Encoder

NewEncoder allocates an Encoder.

func (*Encoder) Encode

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

Encode encodes a timestamp.

type GlobalDecoder

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

GlobalDecoder is a RTP timestamp decoder.

func NewGlobalDecoder

func NewGlobalDecoder() *GlobalDecoder

NewGlobalDecoder allocates a GlobalDecoder.

func (*GlobalDecoder) Decode

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

Decode decodes a timestamp.

type GlobalDecoderTrack

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

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

Jump to

Keyboard shortcuts

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