mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-07 00:43:29 +08:00
start building out audio and rtp libraries
This commit is contained in:
19
gst/rtp/c_util.go
Normal file
19
gst/rtp/c_util.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package rtp
|
||||
|
||||
/*
|
||||
#include "gst.go.h"
|
||||
*/
|
||||
import "C"
|
||||
|
||||
// gboolean converts a go bool to a C.gboolean.
|
||||
func gboolean(b bool) C.gboolean {
|
||||
if b {
|
||||
return C.gboolean(1)
|
||||
}
|
||||
return C.gboolean(0)
|
||||
}
|
||||
|
||||
// gobool provides an easy type conversion between C.gboolean and a go bool.
|
||||
func gobool(b C.gboolean) bool {
|
||||
return int(b) > 0
|
||||
}
|
Reference in New Issue
Block a user