miqt/qt6/multimedia/gen_qvideoframeformat.cpp

208 lines
6.4 KiB
C++
Raw Normal View History

2024-11-04 23:15:32 +13:00
#include <QRect>
#include <QSize>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QVideoFrameFormat>
#include <qvideoframeformat.h>
#include "gen_qvideoframeformat.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
} /* extern C */
#endif
2024-11-04 23:15:32 +13:00
2024-12-07 17:15:57 +13:00
QVideoFrameFormat* QVideoFrameFormat_new() {
return new QVideoFrameFormat();
2024-11-04 23:15:32 +13:00
}
2024-12-07 17:15:57 +13:00
QVideoFrameFormat* QVideoFrameFormat_new2(QSize* size, int pixelFormat) {
return new QVideoFrameFormat(*size, static_cast<QVideoFrameFormat::PixelFormat>(pixelFormat));
2024-11-04 23:15:32 +13:00
}
2024-12-07 17:15:57 +13:00
QVideoFrameFormat* QVideoFrameFormat_new3(QVideoFrameFormat* format) {
return new QVideoFrameFormat(*format);
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
void QVideoFrameFormat_swap(QVideoFrameFormat* self, QVideoFrameFormat* other) {
2024-11-04 23:15:32 +13:00
self->swap(*other);
}
2025-02-01 13:45:16 +13:00
void QVideoFrameFormat_detach(QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
self->detach();
}
2025-02-01 13:45:16 +13:00
void QVideoFrameFormat_operatorAssign(QVideoFrameFormat* self, QVideoFrameFormat* format) {
2024-11-04 23:15:32 +13:00
self->operator=(*format);
}
2025-02-01 13:45:16 +13:00
bool QVideoFrameFormat_operatorEqual(const QVideoFrameFormat* self, QVideoFrameFormat* format) {
return (*self == *format);
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
bool QVideoFrameFormat_operatorNotEqual(const QVideoFrameFormat* self, QVideoFrameFormat* format) {
return (*self != *format);
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
bool QVideoFrameFormat_isValid(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
return self->isValid();
}
2025-02-01 13:45:16 +13:00
int QVideoFrameFormat_pixelFormat(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
QVideoFrameFormat::PixelFormat _ret = self->pixelFormat();
return static_cast<int>(_ret);
}
2025-02-01 13:45:16 +13:00
QSize* QVideoFrameFormat_frameSize(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
return new QSize(self->frameSize());
}
2025-02-01 13:45:16 +13:00
void QVideoFrameFormat_setFrameSize(QVideoFrameFormat* self, QSize* size) {
2024-11-04 23:15:32 +13:00
self->setFrameSize(*size);
}
2025-02-01 13:45:16 +13:00
void QVideoFrameFormat_setFrameSize2(QVideoFrameFormat* self, int width, int height) {
2024-11-04 23:15:32 +13:00
self->setFrameSize(static_cast<int>(width), static_cast<int>(height));
}
2025-02-01 13:45:16 +13:00
int QVideoFrameFormat_frameWidth(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
return self->frameWidth();
}
2025-02-01 13:45:16 +13:00
int QVideoFrameFormat_frameHeight(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
return self->frameHeight();
}
2025-02-01 13:45:16 +13:00
int QVideoFrameFormat_planeCount(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
return self->planeCount();
}
2025-02-01 13:45:16 +13:00
QRect* QVideoFrameFormat_viewport(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
return new QRect(self->viewport());
}
2025-02-01 13:45:16 +13:00
void QVideoFrameFormat_setViewport(QVideoFrameFormat* self, QRect* viewport) {
2024-11-04 23:15:32 +13:00
self->setViewport(*viewport);
}
2025-02-01 13:45:16 +13:00
int QVideoFrameFormat_scanLineDirection(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
QVideoFrameFormat::Direction _ret = self->scanLineDirection();
return static_cast<int>(_ret);
}
2025-02-01 13:45:16 +13:00
void QVideoFrameFormat_setScanLineDirection(QVideoFrameFormat* self, int direction) {
2024-11-04 23:15:32 +13:00
self->setScanLineDirection(static_cast<QVideoFrameFormat::Direction>(direction));
}
2025-02-01 13:45:16 +13:00
double QVideoFrameFormat_frameRate(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
qreal _ret = self->frameRate();
return static_cast<double>(_ret);
}
2025-02-01 13:45:16 +13:00
void QVideoFrameFormat_setFrameRate(QVideoFrameFormat* self, double rate) {
2024-11-04 23:15:32 +13:00
self->setFrameRate(static_cast<qreal>(rate));
}
2025-02-01 13:45:16 +13:00
int QVideoFrameFormat_yCbCrColorSpace(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
QVideoFrameFormat::YCbCrColorSpace _ret = self->yCbCrColorSpace();
return static_cast<int>(_ret);
}
2025-02-01 13:45:16 +13:00
void QVideoFrameFormat_setYCbCrColorSpace(QVideoFrameFormat* self, int colorSpace) {
2024-11-04 23:15:32 +13:00
self->setYCbCrColorSpace(static_cast<QVideoFrameFormat::YCbCrColorSpace>(colorSpace));
}
2025-02-01 13:45:16 +13:00
int QVideoFrameFormat_colorSpace(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
QVideoFrameFormat::ColorSpace _ret = self->colorSpace();
return static_cast<int>(_ret);
}
2025-02-01 13:45:16 +13:00
void QVideoFrameFormat_setColorSpace(QVideoFrameFormat* self, int colorSpace) {
2024-11-04 23:15:32 +13:00
self->setColorSpace(static_cast<QVideoFrameFormat::ColorSpace>(colorSpace));
}
2025-02-01 13:45:16 +13:00
int QVideoFrameFormat_colorTransfer(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
QVideoFrameFormat::ColorTransfer _ret = self->colorTransfer();
return static_cast<int>(_ret);
}
2025-02-01 13:45:16 +13:00
void QVideoFrameFormat_setColorTransfer(QVideoFrameFormat* self, int colorTransfer) {
2024-11-04 23:15:32 +13:00
self->setColorTransfer(static_cast<QVideoFrameFormat::ColorTransfer>(colorTransfer));
}
2025-02-01 13:45:16 +13:00
int QVideoFrameFormat_colorRange(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
QVideoFrameFormat::ColorRange _ret = self->colorRange();
return static_cast<int>(_ret);
}
2025-02-01 13:45:16 +13:00
void QVideoFrameFormat_setColorRange(QVideoFrameFormat* self, int range) {
self->setColorRange(static_cast<QVideoFrameFormat::ColorRange>(range));
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
bool QVideoFrameFormat_isMirrored(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
return self->isMirrored();
}
2025-02-01 13:45:16 +13:00
void QVideoFrameFormat_setMirrored(QVideoFrameFormat* self, bool mirrored) {
2024-11-04 23:15:32 +13:00
self->setMirrored(mirrored);
}
2025-02-01 13:45:16 +13:00
struct miqt_string QVideoFrameFormat_vertexShaderFileName(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
QString _ret = self->vertexShaderFileName();
// 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;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QVideoFrameFormat_fragmentShaderFileName(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
QString _ret = self->fragmentShaderFileName();
// 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;
}
2025-02-01 13:45:16 +13:00
float QVideoFrameFormat_maxLuminance(const QVideoFrameFormat* self) {
2024-11-04 23:15:32 +13:00
return self->maxLuminance();
}
2025-02-01 13:45:16 +13:00
void QVideoFrameFormat_setMaxLuminance(QVideoFrameFormat* self, float lum) {
2024-11-04 23:15:32 +13:00
self->setMaxLuminance(static_cast<float>(lum));
}
2025-02-01 13:45:16 +13:00
int QVideoFrameFormat_pixelFormatFromImageFormat(int format) {
2024-11-04 23:15:32 +13:00
QVideoFrameFormat::PixelFormat _ret = QVideoFrameFormat::pixelFormatFromImageFormat(static_cast<QImage::Format>(format));
return static_cast<int>(_ret);
}
2025-02-01 13:45:16 +13:00
int QVideoFrameFormat_imageFormatFromPixelFormat(int format) {
2024-11-04 23:15:32 +13:00
QImage::Format _ret = QVideoFrameFormat::imageFormatFromPixelFormat(static_cast<QVideoFrameFormat::PixelFormat>(format));
return static_cast<int>(_ret);
}
2025-02-01 13:45:16 +13:00
struct miqt_string QVideoFrameFormat_pixelFormatToString(int pixelFormat) {
2024-11-04 23:15:32 +13:00
QString _ret = QVideoFrameFormat::pixelFormatToString(static_cast<QVideoFrameFormat::PixelFormat>(pixelFormat));
// 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;
}
2025-02-01 13:45:16 +13:00
void QVideoFrameFormat_delete(QVideoFrameFormat* self) {
delete self;
2024-11-04 23:15:32 +13:00
}