mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-06 00:17:00 +08:00
update plugin examples to build & work
This commit is contained in:

committed by
Wilhelm Bartel

parent
f0fa8a765a
commit
ae20b4c1c7
@@ -18,7 +18,10 @@
|
||||
//go:generate gst-plugin-gen
|
||||
package main
|
||||
|
||||
import "github.com/go-gst/go-glib/glib"
|
||||
import (
|
||||
"github.com/go-gst/go-glib/glib"
|
||||
"github.com/go-gst/go-gst/gst"
|
||||
)
|
||||
|
||||
func main() {}
|
||||
|
||||
@@ -26,4 +29,13 @@ type gobin struct{}
|
||||
|
||||
func (g *gobin) New() glib.GoObjectSubclass { return &gobin{} }
|
||||
|
||||
func (g *gobin) ClassInit(klass *glib.ObjectClass) {}
|
||||
func (g *gobin) ClassInit(klass *glib.ObjectClass) {
|
||||
// Set the plugin's longname as it is a basic requirement for a GStreamer plugin
|
||||
class := gst.ToElementClass(klass)
|
||||
class.SetMetadata(
|
||||
"GoBin example",
|
||||
"General",
|
||||
"An empty GstBin element which does nothing",
|
||||
"Avi Zimmerman <avi.zimmerman@gmail.com>",
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user