mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-07 00:43:29 +08:00
organize hack code
This commit is contained in:
2
Makefile
2
Makefile
@@ -17,4 +17,4 @@ $(GOLANGCI_LINT):
|
||||
ln -s golangci-lint-$(GOLANGCI_VERSION)-$(shell uname | tr A-Z a-z)-amd64/golangci-lint $(GOLANGCI_LINT)
|
||||
|
||||
lint: $(GOLANGCI_LINT)
|
||||
$(GOLANGCI_LINT) run -v --timeout 300s --skip-dirs cmd/
|
||||
$(GOLANGCI_LINT) run -v --timeout 300s --skip-dirs cmd/ --skip-files hack/*
|
@@ -218,7 +218,7 @@ func (c *Caps) FilterAndMapInPlace(f CapsMapFunc) {
|
||||
func (c *Caps) Fixate() *Caps { return wrapCaps(C.gst_caps_fixate(c.Instance())) }
|
||||
|
||||
// ForEach calls the provided function once for each structure and caps feature in the GstCaps. The function must not
|
||||
// modify the fields.
|
||||
// modify the fields. There is an unresolved bug in this function currently and it is better to use MapInPlace instead.
|
||||
//
|
||||
// caps := gst.NewCapsFromString("audio/x-raw")
|
||||
//
|
||||
|
@@ -11,10 +11,10 @@ func main() {
|
||||
|
||||
caps := gst.NewCapsFromString("audio/x-raw")
|
||||
|
||||
caps.ForEach(func(features *gst.CapsFeatures, structure *gst.Structure) bool {
|
||||
fmt.Println(features)
|
||||
return true
|
||||
})
|
||||
// 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)
|
Reference in New Issue
Block a user