mirror of
https://github.com/go-gst/go-gst.git
synced 2026-04-22 15:47:12 +08:00
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:
committed by
GitHub
parent
65498e9397
commit
16ee890d5c
@@ -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
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user