mirror of
https://github.com/mappu/miqt.git
synced 2024-12-23 01:18:37 +00:00
183 lines
7.1 KiB
C++
183 lines
7.1 KiB
C++
#include <QList>
|
|
#include <QMetaObject>
|
|
#include <QSize>
|
|
#include <QString>
|
|
#include <QByteArray>
|
|
#include <cstring>
|
|
#include <QVideoEncoderSettings>
|
|
#include <QVideoEncoderSettingsControl>
|
|
#include <qvideoencodersettingscontrol.h>
|
|
#include "gen_qvideoencodersettingscontrol.h"
|
|
#include "_cgo_export.h"
|
|
|
|
QMetaObject* QVideoEncoderSettingsControl_MetaObject(const QVideoEncoderSettingsControl* self) {
|
|
return (QMetaObject*) self->metaObject();
|
|
}
|
|
|
|
void* QVideoEncoderSettingsControl_Metacast(QVideoEncoderSettingsControl* self, const char* param1) {
|
|
return self->qt_metacast(param1);
|
|
}
|
|
|
|
struct miqt_string QVideoEncoderSettingsControl_Tr(const char* s) {
|
|
QString _ret = QVideoEncoderSettingsControl::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 QVideoEncoderSettingsControl_TrUtf8(const char* s) {
|
|
QString _ret = QVideoEncoderSettingsControl::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;
|
|
}
|
|
|
|
struct miqt_array /* of QSize* */ QVideoEncoderSettingsControl_SupportedResolutions(const QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings) {
|
|
QList<QSize> _ret = self->supportedResolutions(*settings);
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
QSize** _arr = static_cast<QSize**>(malloc(sizeof(QSize*) * _ret.length()));
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
_arr[i] = new QSize(_ret[i]);
|
|
}
|
|
struct miqt_array _out;
|
|
_out.len = _ret.length();
|
|
_out.data = static_cast<void*>(_arr);
|
|
return _out;
|
|
}
|
|
|
|
struct miqt_array /* of double */ QVideoEncoderSettingsControl_SupportedFrameRates(const QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings) {
|
|
QList<qreal> _ret = self->supportedFrameRates(*settings);
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
double* _arr = static_cast<double*>(malloc(sizeof(double) * _ret.length()));
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
_arr[i] = _ret[i];
|
|
}
|
|
struct miqt_array _out;
|
|
_out.len = _ret.length();
|
|
_out.data = static_cast<void*>(_arr);
|
|
return _out;
|
|
}
|
|
|
|
struct miqt_array /* of struct miqt_string */ QVideoEncoderSettingsControl_SupportedVideoCodecs(const QVideoEncoderSettingsControl* self) {
|
|
QStringList _ret = self->supportedVideoCodecs();
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
QString _lv_ret = _ret[i];
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray _lv_b = _lv_ret.toUtf8();
|
|
struct miqt_string _lv_ms;
|
|
_lv_ms.len = _lv_b.length();
|
|
_lv_ms.data = static_cast<char*>(malloc(_lv_ms.len));
|
|
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
|
_arr[i] = _lv_ms;
|
|
}
|
|
struct miqt_array _out;
|
|
_out.len = _ret.length();
|
|
_out.data = static_cast<void*>(_arr);
|
|
return _out;
|
|
}
|
|
|
|
struct miqt_string QVideoEncoderSettingsControl_VideoCodecDescription(const QVideoEncoderSettingsControl* self, struct miqt_string codec) {
|
|
QString codec_QString = QString::fromUtf8(codec.data, codec.len);
|
|
QString _ret = self->videoCodecDescription(codec_QString);
|
|
// 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;
|
|
}
|
|
|
|
QVideoEncoderSettings* QVideoEncoderSettingsControl_VideoSettings(const QVideoEncoderSettingsControl* self) {
|
|
return new QVideoEncoderSettings(self->videoSettings());
|
|
}
|
|
|
|
void QVideoEncoderSettingsControl_SetVideoSettings(QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings) {
|
|
self->setVideoSettings(*settings);
|
|
}
|
|
|
|
struct miqt_string QVideoEncoderSettingsControl_Tr2(const char* s, const char* c) {
|
|
QString _ret = QVideoEncoderSettingsControl::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 QVideoEncoderSettingsControl_Tr3(const char* s, const char* c, int n) {
|
|
QString _ret = QVideoEncoderSettingsControl::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 QVideoEncoderSettingsControl_TrUtf82(const char* s, const char* c) {
|
|
QString _ret = QVideoEncoderSettingsControl::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 QVideoEncoderSettingsControl_TrUtf83(const char* s, const char* c, int n) {
|
|
QString _ret = QVideoEncoderSettingsControl::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;
|
|
}
|
|
|
|
struct miqt_array /* of QSize* */ QVideoEncoderSettingsControl_SupportedResolutions2(const QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings, bool* continuous) {
|
|
QList<QSize> _ret = self->supportedResolutions(*settings, continuous);
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
QSize** _arr = static_cast<QSize**>(malloc(sizeof(QSize*) * _ret.length()));
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
_arr[i] = new QSize(_ret[i]);
|
|
}
|
|
struct miqt_array _out;
|
|
_out.len = _ret.length();
|
|
_out.data = static_cast<void*>(_arr);
|
|
return _out;
|
|
}
|
|
|
|
struct miqt_array /* of double */ QVideoEncoderSettingsControl_SupportedFrameRates2(const QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings, bool* continuous) {
|
|
QList<qreal> _ret = self->supportedFrameRates(*settings, continuous);
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
double* _arr = static_cast<double*>(malloc(sizeof(double) * _ret.length()));
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
_arr[i] = _ret[i];
|
|
}
|
|
struct miqt_array _out;
|
|
_out.len = _ret.length();
|
|
_out.data = static_cast<void*>(_arr);
|
|
return _out;
|
|
}
|
|
|
|
void QVideoEncoderSettingsControl_Delete(QVideoEncoderSettingsControl* self) {
|
|
delete self;
|
|
}
|
|
|