headers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: MIT Imports: 4 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 Auth

type Auth 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
}

Auth is an Authenticate or a WWWW-Authenticate header.

func (*Auth) Read

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

Read decodes an Authenticate or a WWW-Authenticate header.

func (Auth) Write

func (h Auth) Write() base.HeaderValue

Write encodes an Authenticate or a WWW-Authenticate header.

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 RTPInfo

type RTPInfo []*RTPInfoEntry

RTPInfo is a RTP-Info header.

func (RTPInfo) Clone

func (h RTPInfo) Clone() *RTPInfo

Clone clones a RTPInfo.

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            *base.URL
	SequenceNumber uint16
	Timestamp      uint32
}

RTPInfoEntry is an entry of an RTP-Info header.

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 base.StreamProtocol

	// (optional) delivery method of the stream
	Delivery *base.StreamDelivery

	// (optional) destination
	Destination *string

	// (optional) TTL
	TTL *uint

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

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

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

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

	// (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 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
)

func (TransportMode) String

func (tm TransportMode) String() string

String implements fmt.Stringer.

Jump to

Keyboard shortcuts

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