mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-01 18:33:04 +02:00
gst push function.
This commit is contained in:
parent
710d0c9cd0
commit
7bc9a40677
3 changed files with 21 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue