示例#1
0
文件: swr.go 项目: Dim0N22/gmf
func NewSwrCtx(options []*Option, cc *CodecCtx) *SwrCtx {
	this := &SwrCtx{swrCtx: C.swr_alloc(), cc: cc}

	for _, option := range options {
		option.Set(this.swrCtx)
	}

	if int(C.swr_init(this.swrCtx)) < 0 {
		return nil
	}

	return this
}
示例#2
0
//Context constructor functions.Allocate Context.
func SwrAlloc() *Context {
	return (*Context)(C.swr_alloc())
}
示例#3
0
文件: swresample.go 项目: hyhy01/goav
//SwrContext constructor functions
//struct SwrContext * swr_alloc (void)
//Allocate SwrContext.
func Swr_alloc() *SwrContext {
	return (*SwrContext)(C.swr_alloc())
}