switch to github.com/go-gst/go-pointer

This commit is contained in:
RSWilli
2024-11-27 17:54:38 +01:00
parent 84517be28f
commit 0577406af2
23 changed files with 58 additions and 39 deletions

View File

@@ -16,6 +16,12 @@ import (
"github.com/go-gst/go-gst/gst"
)
// #include <stdio.h>
// #include <stdlib.h>
//
// void __lsan_do_leak_check(void);
import "C"
func run(ctx context.Context) error {
ctx, cancel := signal.NotifyContext(ctx, os.Interrupt)
defer cancel()
@@ -83,14 +89,10 @@ func run(ctx context.Context) error {
go mainloop.Run()
go func() {
<-ctx.Done()
mainloop.Quit()
}()
<-ctx.Done()
mainloop.Quit()
pipeline.BlockSetState(gst.StateNull)
gst.Deinit()
@@ -110,6 +112,18 @@ func main() {
runtime.GC()
runtime.GC()
runtime.GC()
runtime.GC()
runtime.GC()
runtime.GC()
runtime.GC()
runtime.GC()
runtime.GC()
runtime.GC()
runtime.GC()
runtime.GC()
runtime.GC()
C.__lsan_do_leak_check()
prof := pprof.Lookup("go-glib-reffed-objects")