signal

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package signal contains helpers to exchange the SDP session description between examples.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(in string, obj interface{})

Decode decodes the input from base64 It can optionally unzip the input after decoding

func Encode

func Encode(obj interface{}) string

Encode encodes the input in base64 It can optionally zip the input before encoding

func HTTPSDPServer

func HTTPSDPServer() chan string

HTTPSDPServer starts a HTTP Server that consumes SDPs

func MustReadStdin

func MustReadStdin() string

MustReadStdin blocks until input is received from stdin

func RandSeq

func RandSeq(n int) string

RandSeq generates a random string to serve as dummy data

It returns a deterministic sequence of values each time a program is run. Use rand.Seed() function in your real applications.

Types

type NAL

type NAL struct {
	PictureOrderCount uint32

	// NAL header
	ForbiddenZeroBit bool
	RefIdc           uint8
	UnitType         NalUnitType

	Data []byte // header byte + rbsp
}

func NewNal

func NewNal(data []byte) *NAL

func (*NAL) ParseHeader

func (h *NAL) ParseHeader()

type NalUnitType

type NalUnitType uint8

NalUnitType is the type of a NAL

const (
	NalUnitTypeUnspecified              NalUnitType = 0  // Unspecified
	NalUnitTypeCodedSliceNonIdr         NalUnitType = 1  // Coded slice of a non-IDR picture
	NalUnitTypeCodedSliceDataPartitionA NalUnitType = 2  // Coded slice data partition A
	NalUnitTypeCodedSliceDataPartitionB NalUnitType = 3  // Coded slice data partition B
	NalUnitTypeCodedSliceDataPartitionC NalUnitType = 4  // Coded slice data partition C
	NalUnitTypeCodedSliceIdr            NalUnitType = 5  // Coded slice of an IDR picture
	NalUnitTypeSEI                      NalUnitType = 6  // Supplemental enhancement information (SEI)
	NalUnitTypeSPS                      NalUnitType = 7  // Sequence parameter set
	NalUnitTypePPS                      NalUnitType = 8  // Picture parameter set
	NalUnitTypeAUD                      NalUnitType = 9  // Access unit delimiter
	NalUnitTypeEndOfSequence            NalUnitType = 10 // End of sequence
	NalUnitTypeEndOfStream              NalUnitType = 11 // End of stream
	NalUnitTypeFiller                   NalUnitType = 12 // Filler data
	NalUnitTypeSpsExt                   NalUnitType = 13 // Sequence parameter set extension
	NalUnitTypeCodedSliceAux            NalUnitType = 19 // Coded slice of an auxiliary coded picture without partitioning

)

Enums for NalUnitTypes

func (*NalUnitType) String

func (n *NalUnitType) String() string

Jump to

Keyboard shortcuts

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