start building out audio and rtp libraries

This commit is contained in:
Avi Zimmerman
2021-01-25 19:49:57 +02:00
parent 177507cf0c
commit 099460e179
18 changed files with 888 additions and 35 deletions

19
gst/rtp/c_util.go Normal file
View 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
}