コード例 #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())
}