organize hack code

This commit is contained in:
tinyzimmer
2020-09-30 15:58:45 +03:00
parent db3e1262de
commit c482d3d15a
4 changed files with 6 additions and 6 deletions

View File

@@ -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/*

View File

@@ -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")
//

View File

View File

@@ -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)