ravenna_stream_device

package
v0.0.0-...-4345893 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StreamCodecAM824 = 0
	StreamCodecL32   = 1
	StreamCodecL24   = 2
	StreamCodecL16   = 3
)
View Source
const (
	MaxEthernetPacketSize = 1460
	MaxChannels           = 256
	TrackNull             = int16(-1)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec uint8

func (Codec) String

func (c Codec) String() string

type Device

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

func Open

func Open(path string) (*Device, error)

func (*Device) AddRxStream

func (d *Device) AddRxStream(sd RxStreamDescription) (*RxStream, error)

func (*Device) AddTxStream

func (d *Device) AddTxStream(sd TxStreamDescription) (*TxStream, error)

func (*Device) Info

func (d *Device) Info() DeviceInfo

type DeviceInfo

type DeviceInfo struct {
	MaxTracks    int
	MaxRxStreams int
	MaxTxStreams int
}

type RxRTCPData

type RxRTCPData struct {
	RtpTimestamp     uint32
	DevState         uint8
	RtpPayloadId     uint8
	OffsetEstimation uint16
	PathDifferential int32

	Primary, Secondary RxRTCPInterfaceData
}

type RxRTCPInterfaceData

type RxRTCPInterfaceData struct {
	MisorderedPackets       uint16
	BaseSequenceNr          uint16
	ExtendedMaxSequenceNr   uint32
	ReceivedPackets         uint32
	PeakJitter              uint16
	EstimatedJitter         uint16
	LastTransitTime         uint16
	CurrentOffsetEstimation uint16
	LastSsrc                uint32
	BufferMarginMin         uint16
	BufferMarginMax         uint16
	LatePackets             uint16
	EarlyPackets            uint16
	TimeoutCounter          uint16

	Error   bool
	Playing bool
}

type RxStream

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

func (*RxStream) Close

func (rx *RxStream) Close() error

func (*RxStream) ReadRTCP

func (rx *RxStream) ReadRTCP(timeout time.Duration) (RxRTCPData, error)

func (*RxStream) Update

func (rx *RxStream) Update(sd RxStreamDescription) error

type RxStreamDescription

type RxStreamDescription struct {
	PrimaryDestination, SecondaryDestination net.UDPAddr

	Active            bool
	SyncSource        bool
	VlanTagged        bool
	HitlessProtection bool
	Synchronous       bool
	RtpFilter         bool

	CodecType      Codec
	RtpPayloadType uint8

	VlanTag            uint16
	JitterBufferMargin uint16

	RtpOffset uint32
	RtpSsrc   uint32

	NumChannels uint16

	// Tracks is a map of channel index to track index.
	// The maximum number of tracks is reported in the device's Info struct.
	Tracks [MaxChannels]int16
}

type TxRTCPData

type TxRTCPData struct {
	RtpTimestamp uint32

	Primary, Secondary TxRTCPInterfaceData
}

type TxRTCPInterfaceData

type TxRTCPInterfaceData struct {
	SentPackets  uint32
	SentRTPBytes uint32
}

type TxStream

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

func (*TxStream) Close

func (tx *TxStream) Close() error

func (*TxStream) ReadRTCP

func (tx *TxStream) ReadRTCP(timeout time.Duration) (TxRTCPData, error)

func (*TxStream) Update

func (tx *TxStream) Update(sd TxStreamDescription) error

type TxStreamDescription

type TxStreamDescription struct {
	Primary, Secondary TxStreamDescriptionNetworkInterface

	Active       bool
	Multicast    bool
	VlanTagged   bool
	UsePrimary   bool
	UseSecondary bool

	CodecType  Codec
	NumSamples uint8

	RtpPayloadType     uint8
	NextRtpTxTime      uint8
	NextRtpSequenceNum uint16

	Ttl     uint8
	DscpTos uint8

	RtpOffset uint32
	RtpSsrc   uint32

	NumChannels uint16

	// Tracks is a map of channel index to track index.
	// The maximum number of tracks is defined in the device's Info struct.
	Tracks [MaxChannels]int16
}

type TxStreamDescriptionNetworkInterface

type TxStreamDescriptionNetworkInterface struct {
	Destination, Source net.UDPAddr
	VlanTag             uint16
	DestinationMAC      net.HardwareAddr
}

Jump to

Keyboard shortcuts

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