mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-06 16:36:51 +08:00
organize hack code
This commit is contained in:
25
hack/test.go
Normal file
25
hack/test.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/tinyzimmer/go-gst/gst"
|
||||
)
|
||||
|
||||
func main() {
|
||||
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()
|
||||
}
|
Reference in New Issue
Block a user