miqt/qt/multimedia/gen_qmediavideoprobecontrol.go

179 lines
5.5 KiB
Go
Raw Normal View History

2024-11-04 10:15:32 +00:00
package multimedia
/*
#include "gen_qmediavideoprobecontrol.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt"
"runtime"
"runtime/cgo"
"unsafe"
)
type QMediaVideoProbeControl struct {
2024-11-19 06:29:06 +00:00
h *C.QMediaVideoProbeControl
isSubclass bool
2024-11-04 10:15:32 +00:00
*QMediaControl
}
func (this *QMediaVideoProbeControl) cPointer() *C.QMediaVideoProbeControl {
if this == nil {
return nil
}
return this.h
}
func (this *QMediaVideoProbeControl) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQMediaVideoProbeControl constructs the type using only CGO pointers.
func newQMediaVideoProbeControl(h *C.QMediaVideoProbeControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaVideoProbeControl {
2024-11-04 10:15:32 +00:00
if h == nil {
return nil
}
2024-11-19 06:29:06 +00:00
return &QMediaVideoProbeControl{h: h,
QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)}
2024-11-04 10:15:32 +00:00
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQMediaVideoProbeControl constructs the type using only unsafe pointers.
func UnsafeNewQMediaVideoProbeControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaVideoProbeControl {
if h == nil {
return nil
}
return &QMediaVideoProbeControl{h: (*C.QMediaVideoProbeControl)(h),
QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)}
2024-11-04 10:15:32 +00:00
}
func (this *QMediaVideoProbeControl) MetaObject() *qt.QMetaObject {
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QMediaVideoProbeControl_MetaObject(this.h)))
}
func (this *QMediaVideoProbeControl) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
return (unsafe.Pointer)(C.QMediaVideoProbeControl_Metacast(this.h, param1_Cstring))
}
func QMediaVideoProbeControl_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QMediaVideoProbeControl_Tr(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QMediaVideoProbeControl_TrUtf8(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QMediaVideoProbeControl_TrUtf8(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QMediaVideoProbeControl) VideoFrameProbed(frame *QVideoFrame) {
C.QMediaVideoProbeControl_VideoFrameProbed(this.h, frame.cPointer())
}
func (this *QMediaVideoProbeControl) OnVideoFrameProbed(slot func(frame *QVideoFrame)) {
C.QMediaVideoProbeControl_connect_VideoFrameProbed(this.h, C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QMediaVideoProbeControl_VideoFrameProbed
func miqt_exec_callback_QMediaVideoProbeControl_VideoFrameProbed(cb C.intptr_t, frame *C.QVideoFrame) {
gofunc, ok := cgo.Handle(cb).Value().(func(frame *QVideoFrame))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := UnsafeNewQVideoFrame(unsafe.Pointer(frame))
gofunc(slotval1)
}
func (this *QMediaVideoProbeControl) Flush() {
C.QMediaVideoProbeControl_Flush(this.h)
}
func (this *QMediaVideoProbeControl) OnFlush(slot func()) {
C.QMediaVideoProbeControl_connect_Flush(this.h, C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QMediaVideoProbeControl_Flush
func miqt_exec_callback_QMediaVideoProbeControl_Flush(cb C.intptr_t) {
gofunc, ok := cgo.Handle(cb).Value().(func())
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
gofunc()
}
func QMediaVideoProbeControl_Tr2(s string, c string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
var _ms C.struct_miqt_string = C.QMediaVideoProbeControl_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QMediaVideoProbeControl_Tr3(s string, c string, n int) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
var _ms C.struct_miqt_string = C.QMediaVideoProbeControl_Tr3(s_Cstring, c_Cstring, (C.int)(n))
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QMediaVideoProbeControl_TrUtf82(s string, c string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
var _ms C.struct_miqt_string = C.QMediaVideoProbeControl_TrUtf82(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QMediaVideoProbeControl_TrUtf83(s string, c string, n int) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
var _ms C.struct_miqt_string = C.QMediaVideoProbeControl_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
// Delete this object from C++ memory.
func (this *QMediaVideoProbeControl) Delete() {
2024-11-19 06:29:06 +00:00
C.QMediaVideoProbeControl_Delete(this.h, C.bool(this.isSubclass))
2024-11-04 10:15:32 +00:00
}
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
// from C++ memory once it is unreachable from Go memory.
func (this *QMediaVideoProbeControl) GoGC() {
runtime.SetFinalizer(this, func(this *QMediaVideoProbeControl) {
this.Delete()
runtime.KeepAlive(this.h)
})
}