miqt/qt/multimedia/gen_qvideoprobe.cpp

135 lines
4.1 KiB
C++

#include <QMediaObject>
#include <QMediaRecorder>
#include <QMetaObject>
#include <QObject>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QVideoFrame>
#include <QVideoProbe>
#include <qvideoprobe.h>
#include "gen_qvideoprobe.h"
#include "_cgo_export.h"
QVideoProbe* QVideoProbe_new() {
return new QVideoProbe();
}
QVideoProbe* QVideoProbe_new2(QObject* parent) {
return new QVideoProbe(parent);
}
QMetaObject* QVideoProbe_MetaObject(const QVideoProbe* self) {
return (QMetaObject*) self->metaObject();
}
void* QVideoProbe_Metacast(QVideoProbe* self, const char* param1) {
return self->qt_metacast(param1);
}
struct miqt_string QVideoProbe_Tr(const char* s) {
QString _ret = QVideoProbe::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<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string QVideoProbe_TrUtf8(const char* s) {
QString _ret = QVideoProbe::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<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
bool QVideoProbe_SetSource(QVideoProbe* self, QMediaObject* source) {
return self->setSource(source);
}
bool QVideoProbe_SetSourceWithSource(QVideoProbe* self, QMediaRecorder* source) {
return self->setSource(source);
}
bool QVideoProbe_IsActive(const QVideoProbe* self) {
return self->isActive();
}
void QVideoProbe_VideoFrameProbed(QVideoProbe* self, QVideoFrame* frame) {
self->videoFrameProbed(*frame);
}
void QVideoProbe_connect_VideoFrameProbed(QVideoProbe* self, intptr_t slot) {
QVideoProbe::connect(self, static_cast<void (QVideoProbe::*)(const QVideoFrame&)>(&QVideoProbe::videoFrameProbed), self, [=](const QVideoFrame& frame) {
const QVideoFrame& frame_ret = frame;
// Cast returned reference into pointer
QVideoFrame* sigval1 = const_cast<QVideoFrame*>(&frame_ret);
miqt_exec_callback_QVideoProbe_VideoFrameProbed(slot, sigval1);
});
}
void QVideoProbe_Flush(QVideoProbe* self) {
self->flush();
}
void QVideoProbe_connect_Flush(QVideoProbe* self, intptr_t slot) {
QVideoProbe::connect(self, static_cast<void (QVideoProbe::*)()>(&QVideoProbe::flush), self, [=]() {
miqt_exec_callback_QVideoProbe_Flush(slot);
});
}
struct miqt_string QVideoProbe_Tr2(const char* s, const char* c) {
QString _ret = QVideoProbe::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<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string QVideoProbe_Tr3(const char* s, const char* c, int n) {
QString _ret = QVideoProbe::tr(s, c, static_cast<int>(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<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string QVideoProbe_TrUtf82(const char* s, const char* c) {
QString _ret = QVideoProbe::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<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string QVideoProbe_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QVideoProbe::trUtf8(s, c, static_cast<int>(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<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
void QVideoProbe_Delete(QVideoProbe* self) {
delete self;
}