Files
go-gst/hack/caps.go
2020-09-30 21:36:59 +03:00

26 lines
442 B
Go

package main
import (
"fmt"
"github.com/tinyzimmer/go-gst/gst"
)
func capsWeirdness() {
gst.Init(nil)
caps := gst.NewCapsFromString("audio/x-raw")
// caps.ForEach(func(features *gst.CapsFeatures, structure *gst.Structure) bool {
// fmt.Println(features)
// return true
// })
caps.FilterAndMapInPlace(func(features *gst.CapsFeatures, structure *gst.Structure) bool {
fmt.Println(features)
return true
})
caps.Unref()
}