예제 #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
파일: swresample.go 프로젝트: gale320/goav
//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())
}