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:
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)
|
ln -s golangci-lint-$(GOLANGCI_VERSION)-$(shell uname | tr A-Z a-z)-amd64/golangci-lint $(GOLANGCI_LINT)
|
||||||
|
|
||||||
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())) }
|
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
|
// 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")
|
// caps := gst.NewCapsFromString("audio/x-raw")
|
||||||
//
|
//
|
||||||
|
@@ -11,10 +11,10 @@ func main() {
|
|||||||
|
|
||||||
caps := gst.NewCapsFromString("audio/x-raw")
|
caps := gst.NewCapsFromString("audio/x-raw")
|
||||||
|
|
||||||
caps.ForEach(func(features *gst.CapsFeatures, structure *gst.Structure) bool {
|
// caps.ForEach(func(features *gst.CapsFeatures, structure *gst.Structure) bool {
|
||||||
fmt.Println(features)
|
// fmt.Println(features)
|
||||||
return true
|
// return true
|
||||||
})
|
// })
|
||||||
|
|
||||||
caps.FilterAndMapInPlace(func(features *gst.CapsFeatures, structure *gst.Structure) bool {
|
caps.FilterAndMapInPlace(func(features *gst.CapsFeatures, structure *gst.Structure) bool {
|
||||||
fmt.Println(features)
|
fmt.Println(features)
|
Reference in New Issue
Block a user