mirror of
https://github.com/asticode/go-astiav.git
synced 2025-10-05 00:02:45 +08:00
Moved all c code to .h and .c files + removed struc_ prefix when not needed
This commit is contained in:
@@ -9,10 +9,10 @@ import (
|
||||
|
||||
// https://github.com/FFmpeg/FFmpeg/blob/n5.0/libavfilter/avfilter.h#L861
|
||||
type FilterGraph struct {
|
||||
c *C.struct_AVFilterGraph
|
||||
c *C.AVFilterGraph
|
||||
}
|
||||
|
||||
func newFilterGraphFromC(c *C.struct_AVFilterGraph) *FilterGraph {
|
||||
func newFilterGraphFromC(c *C.AVFilterGraph) *FilterGraph {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
@@ -76,7 +76,7 @@ func (g *FilterGraph) NewFilterContext(f *Filter, name string, args FilterArgs)
|
||||
}
|
||||
cn := C.CString(name)
|
||||
defer C.free(unsafe.Pointer(cn))
|
||||
var c *C.struct_AVFilterContext
|
||||
var c *C.AVFilterContext
|
||||
if err := newError(C.avfilter_graph_create_filter(&c, f.c, cn, ca, nil, g.c)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -86,11 +86,11 @@ func (g *FilterGraph) NewFilterContext(f *Filter, name string, args FilterArgs)
|
||||
func (g *FilterGraph) Parse(content string, inputs, outputs *FilterInOut) error {
|
||||
cc := C.CString(content)
|
||||
defer C.free(unsafe.Pointer(cc))
|
||||
var ic **C.struct_AVFilterInOut
|
||||
var ic **C.AVFilterInOut
|
||||
if inputs != nil {
|
||||
ic = &inputs.c
|
||||
}
|
||||
var oc **C.struct_AVFilterInOut
|
||||
var oc **C.AVFilterInOut
|
||||
if outputs != nil {
|
||||
oc = &outputs.c
|
||||
}
|
||||
|
Reference in New Issue
Block a user