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 }
//Context constructor functions.Allocate Context. func SwrAlloc() *Context { return (*Context)(C.swr_alloc()) }
//SwrContext constructor functions //struct SwrContext * swr_alloc (void) //Allocate SwrContext. func Swr_alloc() *SwrContext { return (*SwrContext)(C.swr_alloc()) }