mpegts

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Frame

type Frame struct {
	Pid      int
	StreamID int
	Dts      int64
	Pts      int64
	Header   []byte // 1. AAC-ADTS Header; 2. aud nal [+sps nal+pps nal]+sample nal start code
	Payload  []byte // data without startcode
	// contains filtered or unexported fields
}

Frame mpegts frame

func (*Frame) IsAudio

func (frame *Frame) IsAudio() bool

IsAudio .

func (*Frame) IsKeyFrame

func (frame *Frame) IsKeyFrame() bool

IsKeyFrame 判断是否是 video key frame

func (*Frame) IsVideo

func (frame *Frame) IsVideo() bool

IsVideo .

type FrameWriter

type FrameWriter interface {
	WriteMpegtsFrame(frame *Frame) error
}

FrameWriter 包装 WriteMpegtsFrame 方法的接口

type MuxerAvcAac

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

MuxerAvcAac flv muxer from av.Frame(H264[+AAC])

func NewMuxerAvcAac

func NewMuxerAvcAac(videoMeta codec.VideoMeta, audioMeta codec.AudioMeta, tsframeWriter FrameWriter, logger *xlog.Logger) (*MuxerAvcAac, error)

NewMuxerAvcAac .

func (*MuxerAvcAac) Close

func (muxer *MuxerAvcAac) Close() error

Close .

func (*MuxerAvcAac) WriteFrame

func (muxer *MuxerAvcAac) WriteFrame(frame *codec.Frame) error

WriteFrame .

type Writer

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

Writer flv Writer

func NewWriter

func NewWriter(w io.Writer) (*Writer, error)

NewWriter .

func (*Writer) WriteMpegtsFrame

func (w *Writer) WriteMpegtsFrame(frame *Frame) (err error)

WriteMpegtsFrame write mpegts frame

Jump to

Keyboard shortcuts

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