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

committed by
Wilhelm Bartel

parent
f0fa8a765a
commit
ae20b4c1c7
@@ -17,7 +17,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() {}
|
||||
|
||||
@@ -25,4 +28,13 @@ type myelement struct{}
|
||||
|
||||
func (g *myelement) New() glib.GoObjectSubclass { return &myelement{} }
|
||||
|
||||
func (g *myelement) ClassInit(klass *glib.ObjectClass) {}
|
||||
func (g *myelement) 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(
|
||||
"Boilerplate",
|
||||
"General",
|
||||
"An empty element which does nothing",
|
||||
"Avi Zimmerman <avi.zimmerman@gmail.com>",
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user