gst: add wrapper for deinit function (#15)

* gst: add wrapper for deinit function

* build: prevent unused variable warning in cgo code compilation.

While compiling the code gcc complained with unused-variable
According to:
https://github.com/golang/go/issues/6883#issuecomment-383800123
Wall flag should not be used in CGO, nonetheless in this PR we only
remove the unused variable warning.

Co-authored-by: Solganik Alexander <alexanders@anyvision.co>
This commit is contained in:
Solganik Alexander
2021-06-06 12:47:32 +03:00
committed by GitHub
parent 65498e9397
commit 16ee890d5c
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -45,3 +45,10 @@ func Init(args *[]string) {
}
CAT = NewDebugCategory("GST_GO", DebugColorFgCyan, "GStreamer Go Bindings")
}
// Deinit is a wrapper for gst_deinit Clean up any resources created by GStreamer in gst_init().
// It is normally not needed to call this function in a normal application as the resources will automatically be freed
// when the program terminates. This function is therefore mostly used by testsuites and other memory profiling tools.
func Deinit() {
C.gst_deinit()
}
+1 -1
View File
@@ -2,7 +2,7 @@ package gst
/*
#cgo pkg-config: gstreamer-1.0
#cgo CFLAGS: -Wno-deprecated-declarations -Wno-format-security -g -Wall
#cgo CFLAGS: -Wno-deprecated-declarations -Wno-format-security -g -Wall -Wno-unused-variable
#cgo LDFLAGS: -lm
*/
import "C"