#include #include #include #include #include #include #include #include #include #include #include "gen_qabstractvideosurface.h" #include "_cgo_export.h" QMetaObject* QAbstractVideoSurface_MetaObject(const QAbstractVideoSurface* self) { return (QMetaObject*) self->metaObject(); } void* QAbstractVideoSurface_Metacast(QAbstractVideoSurface* self, const char* param1) { return self->qt_metacast(param1); } struct miqt_string QAbstractVideoSurface_Tr(const char* s) { QString _ret = QAbstractVideoSurface::tr(s); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } struct miqt_string QAbstractVideoSurface_TrUtf8(const char* s) { QString _ret = QAbstractVideoSurface::trUtf8(s); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } struct miqt_array QAbstractVideoSurface_SupportedPixelFormats(const QAbstractVideoSurface* self) { QList _ret = self->supportedPixelFormats(); // Convert QList<> from C++ memory to manually-managed C memory int* _arr = static_cast(malloc(sizeof(int) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { QVideoFrame::PixelFormat _lv_ret = _ret[i]; _arr[i] = static_cast(_lv_ret); } struct miqt_array _out; _out.len = _ret.length(); _out.data = static_cast(_arr); return _out; } bool QAbstractVideoSurface_IsFormatSupported(const QAbstractVideoSurface* self, QVideoSurfaceFormat* format) { return self->isFormatSupported(*format); } QVideoSurfaceFormat* QAbstractVideoSurface_NearestFormat(const QAbstractVideoSurface* self, QVideoSurfaceFormat* format) { return new QVideoSurfaceFormat(self->nearestFormat(*format)); } QVideoSurfaceFormat* QAbstractVideoSurface_SurfaceFormat(const QAbstractVideoSurface* self) { return new QVideoSurfaceFormat(self->surfaceFormat()); } QSize* QAbstractVideoSurface_NativeResolution(const QAbstractVideoSurface* self) { return new QSize(self->nativeResolution()); } bool QAbstractVideoSurface_Start(QAbstractVideoSurface* self, QVideoSurfaceFormat* format) { return self->start(*format); } void QAbstractVideoSurface_Stop(QAbstractVideoSurface* self) { self->stop(); } bool QAbstractVideoSurface_IsActive(const QAbstractVideoSurface* self) { return self->isActive(); } bool QAbstractVideoSurface_Present(QAbstractVideoSurface* self, QVideoFrame* frame) { return self->present(*frame); } int QAbstractVideoSurface_Error(const QAbstractVideoSurface* self) { QAbstractVideoSurface::Error _ret = self->error(); return static_cast(_ret); } void QAbstractVideoSurface_ActiveChanged(QAbstractVideoSurface* self, bool active) { self->activeChanged(active); } void QAbstractVideoSurface_connect_ActiveChanged(QAbstractVideoSurface* self, intptr_t slot) { QAbstractVideoSurface::connect(self, static_cast(&QAbstractVideoSurface::activeChanged), self, [=](bool active) { bool sigval1 = active; miqt_exec_callback_QAbstractVideoSurface_ActiveChanged(slot, sigval1); }); } void QAbstractVideoSurface_SurfaceFormatChanged(QAbstractVideoSurface* self, QVideoSurfaceFormat* format) { self->surfaceFormatChanged(*format); } void QAbstractVideoSurface_connect_SurfaceFormatChanged(QAbstractVideoSurface* self, intptr_t slot) { QAbstractVideoSurface::connect(self, static_cast(&QAbstractVideoSurface::surfaceFormatChanged), self, [=](const QVideoSurfaceFormat& format) { const QVideoSurfaceFormat& format_ret = format; // Cast returned reference into pointer QVideoSurfaceFormat* sigval1 = const_cast(&format_ret); miqt_exec_callback_QAbstractVideoSurface_SurfaceFormatChanged(slot, sigval1); }); } void QAbstractVideoSurface_SupportedFormatsChanged(QAbstractVideoSurface* self) { self->supportedFormatsChanged(); } void QAbstractVideoSurface_connect_SupportedFormatsChanged(QAbstractVideoSurface* self, intptr_t slot) { QAbstractVideoSurface::connect(self, static_cast(&QAbstractVideoSurface::supportedFormatsChanged), self, [=]() { miqt_exec_callback_QAbstractVideoSurface_SupportedFormatsChanged(slot); }); } void QAbstractVideoSurface_NativeResolutionChanged(QAbstractVideoSurface* self, QSize* resolution) { self->nativeResolutionChanged(*resolution); } void QAbstractVideoSurface_connect_NativeResolutionChanged(QAbstractVideoSurface* self, intptr_t slot) { QAbstractVideoSurface::connect(self, static_cast(&QAbstractVideoSurface::nativeResolutionChanged), self, [=](const QSize& resolution) { const QSize& resolution_ret = resolution; // Cast returned reference into pointer QSize* sigval1 = const_cast(&resolution_ret); miqt_exec_callback_QAbstractVideoSurface_NativeResolutionChanged(slot, sigval1); }); } struct miqt_string QAbstractVideoSurface_Tr2(const char* s, const char* c) { QString _ret = QAbstractVideoSurface::tr(s, c); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } struct miqt_string QAbstractVideoSurface_Tr3(const char* s, const char* c, int n) { QString _ret = QAbstractVideoSurface::tr(s, c, static_cast(n)); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } struct miqt_string QAbstractVideoSurface_TrUtf82(const char* s, const char* c) { QString _ret = QAbstractVideoSurface::trUtf8(s, c); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } struct miqt_string QAbstractVideoSurface_TrUtf83(const char* s, const char* c, int n) { QString _ret = QAbstractVideoSurface::trUtf8(s, c, static_cast(n)); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } struct miqt_array QAbstractVideoSurface_SupportedPixelFormats1(const QAbstractVideoSurface* self, int typeVal) { QList _ret = self->supportedPixelFormats(static_cast(typeVal)); // Convert QList<> from C++ memory to manually-managed C memory int* _arr = static_cast(malloc(sizeof(int) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { QVideoFrame::PixelFormat _lv_ret = _ret[i]; _arr[i] = static_cast(_lv_ret); } struct miqt_array _out; _out.len = _ret.length(); _out.data = static_cast(_arr); return _out; } void QAbstractVideoSurface_Delete(QAbstractVideoSurface* self) { delete self; }