pull in upstream interface improvements and add a few more gstreamer interfaces

This commit is contained in:
Avi Zimmerman
2021-01-18 08:50:34 +02:00
parent 1427ab6b64
commit 546d620440
23 changed files with 969 additions and 292 deletions

View File

@@ -0,0 +1,27 @@
//go:generate gst-plugin-gen
//
// +plugin:Name=boilerplate
// +plugin:Description=My plugin written in go
// +plugin:Version=v0.0.1
// +plugin:License=gst.LicenseLGPL
// +plugin:Source=go-gst
// +plugin:Package=examples
// +plugin:Origin=https://github.com/tinyzimmer/go-gst
// +plugin:ReleaseDate=2021-01-18
//
// +element:Name=myelement
// +element:Rank=gst.RankNone
// +element:Impl=myelement
// +element:Subclass=gst.ExtendsElement
//
package main
import "github.com/tinyzimmer/go-glib/glib"
func main() {}
type myelement struct{}
func (g *myelement) New() glib.GoObjectSubclass { return &myelement{} }
func (g *myelement) ClassInit(klass *glib.ObjectClass) {}

View File

@@ -0,0 +1,27 @@
//go:generate gst-plugin-gen
//
// +plugin:Name=gobin
// +plugin:Description=A bin element written in go
// +plugin:Version=v0.0.1
// +plugin:License=gst.LicenseLGPL
// +plugin:Source=go-gst
// +plugin:Package=examples
// +plugin:Origin=https://github.com/tinyzimmer/go-gst
// +plugin:ReleaseDate=2021-01-18
//
// +element:Name=gobin
// +element:Rank=gst.RankNone
// +element:Impl=gobin
// +element:Subclass=gst.ExtendsBin
//
package main
import "github.com/tinyzimmer/go-glib/glib"
func main() {}
type gobin struct{}
func (g *gobin) New() glib.GoObjectSubclass { return &gobin{} }
func (g *gobin) ClassInit(klass *glib.ObjectClass) {}

View File

@@ -29,6 +29,8 @@
// +element:Rank=gst.RankNone
// +element:Impl=fileSink
// +element:Subclass=base.ExtendsBaseSink
// +element:Interfaces=gst.InterfaceURIHandler
//
package main
import (
@@ -119,13 +121,6 @@ func (f *fileSink) New() glib.GoObjectSubclass {
}
}
// The TypeInit method should register any additional interfaces provided by the element.
// In this example we signal to the type system that we also implement the GstURIHandler interface.
func (f *fileSink) TypeInit(instance *glib.TypeInstance) {
CAT.Log(gst.LevelLog, "Adding URIHandler interface to type")
instance.AddInterface(gst.InterfaceURIHandler)
}
// The ClassInit method should specify the metadata for this element and add any pad templates
// and properties.
func (f *fileSink) ClassInit(klass *glib.ObjectClass) {

View File

@@ -29,6 +29,8 @@
// +element:Rank=gst.RankNone
// +element:Impl=fileSrc
// +element:Subclass=base.ExtendsBaseSrc
// +element:Interfaces=gst.InterfaceURIHandler
//
package main
import (
@@ -123,13 +125,6 @@ func (f *fileSrc) New() glib.GoObjectSubclass {
}
}
// The TypeInit method should register any additional interfaces provided by the element.
// In this example we signal to the type system that we also implement the GstURIHandler interface.
func (f *fileSrc) TypeInit(instance *glib.TypeInstance) {
CAT.Log(gst.LevelLog, "Adding URIHandler interface to type")
instance.AddInterface(gst.InterfaceURIHandler)
}
// The ClassInit method should specify the metadata for this element and add any pad templates
// and properties.
func (f *fileSrc) ClassInit(klass *glib.ObjectClass) {