gst push function.

This commit is contained in:
Miroslav Šedivý 2021-11-28 22:37:17 +01:00
parent 710d0c9cd0
commit 7bc9a40677
3 changed files with 21 additions and 0 deletions

View file

@ -74,6 +74,16 @@ func (p *Pipeline) Stop() {
C.gstreamer_pipeline_stop(p.Pipeline)
}
func (p *Pipeline) Push(sinkName string, buffer []byte) {
sinkNameUnsafe := C.CString(sinkName)
defer C.free(unsafe.Pointer(sinkNameUnsafe))
bytes := C.CBytes(buffer)
defer C.free(bytes)
C.gstreamer_pipeline_push(p.Pipeline, sinkNameUnsafe, bytes, C.int(len(buffer)))
}
// gst-inspect-1.0
func CheckPlugins(plugins []string) error {
var plugin *C.GstPlugin