codecs

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const AMR_NB_MAGIC string = "#!AMR\n"
View Source
const AMR_NB_SAMPLE_RATE = 8000
View Source
const AMR_WB_MAGIC string = "#!AMR-WB\n"
View Source
const AMR_WB_SAMPLE_RATE = 16000

Variables

View Source
var AMR_NB_FRAME_SIZE []int = []int{12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0}
View Source
var AMR_WB_FRAME_SIZE []int = []int{17, 23, 32, 36, 40, 46, 50, 58, 60, 5, 5, 0, 0, 0, 0, 0}
View Source
var AmrMetadata = CodecMetadata{
	Name:     "amr",
	LongName: "Adaptative Multi Rate",
	Options: []CodecOption{
		amrSampleRateOption,
		amrOctetAlignedOption,
	},
	Init: NewAmr,
}
View Source
var H264Metadata = CodecMetadata{
	Name:     "h264",
	LongName: "H.264",
	Options: []CodecOption{
		h264PacketizationModeOption,
	},
	Init: NewH264,
}
View Source
var INTERLEAVED_MODE = 2
View Source
var NON_INTERLEAVED_MODE = 1
View Source
var SINGLE_NAL_MODE = 0

Functions

This section is empty.

Types

type Amr

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

func (Amr) GetFormatMagic

func (amr Amr) GetFormatMagic() []byte

func (*Amr) HandleRtpPacket

func (amr *Amr) HandleRtpPacket(packet *rtp.RtpPacket) (result []byte, err error)

func (*Amr) Init

func (amr *Amr) Init()

func (*Amr) SetOptions

func (amr *Amr) SetOptions(options map[string]string) error

type Codec

type Codec interface {
	Init()
	SetOptions(options map[string]string) error
	HandleRtpPacket(packet *rtp.RtpPacket) ([]byte, error)
	GetFormatMagic() []byte
}

func NewAmr

func NewAmr() Codec

func NewH264 added in v0.6.0

func NewH264() Codec

type CodecMetadata

type CodecMetadata struct {
	Name     string
	LongName string
	Options  []CodecOption
	Init     func() Codec
}

func (CodecMetadata) Describe

func (m CodecMetadata) Describe() string

type CodecOption

type CodecOption struct {
	Required         bool
	Name             string
	Description      string
	ValidValues      []string
	ValueDescription []string
	RestrictValues   bool
}

type H264 added in v0.6.0

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

func (H264) GetFormatMagic added in v0.6.0

func (c H264) GetFormatMagic() []byte

func (*H264) HandleRtpPacket added in v0.6.0

func (c *H264) HandleRtpPacket(packet *rtp.RtpPacket) (result []byte, err error)

func (*H264) Init added in v0.6.0

func (c *H264) Init()

func (*H264) SetOptions added in v0.6.0

func (c *H264) SetOptions(options map[string]string) error

Jump to

Keyboard shortcuts

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