Added links to C doc

This commit is contained in:
Quentin Renard
2024-11-13 18:12:00 +01:00
parent 1841ad55fe
commit b15d5d0e04
80 changed files with 539 additions and 115 deletions

View File

@@ -7,7 +7,7 @@ import (
"unsafe"
)
// https://github.com/FFmpeg/FFmpeg/blob/n7.0/libavfilter/avfilter.h#L1156
// https://ffmpeg.org/doxygen/7.0/structAVFilterGraphSegment.html
type FilterGraphSegment struct {
c *C.AVFilterGraphSegment
}
@@ -19,10 +19,12 @@ func newFilterGraphSegmentFromC(c *C.AVFilterGraphSegment) *FilterGraphSegment {
return &FilterGraphSegment{c: c}
}
// https://ffmpeg.org/doxygen/7.0/group__lavfi.html#ga51283edd8f3685e1f33239f360e14ae8
func (fgs *FilterGraphSegment) Free() {
C.avfilter_graph_segment_free(&fgs.c)
}
// https://ffmpeg.org/doxygen/7.0/structAVFilterGraphSegment.html#ad5a2779af221d1520490fe2719f9e39a
func (fgs *FilterGraphSegment) Chains() (cs []*FilterChain) {
ccs := (*[(math.MaxInt32 - 1) / unsafe.Sizeof((*C.AVFilterChain)(nil))](*C.AVFilterChain))(unsafe.Pointer(fgs.c.chains))
for i := 0; i < fgs.NbChains(); i++ {
@@ -31,6 +33,7 @@ func (fgs *FilterGraphSegment) Chains() (cs []*FilterChain) {
return
}
// https://ffmpeg.org/doxygen/7.0/structAVFilterGraphSegment.html#ab7563eca151d89e693f6258de5ce0214
func (fgs *FilterGraphSegment) NbChains() int {
return int(fgs.c.nb_chains)
}