#include #include #include #include #include #include #include #include #define WORKAROUND_INNER_CLASS_DEFINITION_QVideoFrame__PaintOptions #include #include #include "gen_qvideoframe.h" #include "_cgo_export.h" QVideoFrame* QVideoFrame_new() { return new QVideoFrame(); } QVideoFrame* QVideoFrame_new2(QVideoFrameFormat* format) { return new QVideoFrame(*format); } QVideoFrame* QVideoFrame_new3(QVideoFrame* other) { return new QVideoFrame(*other); } void QVideoFrame_Swap(QVideoFrame* self, QVideoFrame* other) { self->swap(*other); } void QVideoFrame_OperatorAssign(QVideoFrame* self, QVideoFrame* other) { self->operator=(*other); } bool QVideoFrame_OperatorEqual(const QVideoFrame* self, QVideoFrame* other) { return self->operator==(*other); } bool QVideoFrame_OperatorNotEqual(const QVideoFrame* self, QVideoFrame* other) { return self->operator!=(*other); } bool QVideoFrame_IsValid(const QVideoFrame* self) { return self->isValid(); } int QVideoFrame_PixelFormat(const QVideoFrame* self) { QVideoFrameFormat::PixelFormat _ret = self->pixelFormat(); return static_cast(_ret); } QVideoFrameFormat* QVideoFrame_SurfaceFormat(const QVideoFrame* self) { return new QVideoFrameFormat(self->surfaceFormat()); } int QVideoFrame_HandleType(const QVideoFrame* self) { QVideoFrame::HandleType _ret = self->handleType(); return static_cast(_ret); } QSize* QVideoFrame_Size(const QVideoFrame* self) { return new QSize(self->size()); } int QVideoFrame_Width(const QVideoFrame* self) { return self->width(); } int QVideoFrame_Height(const QVideoFrame* self) { return self->height(); } bool QVideoFrame_IsMapped(const QVideoFrame* self) { return self->isMapped(); } bool QVideoFrame_IsReadable(const QVideoFrame* self) { return self->isReadable(); } bool QVideoFrame_IsWritable(const QVideoFrame* self) { return self->isWritable(); } int QVideoFrame_MapMode(const QVideoFrame* self) { QVideoFrame::MapMode _ret = self->mapMode(); return static_cast(_ret); } bool QVideoFrame_Map(QVideoFrame* self, int mode) { return self->map(static_cast(mode)); } void QVideoFrame_Unmap(QVideoFrame* self) { self->unmap(); } int QVideoFrame_BytesPerLine(const QVideoFrame* self, int plane) { return self->bytesPerLine(static_cast(plane)); } unsigned char* QVideoFrame_Bits(QVideoFrame* self, int plane) { uchar* _ret = self->bits(static_cast(plane)); return static_cast(_ret); } const unsigned char* QVideoFrame_BitsWithPlane(const QVideoFrame* self, int plane) { const uchar* _ret = self->bits(static_cast(plane)); return static_cast(_ret); } int QVideoFrame_MappedBytes(const QVideoFrame* self, int plane) { return self->mappedBytes(static_cast(plane)); } int QVideoFrame_PlaneCount(const QVideoFrame* self) { return self->planeCount(); } long long QVideoFrame_StartTime(const QVideoFrame* self) { qint64 _ret = self->startTime(); return static_cast(_ret); } void QVideoFrame_SetStartTime(QVideoFrame* self, long long time) { self->setStartTime(static_cast(time)); } long long QVideoFrame_EndTime(const QVideoFrame* self) { qint64 _ret = self->endTime(); return static_cast(_ret); } void QVideoFrame_SetEndTime(QVideoFrame* self, long long time) { self->setEndTime(static_cast(time)); } void QVideoFrame_SetRotationAngle(QVideoFrame* self, int rotationAngle) { self->setRotationAngle(static_cast(rotationAngle)); } int QVideoFrame_RotationAngle(const QVideoFrame* self) { QVideoFrame::RotationAngle _ret = self->rotationAngle(); return static_cast(_ret); } void QVideoFrame_SetMirrored(QVideoFrame* self, bool mirrored) { self->setMirrored(mirrored); } bool QVideoFrame_Mirrored(const QVideoFrame* self) { return self->mirrored(); } QImage* QVideoFrame_ToImage(const QVideoFrame* self) { return new QImage(self->toImage()); } struct miqt_string QVideoFrame_SubtitleText(const QVideoFrame* self) { QString _ret = self->subtitleText(); // 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; } void QVideoFrame_SetSubtitleText(QVideoFrame* self, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); self->setSubtitleText(text_QString); } void QVideoFrame_Paint(QVideoFrame* self, QPainter* painter, QRectF* rect, QVideoFrame__PaintOptions* options) { self->paint(painter, *rect, *options); } void QVideoFrame_Delete(QVideoFrame* self) { delete self; } void QVideoFrame__PaintOptions_Delete(QVideoFrame__PaintOptions* self) { delete self; }