Documentation ¶
Overview ¶
Format.
Index ¶
- Variables
- func AvError(averr int) error
- func GenSyntVideo(w, h int, fmt int32) chan *Frame
- func GetSampleFmtName(fmt int32) string
- func InitDesc()
- func NewSample(nbSamples, nbChannels int, format SampleFmt) error
- func Rescale(a, b, c int) int
- func RescaleDelta(inTb AVRational, inTs int, fsTb AVRational, duration int, last *int, ...) int
- func RescaleQ(a int, encBase AVRational, stBase AVRational) int
- type AVIOContext
- type AVIOHandlers
- type AVR
- type AVRational
- type Codec
- type CodecCtx
- func (this *CodecCtx) BitRate() int
- func (this *CodecCtx) ChannelLayout() int
- func (this *CodecCtx) Channels() int
- func (this *CodecCtx) Close()
- func (this *CodecCtx) CopyBasic(ist *Stream) *CodecCtx
- func (this *CodecCtx) CopyExtra(ist *Stream) *CodecCtx
- func (this *CodecCtx) Dump()
- func (this *CodecCtx) FlushBuffers()
- func (this *CodecCtx) FrameSize() int
- func (this *CodecCtx) Free()
- func (this *CodecCtx) Height() int
- func (this *CodecCtx) Id() int
- func (this *CodecCtx) IsOpen() bool
- func (this *CodecCtx) Open(dict *Dict) error
- func (this *CodecCtx) PixFmt() int32
- func (this *CodecCtx) Profile() int
- func (this *CodecCtx) Release()
- func (this *CodecCtx) SampleFmt() int32
- func (this *CodecCtx) SampleRate() int
- func (this *CodecCtx) SelectChannelLayout() int
- func (this *CodecCtx) SelectSampleRate() int
- func (this *CodecCtx) SetBitRate(val int) *CodecCtx
- func (this *CodecCtx) SetChannels(val int) *CodecCtx
- func (this *CodecCtx) SetDimension(w, h int) *CodecCtx
- func (this *CodecCtx) SetFlag(flag int) *CodecCtx
- func (this *CodecCtx) SetGopSize(val int) *CodecCtx
- func (this *CodecCtx) SetHasBframes(val int) *CodecCtx
- func (this *CodecCtx) SetHeight(val int) *CodecCtx
- func (this *CodecCtx) SetMaxBFrames(val int) *CodecCtx
- func (this *CodecCtx) SetMbDecision(val int) *CodecCtx
- func (this *CodecCtx) SetOpt()
- func (this *CodecCtx) SetPixFmt(val int32) *CodecCtx
- func (this *CodecCtx) SetProfile(profile int) *CodecCtx
- func (this *CodecCtx) SetSampleFmt(val int32) *CodecCtx
- func (this *CodecCtx) SetSampleRate(val int) *CodecCtx
- func (this *CodecCtx) SetStrictCompliance(val int) *CodecCtx
- func (this *CodecCtx) SetTimeBase(val AVR) *CodecCtx
- func (this *CodecCtx) SetWidth(val int) *CodecCtx
- func (this *CodecCtx) TimeBase() AVRational
- func (this *CodecCtx) Type() int32
- func (this *CodecCtx) Width() int
- type CodecDescriptor
- type Dict
- type FmtCtx
- func (this *FmtCtx) CloseInput()
- func (this *FmtCtx) CloseOutput()
- func (this *FmtCtx) Dump()
- func (this *FmtCtx) DumpAv()
- func (this *FmtCtx) Duration() int
- func (this *FmtCtx) FindStreamInfo() error
- func (this *FmtCtx) Free()
- func (this *FmtCtx) GetBestStream(typ int32) (*Stream, error)
- func (this *FmtCtx) GetStream(idx int) (*Stream, error)
- func (this *FmtCtx) IsGlobalHeader() bool
- func (this *FmtCtx) IsNoFile() bool
- func (this *FmtCtx) NewStream(c *Codec) *Stream
- func (this *FmtCtx) OpenInput(filename string) error
- func (this *FmtCtx) Packets() chan *Packet
- func (this *FmtCtx) SeekFile(ist *Stream, minTs, maxTs int, flag int) error
- func (this *FmtCtx) SeekFrameAt(sec int, streamIndex int) error
- func (this *FmtCtx) SetDebug(val int) *FmtCtx
- func (this *FmtCtx) SetFlag(flag int) *FmtCtx
- func (this *FmtCtx) SetInputFormat(name string) error
- func (this *FmtCtx) SetOformat(ofmt *OutputFmt) error
- func (this *FmtCtx) SetPb(val *AVIOContext) *FmtCtx
- func (this *FmtCtx) SetStartTime(val int) *FmtCtx
- func (this *FmtCtx) StartTime() int
- func (this *FmtCtx) StreamsCnt() int
- func (this *FmtCtx) TsOffset(stime int) int
- func (this *FmtCtx) WriteHeader() error
- func (this *FmtCtx) WritePacket(p *Packet) error
- func (this *FmtCtx) WriteTrailer()
- type Frame
- func (this *Frame) Channels() int
- func (this *Frame) Clone() *Frame
- func (this *Frame) Encode(cc *CodecCtx) (*Packet, bool, error)
- func (this *Frame) Flush(cc *CodecCtx) (*Packet, bool, error)
- func (this *Frame) Format() int
- func (this *Frame) Free()
- func (this *Frame) Height() int
- func (this *Frame) ImgAlloc() error
- func (this *Frame) KeyFrame() int
- func (this *Frame) LineSize(idx int) int
- func (this *Frame) NbSamples() int
- func (this *Frame) PktDts() int
- func (this *Frame) PktDuration() int
- func (this *Frame) PktPos() int
- func (this *Frame) PktPts() int
- func (this *Frame) Pts() int
- func (this *Frame) SetBestPts()
- func (this *Frame) SetChannelLayout(val int) *Frame
- func (this *Frame) SetChannels(val int) *Frame
- func (this *Frame) SetData(idx int, lineSize int, data int) *Frame
- func (this *Frame) SetFormat(val int32) *Frame
- func (this *Frame) SetHeight(val int) *Frame
- func (this *Frame) SetNbSamples(val int) *Frame
- func (this *Frame) SetPktDts(val int)
- func (this *Frame) SetPktPts(val int)
- func (this *Frame) SetPts(val int)
- func (this *Frame) SetQuality(val int) *Frame
- func (this *Frame) SetWidth(val int) *Frame
- func (this *Frame) TimeStamp() int
- func (this *Frame) Unref()
- func (this *Frame) Width() int
- type Image
- type Option
- type Options
- type OutputFmt
- type Packet
- func (this *Packet) Data() []byte
- func (this *Packet) Decode(cc *CodecCtx) (*Frame, bool, int, error)
- func (this *Packet) Dts() int
- func (this *Packet) Dump()
- func (this *Packet) Duration() int
- func (this *Packet) Frames(cc *CodecCtx) chan *Frame
- func (this *Packet) Free()
- func (this *Packet) Pos() int
- func (this *Packet) Pts() int
- func (this *Packet) SetDts(val int)
- func (this *Packet) SetDuration(duration int)
- func (this *Packet) SetPts(pts int)
- func (this *Packet) SetStreamIndex(val int) *Packet
- func (this *Packet) Size() int
- func (this *Packet) StreamIndex() int
- type Pair
- type Sample
- type SampleFmt
- type Stream
- func (this *Stream) CodecCtx() *CodecCtx
- func (this *Stream) Duration() int64
- func (this *Stream) Id() int
- func (this *Stream) Index() int
- func (this *Stream) IsAudio() bool
- func (this *Stream) IsCodecCtxSet() bool
- func (this *Stream) IsVideo() bool
- func (this *Stream) NbFrames() int
- func (this *Stream) SetCodecCtx(cc *CodecCtx)
- func (this *Stream) TimeBase() AVRational
- func (this *Stream) Type() int32
- type SwrCtx
- type SwsCtx
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AVMEDIA_TYPE_AUDIO int32 = C.AVMEDIA_TYPE_AUDIO AVMEDIA_TYPE_VIDEO int32 = C.AVMEDIA_TYPE_VIDEO AV_PIX_FMT_YUV420P int32 = C.AV_PIX_FMT_YUV420P AV_PIX_FMT_YUVJ420P int32 = C.AV_PIX_FMT_YUVJ420P AV_PIX_FMT_RGB24 int32 = C.AV_PIX_FMT_RGB24 AV_PIX_FMT_NONE int32 = C.AV_PIX_FMT_NONE FF_PROFILE_MPEG4_SIMPLE int = C.FF_PROFILE_MPEG4_SIMPLE AV_NOPTS_VALUE int = C.AV_NOPTS_VALUE )
View Source
var ( AV_CODEC_ID_MPEG1VIDEO int = C.AV_CODEC_ID_MPEG1VIDEO AV_CODEC_ID_MPEG2VIDEO int = C.AV_CODEC_ID_MPEG2VIDEO AV_CODEC_ID_H264 int = C.AV_CODEC_ID_H264 AV_CODEC_ID_MPEG4 int = C.AV_CODEC_ID_MPEG4 AV_CODEC_ID_JPEG2000 int = C.AV_CODEC_ID_JPEG2000 CODEC_FLAG_GLOBAL_HEADER int = C.CODEC_FLAG_GLOBAL_HEADER FF_MB_DECISION_SIMPLE int = C.FF_MB_DECISION_SIMPLE FF_MB_DECISION_BITS int = C.FF_MB_DECISION_BITS FF_MB_DECISION_RD int = C.FF_MB_DECISION_RD AV_SAMPLE_FMT_S16 int32 = C.AV_SAMPLE_FMT_S16 )
View Source
var ( AVFMT_FLAG_GENPTS int = C.AVFMT_FLAG_GENPTS AVFMTCTX_NOHEADER int = C.AVFMTCTX_NOHEADER )
View Source
var ( SWS_FAST_BILINEAR int = C.SWS_FAST_BILINEAR SWS_BILINEAR int = C.SWS_BILINEAR SWS_BICUBIC int = C.SWS_BICUBIC SWS_X int = C.SWS_X SWS_POINT int = C.SWS_POINT SWS_AREA int = C.SWS_AREA SWS_BICUBLIN int = C.SWS_BICUBLIN SWS_GAUSS int = C.SWS_GAUSS SWS_SINC int = C.SWS_SINC SWS_LANCZOS int = C.SWS_LANCZOS SWS_SPLINE int = C.SWS_SPLINE )
View Source
var ( AV_TIME_BASE int = C.AV_TIME_BASE AV_TIME_BASE_Q AVRational = AVRational{1, C.int(AV_TIME_BASE)} )
View Source
var Codecs []*CodecDescriptor
View Source
var (
IO_BUFFER_SIZE int = 32768
)
Functions ¶
func GenSyntVideo ¶
Synthetic video generator. It produces 25 iteratable frames. Used for tests.
func GetSampleFmtName ¶
func RescaleDelta ¶
func RescaleDelta(inTb AVRational, inTs int, fsTb AVRational, duration int, last *int, outTb AVRational) int
func RescaleQ ¶
func RescaleQ(a int, encBase AVRational, stBase AVRational) int
Types ¶
type AVIOContext ¶
type AVIOContext struct {
// contains filtered or unexported fields
}
func NewAVIOContext ¶
func NewAVIOContext(ctx *FmtCtx, handlers *AVIOHandlers) (*AVIOContext, error)
AVIOContext constructor. Use it only if You need custom IO behaviour!
func (*AVIOContext) Free ¶
func (this *AVIOContext) Free()
type AVIOHandlers ¶
type AVIOHandlers struct { ReadPacket func() ([]byte, int) WritePacket func([]byte) Seek func(int64, int) int64 }
Functions prototypes for custom IO. Implement necessary prototypes and pass instance pointer to NewAVIOContext.
E.g.:
func gridFsReader() ([]byte, int) { ... implementation ... return data, length } avoictx := NewAVIOContext(ctx, &AVIOHandlers{ReadPacket: gridFsReader})
type AVR ¶
func (AVR) AVRational ¶
func (this AVR) AVRational() AVRational
type AVRational ¶
type AVRational C.struct_AVRational
func (AVRational) AVR ¶
func (this AVRational) AVR() AVR
type Codec ¶
type Codec struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func NewEncoder ¶
func (*Codec) IsExperimental ¶
type CodecCtx ¶
type CodecCtx struct {
// contains filtered or unexported fields
}
func NewCodecCtx ¶
func (*CodecCtx) ChannelLayout ¶
func (*CodecCtx) FlushBuffers ¶
func (this *CodecCtx) FlushBuffers()
func (*CodecCtx) SampleRate ¶
func (*CodecCtx) SelectChannelLayout ¶
func (*CodecCtx) SelectSampleRate ¶
func (*CodecCtx) SetBitRate ¶
func (*CodecCtx) SetChannels ¶
func (*CodecCtx) SetDimension ¶
func (*CodecCtx) SetGopSize ¶
func (*CodecCtx) SetHasBframes ¶
func (*CodecCtx) SetMaxBFrames ¶
func (*CodecCtx) SetMbDecision ¶
func (*CodecCtx) SetProfile ¶
func (*CodecCtx) SetSampleFmt ¶
func (*CodecCtx) SetSampleRate ¶
func (*CodecCtx) SetStrictCompliance ¶
func (*CodecCtx) SetTimeBase ¶
func (*CodecCtx) TimeBase ¶
func (this *CodecCtx) TimeBase() AVRational
type CodecDescriptor ¶
type CodecDescriptor struct { IsEncoder bool // contains filtered or unexported fields }
func (*CodecDescriptor) Id ¶
func (this *CodecDescriptor) Id() int
func (*CodecDescriptor) LongName ¶
func (this *CodecDescriptor) LongName() string
func (*CodecDescriptor) Name ¶
func (this *CodecDescriptor) Name() string
func (*CodecDescriptor) Props ¶
func (this *CodecDescriptor) Props() int
func (*CodecDescriptor) Type ¶
func (this *CodecDescriptor) Type() int
type FmtCtx ¶
type FmtCtx struct {
// contains filtered or unexported fields
}
func NewCtx ¶
func NewCtx() *FmtCtx
@todo return error if avCtx is null @todo start_time is it needed?
func NewInputCtx ¶
Just a helper for NewCtx().OpenInput()
func NewOutputCtx ¶
func (*FmtCtx) CloseInput ¶
func (this *FmtCtx) CloseInput()
func (*FmtCtx) CloseOutput ¶
func (this *FmtCtx) CloseOutput()
func (*FmtCtx) FindStreamInfo ¶
func (*FmtCtx) IsGlobalHeader ¶
func (*FmtCtx) SetInputFormat ¶
func (*FmtCtx) SetOformat ¶
func (*FmtCtx) SetPb ¶
func (this *FmtCtx) SetPb(val *AVIOContext) *FmtCtx
func (*FmtCtx) SetStartTime ¶
func (*FmtCtx) StreamsCnt ¶
Original structure member is called instead of len(this.streams) because there is no initialized Stream wrappers in input context.
func (*FmtCtx) WriteHeader ¶
func (*FmtCtx) WritePacket ¶
func (*FmtCtx) WriteTrailer ¶
func (this *FmtCtx) WriteTrailer()
type Frame ¶
type Frame struct {
// contains filtered or unexported fields
}
func (*Frame) PktDuration ¶
func (*Frame) SetBestPts ¶
func (this *Frame) SetBestPts()
func (*Frame) SetChannelLayout ¶
func (*Frame) SetChannels ¶
func (*Frame) SetNbSamples ¶
func (*Frame) SetQuality ¶
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
type OutputFmt ¶
type OutputFmt struct { Filename string // contains filtered or unexported fields }
type Packet ¶
type Packet struct {
// contains filtered or unexported fields
}
func (*Packet) SetDuration ¶
func (*Packet) SetStreamIndex ¶
func (*Packet) StreamIndex ¶
type Sample ¶
type Sample struct {
// contains filtered or unexported fields
}
func (*Sample) SampleRealloc ¶
type Stream ¶
type Stream struct { Pts int // contains filtered or unexported fields }
func (*Stream) IsCodecCtxSet ¶
func (*Stream) SetCodecCtx ¶
func (*Stream) TimeBase ¶
func (this *Stream) TimeBase() AVRational
Source Files ¶
Click to show internal directories.
Click to hide internal directories.