media

package
v0.0.0-...-7e6c5de Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	H264 = "h264"
	VP8  = "vp8"
	VP9  = "vp9"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

type ConfigOption

type ConfigOption func(*Config) error

func ClockRate

func ClockRate(r uint32) ConfigOption

func Codec

func Codec(codec string) ConfigOption

func InitialTargetBitrate

func InitialTargetBitrate(r uint) ConfigOption

func MTU

func MTU(mtu uint) ConfigOption

func PayloadType

func PayloadType(pt uint8) ConfigOption

func SSRC

func SSRC(ssrc uint32) ConfigOption

type GstreamerSink

type GstreamerSink struct {
	Config
	io.Writer
	// contains filtered or unexported fields
}

func NewGstreamerSink

func NewGstreamerSink(dst string, opts ...ConfigOption) (*GstreamerSink, error)

func (*GstreamerSink) Play

func (s *GstreamerSink) Play() error

func (*GstreamerSink) Stop

func (s *GstreamerSink) Stop() error

type GstreamerSource

type GstreamerSource struct {
	Config
	// contains filtered or unexported fields
}

func NewGstreamerSource

func NewGstreamerSource(rtpWriter interceptor.RTPWriter, src string, useGstPacketizer bool, opts ...ConfigOption) (*GstreamerSource, error)

func (*GstreamerSource) GetTargetBitsPerSecond

func (s *GstreamerSource) GetTargetBitsPerSecond() uint

func (*GstreamerSource) Play

func (s *GstreamerSource) Play() error

func (*GstreamerSource) SetTargetBitsPerSecond

func (s *GstreamerSource) SetTargetBitsPerSecond(bitrate uint)

func (*GstreamerSource) Stop

func (s *GstreamerSource) Stop() error

type SyncodecSink

type SyncodecSink struct{}

func NewSyncodecSink

func NewSyncodecSink() (*SyncodecSink, error)

func (*SyncodecSink) Play

func (s *SyncodecSink) Play() error

func (*SyncodecSink) Stop

func (s *SyncodecSink) Stop() error

func (*SyncodecSink) Write

func (s *SyncodecSink) Write(b []byte) (int, error)

type SyncodecSource

type SyncodecSource struct {
	Config
	// contains filtered or unexported fields
}

func NewSyncodecSource

func NewSyncodecSource(rtpWriter interceptor.RTPWriter, opts ...ConfigOption) (*SyncodecSource, error)

func (*SyncodecSource) Play

func (s *SyncodecSource) Play() error

func (*SyncodecSource) SetTargetBitsPerSecond

func (s *SyncodecSource) SetTargetBitsPerSecond(r uint)

func (*SyncodecSource) Stop

func (s *SyncodecSource) Stop() error

func (*SyncodecSource) WriteFrame

func (e *SyncodecSource) WriteFrame(frame syncodec.Frame)

Jump to

Keyboard shortcuts

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