miqt/qt/multimedia/gen_qmediaserviceproviderplugin.go

761 lines
27 KiB
Go
Raw Normal View History

2024-11-04 23:15:32 +13:00
package multimedia
/*
#include "gen_qmediaserviceproviderplugin.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt"
"runtime"
"unsafe"
)
type QMediaServiceProviderHint__Type int
const (
QMediaServiceProviderHint__Null QMediaServiceProviderHint__Type = 0
QMediaServiceProviderHint__ContentType QMediaServiceProviderHint__Type = 1
QMediaServiceProviderHint__Device QMediaServiceProviderHint__Type = 2
QMediaServiceProviderHint__SupportedFeatures QMediaServiceProviderHint__Type = 3
QMediaServiceProviderHint__CameraPosition QMediaServiceProviderHint__Type = 4
)
type QMediaServiceProviderHint__Feature int
const (
QMediaServiceProviderHint__LowLatencyPlayback QMediaServiceProviderHint__Feature = 1
QMediaServiceProviderHint__RecordingSupport QMediaServiceProviderHint__Feature = 2
QMediaServiceProviderHint__StreamPlayback QMediaServiceProviderHint__Feature = 4
QMediaServiceProviderHint__VideoSurface QMediaServiceProviderHint__Feature = 8
)
type QMediaServiceProviderHint struct {
h *C.QMediaServiceProviderHint
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceProviderHint) cPointer() *C.QMediaServiceProviderHint {
if this == nil {
return nil
}
return this.h
}
func (this *QMediaServiceProviderHint) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 19:29:06 +13:00
// newQMediaServiceProviderHint constructs the type using only CGO pointers.
2024-11-04 23:15:32 +13:00
func newQMediaServiceProviderHint(h *C.QMediaServiceProviderHint) *QMediaServiceProviderHint {
if h == nil {
return nil
}
2024-12-07 17:15:57 +13:00
2024-11-04 23:15:32 +13:00
return &QMediaServiceProviderHint{h: h}
}
2024-11-19 19:29:06 +13:00
// UnsafeNewQMediaServiceProviderHint constructs the type using only unsafe pointers.
2024-11-04 23:15:32 +13:00
func UnsafeNewQMediaServiceProviderHint(h unsafe.Pointer) *QMediaServiceProviderHint {
2024-12-07 17:15:57 +13:00
return newQMediaServiceProviderHint((*C.QMediaServiceProviderHint)(h))
2024-11-04 23:15:32 +13:00
}
// NewQMediaServiceProviderHint constructs a new QMediaServiceProviderHint object.
func NewQMediaServiceProviderHint() *QMediaServiceProviderHint {
2024-11-19 19:29:06 +13:00
return newQMediaServiceProviderHint(C.QMediaServiceProviderHint_new())
2024-11-04 23:15:32 +13:00
}
// NewQMediaServiceProviderHint2 constructs a new QMediaServiceProviderHint object.
func NewQMediaServiceProviderHint2(mimeType string, codecs []string) *QMediaServiceProviderHint {
mimeType_ms := C.struct_miqt_string{}
mimeType_ms.data = C.CString(mimeType)
mimeType_ms.len = C.size_t(len(mimeType))
defer C.free(unsafe.Pointer(mimeType_ms.data))
codecs_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(codecs))))
defer C.free(unsafe.Pointer(codecs_CArray))
for i := range codecs {
codecs_i_ms := C.struct_miqt_string{}
codecs_i_ms.data = C.CString(codecs[i])
codecs_i_ms.len = C.size_t(len(codecs[i]))
defer C.free(unsafe.Pointer(codecs_i_ms.data))
codecs_CArray[i] = codecs_i_ms
}
codecs_ma := C.struct_miqt_array{len: C.size_t(len(codecs)), data: unsafe.Pointer(codecs_CArray)}
2024-11-19 19:29:06 +13:00
return newQMediaServiceProviderHint(C.QMediaServiceProviderHint_new2(mimeType_ms, codecs_ma))
2024-11-04 23:15:32 +13:00
}
// NewQMediaServiceProviderHint3 constructs a new QMediaServiceProviderHint object.
func NewQMediaServiceProviderHint3(device []byte) *QMediaServiceProviderHint {
device_alias := C.struct_miqt_string{}
if len(device) > 0 {
device_alias.data = (*C.char)(unsafe.Pointer(&device[0]))
} else {
device_alias.data = (*C.char)(unsafe.Pointer(nil))
}
2024-11-04 23:15:32 +13:00
device_alias.len = C.size_t(len(device))
2024-11-19 19:29:06 +13:00
return newQMediaServiceProviderHint(C.QMediaServiceProviderHint_new3(device_alias))
2024-11-04 23:15:32 +13:00
}
// NewQMediaServiceProviderHint4 constructs a new QMediaServiceProviderHint object.
func NewQMediaServiceProviderHint4(position QCamera__Position) *QMediaServiceProviderHint {
2024-11-19 19:29:06 +13:00
return newQMediaServiceProviderHint(C.QMediaServiceProviderHint_new4((C.int)(position)))
2024-11-04 23:15:32 +13:00
}
// NewQMediaServiceProviderHint5 constructs a new QMediaServiceProviderHint object.
func NewQMediaServiceProviderHint5(features QMediaServiceProviderHint__Feature) *QMediaServiceProviderHint {
2024-11-19 19:29:06 +13:00
return newQMediaServiceProviderHint(C.QMediaServiceProviderHint_new5((C.int)(features)))
2024-11-04 23:15:32 +13:00
}
// NewQMediaServiceProviderHint6 constructs a new QMediaServiceProviderHint object.
func NewQMediaServiceProviderHint6(other *QMediaServiceProviderHint) *QMediaServiceProviderHint {
2024-11-19 19:29:06 +13:00
return newQMediaServiceProviderHint(C.QMediaServiceProviderHint_new6(other.cPointer()))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceProviderHint) OperatorAssign(other *QMediaServiceProviderHint) {
2025-02-01 13:45:16 +13:00
C.QMediaServiceProviderHint_operatorAssign(this.h, other.cPointer())
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceProviderHint) OperatorEqual(other *QMediaServiceProviderHint) bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QMediaServiceProviderHint_operatorEqual(this.h, other.cPointer()))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceProviderHint) OperatorNotEqual(other *QMediaServiceProviderHint) bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QMediaServiceProviderHint_operatorNotEqual(this.h, other.cPointer()))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceProviderHint) IsNull() bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QMediaServiceProviderHint_isNull(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceProviderHint) Type() QMediaServiceProviderHint__Type {
2025-02-01 13:45:16 +13:00
return (QMediaServiceProviderHint__Type)(C.QMediaServiceProviderHint_type(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceProviderHint) MimeType() string {
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QMediaServiceProviderHint_mimeType(this.h)
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QMediaServiceProviderHint) Codecs() []string {
2025-02-01 13:45:16 +13:00
var _ma C.struct_miqt_array = C.QMediaServiceProviderHint_codecs(this.h)
2024-11-04 23:15:32 +13:00
_ret := make([]string, int(_ma.len))
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
var _lv_ms C.struct_miqt_string = _outCast[i]
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
C.free(unsafe.Pointer(_lv_ms.data))
_ret[i] = _lv_ret
}
return _ret
}
func (this *QMediaServiceProviderHint) Device() []byte {
2025-02-01 13:45:16 +13:00
var _bytearray C.struct_miqt_string = C.QMediaServiceProviderHint_device(this.h)
2024-11-04 23:15:32 +13:00
_ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len)))
C.free(unsafe.Pointer(_bytearray.data))
return _ret
}
func (this *QMediaServiceProviderHint) CameraPosition() QCamera__Position {
2025-02-01 13:45:16 +13:00
return (QCamera__Position)(C.QMediaServiceProviderHint_cameraPosition(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceProviderHint) Features() QMediaServiceProviderHint__Feature {
2025-02-01 13:45:16 +13:00
return (QMediaServiceProviderHint__Feature)(C.QMediaServiceProviderHint_features(this.h))
2024-11-04 23:15:32 +13:00
}
// Delete this object from C++ memory.
func (this *QMediaServiceProviderHint) Delete() {
2025-02-01 13:45:16 +13:00
C.QMediaServiceProviderHint_delete(this.h)
2024-11-04 23:15:32 +13: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 *QMediaServiceProviderHint) GoGC() {
runtime.SetFinalizer(this, func(this *QMediaServiceProviderHint) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QMediaServiceProviderFactoryInterface struct {
h *C.QMediaServiceProviderFactoryInterface
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceProviderFactoryInterface) cPointer() *C.QMediaServiceProviderFactoryInterface {
if this == nil {
return nil
}
return this.h
}
func (this *QMediaServiceProviderFactoryInterface) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 19:29:06 +13:00
// newQMediaServiceProviderFactoryInterface constructs the type using only CGO pointers.
2024-11-04 23:15:32 +13:00
func newQMediaServiceProviderFactoryInterface(h *C.QMediaServiceProviderFactoryInterface) *QMediaServiceProviderFactoryInterface {
if h == nil {
return nil
}
2024-12-07 17:15:57 +13:00
2024-11-04 23:15:32 +13:00
return &QMediaServiceProviderFactoryInterface{h: h}
}
2024-11-19 19:29:06 +13:00
// UnsafeNewQMediaServiceProviderFactoryInterface constructs the type using only unsafe pointers.
2024-11-04 23:15:32 +13:00
func UnsafeNewQMediaServiceProviderFactoryInterface(h unsafe.Pointer) *QMediaServiceProviderFactoryInterface {
2024-12-07 17:15:57 +13:00
return newQMediaServiceProviderFactoryInterface((*C.QMediaServiceProviderFactoryInterface)(h))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceProviderFactoryInterface) Create(key string) *QMediaService {
key_ms := C.struct_miqt_string{}
key_ms.data = C.CString(key)
key_ms.len = C.size_t(len(key))
defer C.free(unsafe.Pointer(key_ms.data))
2025-02-01 13:45:16 +13:00
return newQMediaService(C.QMediaServiceProviderFactoryInterface_create(this.h, key_ms))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceProviderFactoryInterface) Release(service *QMediaService) {
2025-02-01 13:45:16 +13:00
C.QMediaServiceProviderFactoryInterface_release(this.h, service.cPointer())
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceProviderFactoryInterface) OperatorAssign(param1 *QMediaServiceProviderFactoryInterface) {
2025-02-01 13:45:16 +13:00
C.QMediaServiceProviderFactoryInterface_operatorAssign(this.h, param1.cPointer())
2024-11-04 23:15:32 +13:00
}
// Delete this object from C++ memory.
func (this *QMediaServiceProviderFactoryInterface) Delete() {
2025-02-01 13:45:16 +13:00
C.QMediaServiceProviderFactoryInterface_delete(this.h)
2024-11-04 23:15:32 +13: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 *QMediaServiceProviderFactoryInterface) GoGC() {
runtime.SetFinalizer(this, func(this *QMediaServiceProviderFactoryInterface) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QMediaServiceSupportedFormatsInterface struct {
h *C.QMediaServiceSupportedFormatsInterface
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceSupportedFormatsInterface) cPointer() *C.QMediaServiceSupportedFormatsInterface {
if this == nil {
return nil
}
return this.h
}
func (this *QMediaServiceSupportedFormatsInterface) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 19:29:06 +13:00
// newQMediaServiceSupportedFormatsInterface constructs the type using only CGO pointers.
2024-11-04 23:15:32 +13:00
func newQMediaServiceSupportedFormatsInterface(h *C.QMediaServiceSupportedFormatsInterface) *QMediaServiceSupportedFormatsInterface {
if h == nil {
return nil
}
2024-12-07 17:15:57 +13:00
2024-11-04 23:15:32 +13:00
return &QMediaServiceSupportedFormatsInterface{h: h}
}
2024-11-19 19:29:06 +13:00
// UnsafeNewQMediaServiceSupportedFormatsInterface constructs the type using only unsafe pointers.
2024-11-04 23:15:32 +13:00
func UnsafeNewQMediaServiceSupportedFormatsInterface(h unsafe.Pointer) *QMediaServiceSupportedFormatsInterface {
2024-12-07 17:15:57 +13:00
return newQMediaServiceSupportedFormatsInterface((*C.QMediaServiceSupportedFormatsInterface)(h))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceSupportedFormatsInterface) HasSupport(mimeType string, codecs []string) QMultimedia__SupportEstimate {
mimeType_ms := C.struct_miqt_string{}
mimeType_ms.data = C.CString(mimeType)
mimeType_ms.len = C.size_t(len(mimeType))
defer C.free(unsafe.Pointer(mimeType_ms.data))
codecs_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(codecs))))
defer C.free(unsafe.Pointer(codecs_CArray))
for i := range codecs {
codecs_i_ms := C.struct_miqt_string{}
codecs_i_ms.data = C.CString(codecs[i])
codecs_i_ms.len = C.size_t(len(codecs[i]))
defer C.free(unsafe.Pointer(codecs_i_ms.data))
codecs_CArray[i] = codecs_i_ms
}
codecs_ma := C.struct_miqt_array{len: C.size_t(len(codecs)), data: unsafe.Pointer(codecs_CArray)}
2025-02-01 13:45:16 +13:00
return (QMultimedia__SupportEstimate)(C.QMediaServiceSupportedFormatsInterface_hasSupport(this.h, mimeType_ms, codecs_ma))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceSupportedFormatsInterface) SupportedMimeTypes() []string {
2025-02-01 13:45:16 +13:00
var _ma C.struct_miqt_array = C.QMediaServiceSupportedFormatsInterface_supportedMimeTypes(this.h)
2024-11-04 23:15:32 +13:00
_ret := make([]string, int(_ma.len))
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
var _lv_ms C.struct_miqt_string = _outCast[i]
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
C.free(unsafe.Pointer(_lv_ms.data))
_ret[i] = _lv_ret
}
return _ret
}
func (this *QMediaServiceSupportedFormatsInterface) OperatorAssign(param1 *QMediaServiceSupportedFormatsInterface) {
2025-02-01 13:45:16 +13:00
C.QMediaServiceSupportedFormatsInterface_operatorAssign(this.h, param1.cPointer())
2024-11-04 23:15:32 +13:00
}
// Delete this object from C++ memory.
func (this *QMediaServiceSupportedFormatsInterface) Delete() {
2025-02-01 13:45:16 +13:00
C.QMediaServiceSupportedFormatsInterface_delete(this.h)
2024-11-04 23:15:32 +13: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 *QMediaServiceSupportedFormatsInterface) GoGC() {
runtime.SetFinalizer(this, func(this *QMediaServiceSupportedFormatsInterface) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QMediaServiceSupportedDevicesInterface struct {
h *C.QMediaServiceSupportedDevicesInterface
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceSupportedDevicesInterface) cPointer() *C.QMediaServiceSupportedDevicesInterface {
if this == nil {
return nil
}
return this.h
}
func (this *QMediaServiceSupportedDevicesInterface) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 19:29:06 +13:00
// newQMediaServiceSupportedDevicesInterface constructs the type using only CGO pointers.
2024-11-04 23:15:32 +13:00
func newQMediaServiceSupportedDevicesInterface(h *C.QMediaServiceSupportedDevicesInterface) *QMediaServiceSupportedDevicesInterface {
if h == nil {
return nil
}
2024-12-07 17:15:57 +13:00
2024-11-04 23:15:32 +13:00
return &QMediaServiceSupportedDevicesInterface{h: h}
}
2024-11-19 19:29:06 +13:00
// UnsafeNewQMediaServiceSupportedDevicesInterface constructs the type using only unsafe pointers.
2024-11-04 23:15:32 +13:00
func UnsafeNewQMediaServiceSupportedDevicesInterface(h unsafe.Pointer) *QMediaServiceSupportedDevicesInterface {
2024-12-07 17:15:57 +13:00
return newQMediaServiceSupportedDevicesInterface((*C.QMediaServiceSupportedDevicesInterface)(h))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceSupportedDevicesInterface) Devices(service []byte) [][]byte {
service_alias := C.struct_miqt_string{}
if len(service) > 0 {
service_alias.data = (*C.char)(unsafe.Pointer(&service[0]))
} else {
service_alias.data = (*C.char)(unsafe.Pointer(nil))
}
2024-11-04 23:15:32 +13:00
service_alias.len = C.size_t(len(service))
2025-02-01 13:45:16 +13:00
var _ma C.struct_miqt_array = C.QMediaServiceSupportedDevicesInterface_devices(this.h, service_alias)
2024-11-04 23:15:32 +13:00
_ret := make([][]byte, int(_ma.len))
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
var _lv_bytearray C.struct_miqt_string = _outCast[i]
_lv_ret := C.GoBytes(unsafe.Pointer(_lv_bytearray.data), C.int(int64(_lv_bytearray.len)))
C.free(unsafe.Pointer(_lv_bytearray.data))
_ret[i] = _lv_ret
}
return _ret
}
func (this *QMediaServiceSupportedDevicesInterface) DeviceDescription(service []byte, device []byte) string {
service_alias := C.struct_miqt_string{}
if len(service) > 0 {
service_alias.data = (*C.char)(unsafe.Pointer(&service[0]))
} else {
service_alias.data = (*C.char)(unsafe.Pointer(nil))
}
2024-11-04 23:15:32 +13:00
service_alias.len = C.size_t(len(service))
device_alias := C.struct_miqt_string{}
if len(device) > 0 {
device_alias.data = (*C.char)(unsafe.Pointer(&device[0]))
} else {
device_alias.data = (*C.char)(unsafe.Pointer(nil))
}
2024-11-04 23:15:32 +13:00
device_alias.len = C.size_t(len(device))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QMediaServiceSupportedDevicesInterface_deviceDescription(this.h, service_alias, device_alias)
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QMediaServiceSupportedDevicesInterface) OperatorAssign(param1 *QMediaServiceSupportedDevicesInterface) {
2025-02-01 13:45:16 +13:00
C.QMediaServiceSupportedDevicesInterface_operatorAssign(this.h, param1.cPointer())
2024-11-04 23:15:32 +13:00
}
// Delete this object from C++ memory.
func (this *QMediaServiceSupportedDevicesInterface) Delete() {
2025-02-01 13:45:16 +13:00
C.QMediaServiceSupportedDevicesInterface_delete(this.h)
2024-11-04 23:15:32 +13: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 *QMediaServiceSupportedDevicesInterface) GoGC() {
runtime.SetFinalizer(this, func(this *QMediaServiceSupportedDevicesInterface) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QMediaServiceDefaultDeviceInterface struct {
h *C.QMediaServiceDefaultDeviceInterface
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceDefaultDeviceInterface) cPointer() *C.QMediaServiceDefaultDeviceInterface {
if this == nil {
return nil
}
return this.h
}
func (this *QMediaServiceDefaultDeviceInterface) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 19:29:06 +13:00
// newQMediaServiceDefaultDeviceInterface constructs the type using only CGO pointers.
2024-11-04 23:15:32 +13:00
func newQMediaServiceDefaultDeviceInterface(h *C.QMediaServiceDefaultDeviceInterface) *QMediaServiceDefaultDeviceInterface {
if h == nil {
return nil
}
2024-12-07 17:15:57 +13:00
2024-11-04 23:15:32 +13:00
return &QMediaServiceDefaultDeviceInterface{h: h}
}
2024-11-19 19:29:06 +13:00
// UnsafeNewQMediaServiceDefaultDeviceInterface constructs the type using only unsafe pointers.
2024-11-04 23:15:32 +13:00
func UnsafeNewQMediaServiceDefaultDeviceInterface(h unsafe.Pointer) *QMediaServiceDefaultDeviceInterface {
2024-12-07 17:15:57 +13:00
return newQMediaServiceDefaultDeviceInterface((*C.QMediaServiceDefaultDeviceInterface)(h))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceDefaultDeviceInterface) DefaultDevice(service []byte) []byte {
service_alias := C.struct_miqt_string{}
if len(service) > 0 {
service_alias.data = (*C.char)(unsafe.Pointer(&service[0]))
} else {
service_alias.data = (*C.char)(unsafe.Pointer(nil))
}
2024-11-04 23:15:32 +13:00
service_alias.len = C.size_t(len(service))
2025-02-01 13:45:16 +13:00
var _bytearray C.struct_miqt_string = C.QMediaServiceDefaultDeviceInterface_defaultDevice(this.h, service_alias)
2024-11-04 23:15:32 +13:00
_ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len)))
C.free(unsafe.Pointer(_bytearray.data))
return _ret
}
func (this *QMediaServiceDefaultDeviceInterface) OperatorAssign(param1 *QMediaServiceDefaultDeviceInterface) {
2025-02-01 13:45:16 +13:00
C.QMediaServiceDefaultDeviceInterface_operatorAssign(this.h, param1.cPointer())
2024-11-04 23:15:32 +13:00
}
// Delete this object from C++ memory.
func (this *QMediaServiceDefaultDeviceInterface) Delete() {
2025-02-01 13:45:16 +13:00
C.QMediaServiceDefaultDeviceInterface_delete(this.h)
2024-11-04 23:15:32 +13: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 *QMediaServiceDefaultDeviceInterface) GoGC() {
runtime.SetFinalizer(this, func(this *QMediaServiceDefaultDeviceInterface) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QMediaServiceCameraInfoInterface struct {
h *C.QMediaServiceCameraInfoInterface
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceCameraInfoInterface) cPointer() *C.QMediaServiceCameraInfoInterface {
if this == nil {
return nil
}
return this.h
}
func (this *QMediaServiceCameraInfoInterface) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 19:29:06 +13:00
// newQMediaServiceCameraInfoInterface constructs the type using only CGO pointers.
2024-11-04 23:15:32 +13:00
func newQMediaServiceCameraInfoInterface(h *C.QMediaServiceCameraInfoInterface) *QMediaServiceCameraInfoInterface {
if h == nil {
return nil
}
2024-12-07 17:15:57 +13:00
2024-11-04 23:15:32 +13:00
return &QMediaServiceCameraInfoInterface{h: h}
}
2024-11-19 19:29:06 +13:00
// UnsafeNewQMediaServiceCameraInfoInterface constructs the type using only unsafe pointers.
2024-11-04 23:15:32 +13:00
func UnsafeNewQMediaServiceCameraInfoInterface(h unsafe.Pointer) *QMediaServiceCameraInfoInterface {
2024-12-07 17:15:57 +13:00
return newQMediaServiceCameraInfoInterface((*C.QMediaServiceCameraInfoInterface)(h))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceCameraInfoInterface) CameraPosition(device []byte) QCamera__Position {
device_alias := C.struct_miqt_string{}
if len(device) > 0 {
device_alias.data = (*C.char)(unsafe.Pointer(&device[0]))
} else {
device_alias.data = (*C.char)(unsafe.Pointer(nil))
}
2024-11-04 23:15:32 +13:00
device_alias.len = C.size_t(len(device))
2025-02-01 13:45:16 +13:00
return (QCamera__Position)(C.QMediaServiceCameraInfoInterface_cameraPosition(this.h, device_alias))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceCameraInfoInterface) CameraOrientation(device []byte) int {
device_alias := C.struct_miqt_string{}
if len(device) > 0 {
device_alias.data = (*C.char)(unsafe.Pointer(&device[0]))
} else {
device_alias.data = (*C.char)(unsafe.Pointer(nil))
}
2024-11-04 23:15:32 +13:00
device_alias.len = C.size_t(len(device))
2025-02-01 13:45:16 +13:00
return (int)(C.QMediaServiceCameraInfoInterface_cameraOrientation(this.h, device_alias))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceCameraInfoInterface) OperatorAssign(param1 *QMediaServiceCameraInfoInterface) {
2025-02-01 13:45:16 +13:00
C.QMediaServiceCameraInfoInterface_operatorAssign(this.h, param1.cPointer())
2024-11-04 23:15:32 +13:00
}
// Delete this object from C++ memory.
func (this *QMediaServiceCameraInfoInterface) Delete() {
2025-02-01 13:45:16 +13:00
C.QMediaServiceCameraInfoInterface_delete(this.h)
2024-11-04 23:15:32 +13: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 *QMediaServiceCameraInfoInterface) GoGC() {
runtime.SetFinalizer(this, func(this *QMediaServiceCameraInfoInterface) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QMediaServiceFeaturesInterface struct {
h *C.QMediaServiceFeaturesInterface
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceFeaturesInterface) cPointer() *C.QMediaServiceFeaturesInterface {
if this == nil {
return nil
}
return this.h
}
func (this *QMediaServiceFeaturesInterface) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 19:29:06 +13:00
// newQMediaServiceFeaturesInterface constructs the type using only CGO pointers.
2024-11-04 23:15:32 +13:00
func newQMediaServiceFeaturesInterface(h *C.QMediaServiceFeaturesInterface) *QMediaServiceFeaturesInterface {
if h == nil {
return nil
}
2024-12-07 17:15:57 +13:00
2024-11-04 23:15:32 +13:00
return &QMediaServiceFeaturesInterface{h: h}
}
2024-11-19 19:29:06 +13:00
// UnsafeNewQMediaServiceFeaturesInterface constructs the type using only unsafe pointers.
2024-11-04 23:15:32 +13:00
func UnsafeNewQMediaServiceFeaturesInterface(h unsafe.Pointer) *QMediaServiceFeaturesInterface {
2024-12-07 17:15:57 +13:00
return newQMediaServiceFeaturesInterface((*C.QMediaServiceFeaturesInterface)(h))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceFeaturesInterface) SupportedFeatures(service []byte) QMediaServiceProviderHint__Feature {
service_alias := C.struct_miqt_string{}
if len(service) > 0 {
service_alias.data = (*C.char)(unsafe.Pointer(&service[0]))
} else {
service_alias.data = (*C.char)(unsafe.Pointer(nil))
}
2024-11-04 23:15:32 +13:00
service_alias.len = C.size_t(len(service))
2025-02-01 13:45:16 +13:00
return (QMediaServiceProviderHint__Feature)(C.QMediaServiceFeaturesInterface_supportedFeatures(this.h, service_alias))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceFeaturesInterface) OperatorAssign(param1 *QMediaServiceFeaturesInterface) {
2025-02-01 13:45:16 +13:00
C.QMediaServiceFeaturesInterface_operatorAssign(this.h, param1.cPointer())
2024-11-04 23:15:32 +13:00
}
// Delete this object from C++ memory.
func (this *QMediaServiceFeaturesInterface) Delete() {
2025-02-01 13:45:16 +13:00
C.QMediaServiceFeaturesInterface_delete(this.h)
2024-11-04 23:15:32 +13: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 *QMediaServiceFeaturesInterface) GoGC() {
runtime.SetFinalizer(this, func(this *QMediaServiceFeaturesInterface) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QMediaServiceProviderPlugin struct {
h *C.QMediaServiceProviderPlugin
2024-11-04 23:15:32 +13:00
*qt.QObject
*QMediaServiceProviderFactoryInterface
}
func (this *QMediaServiceProviderPlugin) cPointer() *C.QMediaServiceProviderPlugin {
if this == nil {
return nil
}
return this.h
}
func (this *QMediaServiceProviderPlugin) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 19:29:06 +13:00
// newQMediaServiceProviderPlugin constructs the type using only CGO pointers.
2024-12-07 17:15:57 +13:00
func newQMediaServiceProviderPlugin(h *C.QMediaServiceProviderPlugin) *QMediaServiceProviderPlugin {
2024-11-04 23:15:32 +13:00
if h == nil {
return nil
}
2024-12-07 17:15:57 +13:00
var outptr_QObject *C.QObject = nil
var outptr_QMediaServiceProviderFactoryInterface *C.QMediaServiceProviderFactoryInterface = nil
C.QMediaServiceProviderPlugin_virtbase(h, &outptr_QObject, &outptr_QMediaServiceProviderFactoryInterface)
2024-11-19 19:29:06 +13:00
return &QMediaServiceProviderPlugin{h: h,
2024-12-07 17:15:57 +13:00
QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject)),
QMediaServiceProviderFactoryInterface: newQMediaServiceProviderFactoryInterface(outptr_QMediaServiceProviderFactoryInterface)}
2024-11-04 23:15:32 +13:00
}
2024-11-19 19:29:06 +13:00
// UnsafeNewQMediaServiceProviderPlugin constructs the type using only unsafe pointers.
2024-12-07 17:15:57 +13:00
func UnsafeNewQMediaServiceProviderPlugin(h unsafe.Pointer) *QMediaServiceProviderPlugin {
return newQMediaServiceProviderPlugin((*C.QMediaServiceProviderPlugin)(h))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceProviderPlugin) MetaObject() *qt.QMetaObject {
2025-02-01 13:45:16 +13:00
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QMediaServiceProviderPlugin_metaObject(this.h)))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceProviderPlugin) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
2025-02-01 13:45:16 +13:00
return (unsafe.Pointer)(C.QMediaServiceProviderPlugin_metacast(this.h, param1_Cstring))
2024-11-04 23:15:32 +13:00
}
func QMediaServiceProviderPlugin_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QMediaServiceProviderPlugin_tr(s_Cstring)
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QMediaServiceProviderPlugin_TrUtf8(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QMediaServiceProviderPlugin_trUtf8(s_Cstring)
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QMediaServiceProviderPlugin) Create(key string) *QMediaService {
key_ms := C.struct_miqt_string{}
key_ms.data = C.CString(key)
key_ms.len = C.size_t(len(key))
defer C.free(unsafe.Pointer(key_ms.data))
2025-02-01 13:45:16 +13:00
return newQMediaService(C.QMediaServiceProviderPlugin_create(this.h, key_ms))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaServiceProviderPlugin) Release(service *QMediaService) {
2025-02-01 13:45:16 +13:00
C.QMediaServiceProviderPlugin_release(this.h, service.cPointer())
2024-11-04 23:15:32 +13:00
}
func QMediaServiceProviderPlugin_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))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QMediaServiceProviderPlugin_tr2(s_Cstring, c_Cstring)
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QMediaServiceProviderPlugin_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))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QMediaServiceProviderPlugin_tr3(s_Cstring, c_Cstring, (C.int)(n))
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QMediaServiceProviderPlugin_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))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QMediaServiceProviderPlugin_trUtf82(s_Cstring, c_Cstring)
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QMediaServiceProviderPlugin_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))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QMediaServiceProviderPlugin_trUtf83(s_Cstring, c_Cstring, (C.int)(n))
2024-11-04 23:15:32 +13:00
_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 *QMediaServiceProviderPlugin) Delete() {
2025-02-01 13:45:16 +13:00
C.QMediaServiceProviderPlugin_delete(this.h)
2024-11-04 23:15:32 +13: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 *QMediaServiceProviderPlugin) GoGC() {
runtime.SetFinalizer(this, func(this *QMediaServiceProviderPlugin) {
this.Delete()
runtime.KeepAlive(this.h)
})
}