mirror of
https://github.com/asticode/go-astiav.git
synced 2025-10-28 18:31:49 +08:00
51 lines
1.3 KiB
Go
51 lines
1.3 KiB
Go
package astiav
|
|
|
|
//#include <libavfilter/avfilter.h>
|
|
import "C"
|
|
|
|
// https://ffmpeg.org/doxygen/7.0/structAVFilterInOut.html
|
|
type FilterInOut struct {
|
|
c *C.AVFilterInOut
|
|
}
|
|
|
|
func newFilterInOutFromC(c *C.AVFilterInOut) *FilterInOut {
|
|
if c == nil {
|
|
return nil
|
|
}
|
|
return &FilterInOut{c: c}
|
|
}
|
|
|
|
// https://ffmpeg.org/doxygen/7.0/group__lavfi.html#ga6e1c2931e15eb4283c59c6ccc8b83919
|
|
func AllocFilterInOut() *FilterInOut {
|
|
return newFilterInOutFromC(C.avfilter_inout_alloc())
|
|
}
|
|
|
|
// https://ffmpeg.org/doxygen/7.0/group__lavfi.html#ga294500a9856260eb1552354fd9d9a6c4
|
|
func (i *FilterInOut) Free() {
|
|
C.avfilter_inout_free(&i.c)
|
|
}
|
|
|
|
// https://ffmpeg.org/doxygen/7.0/structAVFilterInOut.html#a88afecac258f51aab7e9a9db9e7a4d58
|
|
func (i *FilterInOut) SetName(n string) {
|
|
i.c.name = C.CString(n)
|
|
}
|
|
|
|
// https://ffmpeg.org/doxygen/7.0/structAVFilterInOut.html#a3227857d0b955b639f4950d13e4e6f40
|
|
func (i *FilterInOut) SetFilterContext(c *FilterContext) {
|
|
i.c.filter_ctx = (*C.AVFilterContext)(c.c)
|
|
}
|
|
|
|
// https://ffmpeg.org/doxygen/7.0/structAVFilterInOut.html#a386ff90d40aa22f5612dd5eca734ed48
|
|
func (i *FilterInOut) SetPadIdx(idx int) {
|
|
i.c.pad_idx = C.int(idx)
|
|
}
|
|
|
|
// https://ffmpeg.org/doxygen/7.0/structAVFilterInOut.html#af8c8cf9ffb650974d19e791f5bb7cf33
|
|
func (i *FilterInOut) SetNext(n *FilterInOut) {
|
|
var nc *C.AVFilterInOut
|
|
if n != nil {
|
|
nc = n.c
|
|
}
|
|
i.c.next = nc
|
|
}
|