pktque

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package pktque provides packet Filter interface and structures used by other components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AVSync

type AVSync struct {
	MaxTimeDiff time.Duration
	// contains filtered or unexported fields
}

AVSync Drop incorrect packets to make A/V sync.

func (*AVSync) ModifyPacket

func (instance *AVSync) ModifyPacket(pkt *av.Packet, streams []av.CodecData, videoidx int, audioidx int) (drop bool, err error)

ModifyPacket ModifyPacket

type Buf

type Buf struct {
	Head, Tail BufPos

	Size  int
	Count int
	// contains filtered or unexported fields
}

Buf struct

func NewBuf

func NewBuf() *Buf

NewBuf NewBuf

func (*Buf) Get

func (instance *Buf) Get(pos BufPos) av.Packet

Get packet

func (*Buf) IsValidPos

func (instance *Buf) IsValidPos(pos BufPos) bool

IsValidPos IsValidPos

func (*Buf) Pop

func (instance *Buf) Pop() av.Packet

Pop Pop

func (*Buf) Push

func (instance *Buf) Push(pkt av.Packet)

Push func

type BufPos

type BufPos int

BufPos type

func (BufPos) GE

func (instance BufPos) GE(pos BufPos) bool

GE check

func (BufPos) GT

func (instance BufPos) GT(pos BufPos) bool

GT check

func (BufPos) LT

func (instance BufPos) LT(pos BufPos) bool

LT check

type Filter

type Filter interface {
	// Change packet time or drop packet
	ModifyPacket(pkt *av.Packet, streams []av.CodecData, videoidx int, audioidx int) (drop bool, err error)
}

Filter Filter

type FilterDemuxer

type FilterDemuxer struct {
	av.Demuxer
	Filter Filter
	// contains filtered or unexported fields
}

FilterDemuxer Wrap origin Demuxer and Filter into a new Demuxer, when read this Demuxer filters will be called.

func (FilterDemuxer) ReadPacket

func (instance FilterDemuxer) ReadPacket() (pkt av.Packet, err error)

ReadPacket ReadPacket

type Filters

type Filters []Filter

Filters Combine multiple Filters into one, ModifyPacket will be called in order.

func (Filters) ModifyPacket

func (instance Filters) ModifyPacket(pkt *av.Packet, streams []av.CodecData, videoidx int, audioidx int) (drop bool, err error)

ModifyPacket ModifyPacket

type FixTime

type FixTime struct {
	StartFromZero bool // make timestamp start from zero
	MakeIncrement bool // force timestamp increment
	// contains filtered or unexported fields
}

FixTime Fix incorrect packet timestamps.

func (*FixTime) ModifyPacket

func (instance *FixTime) ModifyPacket(pkt *av.Packet, streams []av.CodecData, videoidx int, audioidx int) (drop bool, err error)

ModifyPacket ModifyPacket

type Timeline

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

Timeline struct

func (*Timeline) Pop

func (instance *Timeline) Pop(dur time.Duration) (tm time.Duration)

Pop func

func (*Timeline) Push

func (instance *Timeline) Push(tm time.Duration, dur time.Duration)

Push func

type WaitKeyFrame

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

WaitKeyFrame Drop packets until first video key frame arrived.

func (*WaitKeyFrame) ModifyPacket

func (instance *WaitKeyFrame) ModifyPacket(pkt *av.Packet, streams []av.CodecData, videoidx int, audioidx int) (drop bool, err error)

ModifyPacket ModifyPacket

type Walltime

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

Walltime Make packets reading speed as same as walltime, effect like ffmpeg -re option.

func (*Walltime) ModifyPacket

func (instance *Walltime) ModifyPacket(pkt *av.Packet, streams []av.CodecData, videoidx int, audioidx int) (drop bool, err error)

ModifyPacket ModifyPacket

Jump to

Keyboard shortcuts

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