mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-04 07:36:41 +08:00
major move of all glib specific bindings and extendable objects from go runtime to go-glib package
This commit is contained in:
@@ -3,12 +3,12 @@ package examples
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/tinyzimmer/go-gst/gst"
|
||||
"github.com/tinyzimmer/go-glib/glib"
|
||||
)
|
||||
|
||||
// Run is used to wrap the given function in a main loop and print any error
|
||||
func Run(f func() error) {
|
||||
mainLoop := gst.NewMainLoop(gst.DefaultMainContext(), false)
|
||||
mainLoop := glib.NewMainLoop(glib.MainContextDefault(), false)
|
||||
|
||||
defer mainLoop.Unref()
|
||||
|
||||
@@ -24,8 +24,8 @@ func Run(f func() error) {
|
||||
|
||||
// RunLoop is used to wrap the given function in a main loop and print any error.
|
||||
// The main loop itself is passed to the function for more control over exiting.
|
||||
func RunLoop(f func(*gst.MainLoop) error) {
|
||||
mainLoop := gst.NewMainLoop(gst.DefaultMainContext(), false)
|
||||
func RunLoop(f func(*glib.MainLoop) error) {
|
||||
mainLoop := glib.NewMainLoop(glib.MainContextDefault(), false)
|
||||
defer mainLoop.Unref()
|
||||
|
||||
if err := f(mainLoop); err != nil {
|
||||
|
Reference in New Issue
Block a user