headers

package
v0.0.0-...-cd0575f Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package headers contains various RTSP headers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthMethod

type AuthMethod int

AuthMethod is an authentication method.

const (
	// AuthBasic is the Basic authentication method
	AuthBasic AuthMethod = iota

	// AuthDigest is the Digest authentication method
	AuthDigest
)

type Authenticate

type Authenticate struct {
	// authentication method
	Method AuthMethod

	// (optional) username
	Username *string

	// (optional) realm
	Realm *string

	// (optional) nonce
	Nonce *string

	// (optional) uri
	URI *string

	// (optional) response
	Response *string

	// (optional) opaque
	Opaque *string

	// (optional) stale
	Stale *string

	// (optional) algorithm
	Algorithm *string
}

Authenticate is an Authenticate or a WWW-Authenticate header.

func (*Authenticate) Read

func (h *Authenticate) Read(v base.HeaderValue) error

Read decodes an Authenticate or a WWW-Authenticate header.

func (Authenticate) Write

func (h Authenticate) Write() base.HeaderValue

Write encodes an Authenticate or a WWW-Authenticate header.

type Authorization

type Authorization struct {
	// authentication method
	Method AuthMethod

	// basic user
	BasicUser string

	// basic password
	BasicPass string

	// digest values
	DigestValues Authenticate
}

Authorization is an Authorization header.

func (*Authorization) Read

func (h *Authorization) Read(v base.HeaderValue) error

Read decodes an Authorization header.

func (Authorization) Write

func (h Authorization) Write() base.HeaderValue

Write encodes an Authorization header.

type RTPInfo

type RTPInfo []*RTPInfoEntry

RTPInfo is a RTP-Info header.

func (*RTPInfo) Read

func (h *RTPInfo) Read(v base.HeaderValue) error

Read decodes a RTP-Info header.

func (RTPInfo) Write

func (h RTPInfo) Write() base.HeaderValue

Write encodes a RTP-Info header.

type RTPInfoEntry

type RTPInfoEntry struct {
	URL            string
	SequenceNumber *uint16
	Timestamp      *uint32
}

RTPInfoEntry is an entry of a RTP-Info header.

type Range

type Range struct {
	// range expressed in a certain unit.
	Value RangeValue

	// time at which the operation is to be made effective.
	Time *RangeUTCTime
}

Range is a Range header.

func (*Range) Read

func (h *Range) Read(v base.HeaderValue) error

Read decodes a Range header.

func (Range) Write

func (h Range) Write() base.HeaderValue

Write encodes a Range header.

type RangeNPT

type RangeNPT struct {
	Start RangeNPTTime
	End   *RangeNPTTime
}

RangeNPT is a range expressed in NPT unit.

type RangeNPTTime

type RangeNPTTime time.Duration

RangeNPTTime is a time expressed in NPT unit.

type RangeSMPTE

type RangeSMPTE struct {
	Start RangeSMPTETime
	End   *RangeSMPTETime
}

RangeSMPTE is a range expressed in SMPTE unit.

type RangeSMPTETime

type RangeSMPTETime struct {
	Time     time.Duration
	Frame    uint
	Subframe uint
}

RangeSMPTETime is a time expressed in SMPTE unit.

type RangeUTC

type RangeUTC struct {
	Start RangeUTCTime
	End   *RangeUTCTime
}

RangeUTC is a range expressed in UTC unit.

type RangeUTCTime

type RangeUTCTime time.Time

RangeUTCTime is a time expressed in UTC unit.

type RangeValue

type RangeValue interface {
	// contains filtered or unexported methods
}

RangeValue can be - RangeSMPTE - RangeNPT - RangeUTC

type Session

type Session struct {
	// session id
	Session string

	// (optional) a timeout
	Timeout *uint
}

Session is a Session header.

func (*Session) Read

func (h *Session) Read(v base.HeaderValue) error

Read decodes a Session header.

func (Session) Write

func (h Session) Write() base.HeaderValue

Write encodes a Session header.

type Transport

type Transport struct {
	// protocol of the stream
	Protocol TransportProtocol

	// (optional) delivery method of the stream
	Delivery *TransportDelivery

	// (optional) Source IP
	Source *net.IP

	// (optional) destination IP
	Destination *net.IP

	// (optional) interleaved frame ids
	InterleavedIDs *[2]int

	// (optional) TTL
	TTL *uint

	// (optional) ports
	Ports *[2]int

	// (optional) client ports
	ClientPorts *[2]int

	// (optional) server ports
	ServerPorts *[2]int

	// (optional) SSRC of the packets of the stream
	SSRC *uint32

	// (optional) mode
	Mode *TransportMode
}

Transport is a Transport header.

func (*Transport) Read

func (h *Transport) Read(v base.HeaderValue) error

Read decodes a Transport header.

func (Transport) Write

func (h Transport) Write() base.HeaderValue

Write encodes a Transport header

type TransportDelivery

type TransportDelivery int

TransportDelivery is a delivery method.

const (
	TransportDeliveryUnicast TransportDelivery = iota
	TransportDeliveryMulticast
)

standard transport delivery methods.

type TransportMode

type TransportMode int

TransportMode is a transport mode.

const (
	// TransportModePlay is the "play" transport mode
	TransportModePlay TransportMode = iota

	// TransportModeRecord is the "record" transport mode
	TransportModeRecord
)

type TransportProtocol

type TransportProtocol int

TransportProtocol is a transport protocol.

const (
	TransportProtocolUDP TransportProtocol = iota
	TransportProtocolTCP
)

standard transport protocols.

Jump to

Keyboard shortcuts

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