joy4: github.com/nareix/joy4/av/pktque Index | Files

package pktque

import "github.com/nareix/joy4/av/pktque"

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

Index

Package Files

buf.go filters.go timeline.go

type AVSync Uses

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

Drop incorrect packets to make A/V sync.

func (*AVSync) ModifyPacket Uses

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

type Buf Uses

type Buf struct {
    Head, Tail BufPos

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

func NewBuf Uses

func NewBuf() *Buf

func (*Buf) Get Uses

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

func (*Buf) IsValidPos Uses

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

func (*Buf) Pop Uses

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

func (*Buf) Push Uses

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

type BufPos Uses

type BufPos int

func (BufPos) GE Uses

func (self BufPos) GE(pos BufPos) bool

func (BufPos) GT Uses

func (self BufPos) GT(pos BufPos) bool

func (BufPos) LT Uses

func (self BufPos) LT(pos BufPos) bool

type Filter Uses

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

type FilterDemuxer Uses

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

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

func (FilterDemuxer) ReadPacket Uses

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

type Filters Uses

type Filters []Filter

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

func (Filters) ModifyPacket Uses

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

type FixTime Uses

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

Fix incorrect packet timestamps.

func (*FixTime) ModifyPacket Uses

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

type Timeline Uses

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

func (*Timeline) Pop Uses

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

func (*Timeline) Push Uses

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

type WaitKeyFrame Uses

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

Drop packets until first video key frame arrived.

func (*WaitKeyFrame) ModifyPacket Uses

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

type Walltime Uses

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

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

func (*Walltime) ModifyPacket Uses

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

Package pktque imports 2 packages (graph) and is imported by 19 packages. Updated 2016-09-29. Refresh now. Tools for package owners.