gstnet

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: LGPL-2.1 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const NTPTimeToUnixEpoch = gst.ClockTime(2208988800 * time.Second)

NTP timestamps are relative to 1. Jan 1900, so we need an offset for 70 Years to be Unix TS compatible

Variables

This section is empty.

Functions

This section is empty.

Types

type NTPClock

type NTPClock struct{ *gst.Clock }

NTPClock wraps GstClock

func ObtainNTPClock

func ObtainNTPClock(ctx context.Context, name, address string, port int) (*NTPClock, error)

ObtainNTPClock returns the default NTPClock.

func (*NTPClock) GetTime

func (ntp *NTPClock) GetTime() time.Time

get the current time of the clock

if you want to access the clocks actual time value, use the underlying NTPClock.Clock.GetTime() instead

type NTPClockTime

type NTPClockTime gst.ClockTime

func NewNTPClockTime

func NewNTPClockTime(t time.Time) NTPClockTime

func (NTPClockTime) ToDate

func (ct NTPClockTime) ToDate() time.Time

type NetAddressMeta

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

NetAddressMeta can be used to store a network address in a GstBuffer so that it network elements can track the to and from address of the buffer.

func AddNetAddressMeta

func AddNetAddressMeta(buffer *gst.Buffer, address string, port int) *NetAddressMeta

AddNetAddressMeta attaches the given address to a NetAddressMeta on the buffer.

func GetNetAddressMeta

func GetNetAddressMeta(buffer *gst.Buffer) *NetAddressMeta

GetNetAddressMeta retrieves the NetAddressMeta from the given buffer.

func (*NetAddressMeta) Addr

func (n *NetAddressMeta) Addr() string

Addr returns the address included in the meta.

func (*NetAddressMeta) Meta

func (n *NetAddressMeta) Meta() *gst.Meta

Meta returns the underlying gst.Meta instance.

func (*NetAddressMeta) Port

func (n *NetAddressMeta) Port() int

Port returns the port included in the meta.

Jump to

Keyboard shortcuts

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