func cPadArrayToPadSlice(cPads *C.AVFilterPad) []*Pad { var pads []*Pad for i := C.uint(0); ; i++ { cPad := C.go_av_pads_get(cPads, i) if cPad == nil { break } pad := NewPadFromC(unsafe.Pointer(cPad)) pads = append(pads, pad) } return pads }
func (ctx *Context) OutputPads() []*Pad { count := ctx.NumberOfOutputs() if count <= 0 { return nil } pads := make([]*Pad, 0, count) for i := uint(0); i < count; i++ { cPad := C.go_av_pads_get(ctx.CAVFilterContext.output_pads, C.uint(i)) pad := NewPadFromC(unsafe.Pointer(cPad)) pads = append(pads, pad) } return pads }