func (g *Graph) AddFilter(filter *Filter, name string) (*Context, error) { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) cCtx := C.avfilter_graph_alloc_filter(g.CAVFilterGraph, filter.CAVFilter, cName) if cCtx == nil { return nil, ErrAllocationError } return NewContextFromC(unsafe.Pointer(cCtx)), nil }
//AVFilterContext * avfilter_graph_alloc_filter (AVFilterGraph *graph, const AVFilter *filter, const char *name) //Create a new filter instance in a filter graph. func Avfilter_graph_alloc_filter(g *AVFilterGraph, f *AVFilter, n string) *AVFilterContext { return (*AVFilterContext)(C.avfilter_graph_alloc_filter((*C.struct_AVFilterGraph)(g), (*C.struct_AVFilter)(f), C.CString(n))) }
//Create a new filter instance in a filter graph. func (g *Graph) AvfilterGraphAllocFilter(f *Filter, n string) *Context { return (*Context)(C.avfilter_graph_alloc_filter((*C.struct_AVFilterGraph)(g), (*C.struct_AVFilter)(f), C.CString(n))) }