mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 17:08:38 +00:00
186 lines
6.1 KiB
C++
186 lines
6.1 KiB
C++
#include <QAudioInput>
|
|
#include <QAudioOutput>
|
|
#include <QCamera>
|
|
#include <QImageCapture>
|
|
#include <QMediaCaptureSession>
|
|
#include <QMediaRecorder>
|
|
#include <QMetaObject>
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <QByteArray>
|
|
#include <cstring>
|
|
#include <QVideoSink>
|
|
#include <qmediacapturesession.h>
|
|
#include "gen_qmediacapturesession.h"
|
|
#include "_cgo_export.h"
|
|
|
|
QMediaCaptureSession* QMediaCaptureSession_new() {
|
|
return new QMediaCaptureSession();
|
|
}
|
|
|
|
QMediaCaptureSession* QMediaCaptureSession_new2(QObject* parent) {
|
|
return new QMediaCaptureSession(parent);
|
|
}
|
|
|
|
QMetaObject* QMediaCaptureSession_MetaObject(const QMediaCaptureSession* self) {
|
|
return (QMetaObject*) self->metaObject();
|
|
}
|
|
|
|
void* QMediaCaptureSession_Metacast(QMediaCaptureSession* self, const char* param1) {
|
|
return self->qt_metacast(param1);
|
|
}
|
|
|
|
struct miqt_string QMediaCaptureSession_Tr(const char* s) {
|
|
QString _ret = QMediaCaptureSession::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;
|
|
}
|
|
|
|
QAudioInput* QMediaCaptureSession_AudioInput(const QMediaCaptureSession* self) {
|
|
return self->audioInput();
|
|
}
|
|
|
|
void QMediaCaptureSession_SetAudioInput(QMediaCaptureSession* self, QAudioInput* input) {
|
|
self->setAudioInput(input);
|
|
}
|
|
|
|
QCamera* QMediaCaptureSession_Camera(const QMediaCaptureSession* self) {
|
|
return self->camera();
|
|
}
|
|
|
|
void QMediaCaptureSession_SetCamera(QMediaCaptureSession* self, QCamera* camera) {
|
|
self->setCamera(camera);
|
|
}
|
|
|
|
QImageCapture* QMediaCaptureSession_ImageCapture(QMediaCaptureSession* self) {
|
|
return self->imageCapture();
|
|
}
|
|
|
|
void QMediaCaptureSession_SetImageCapture(QMediaCaptureSession* self, QImageCapture* imageCapture) {
|
|
self->setImageCapture(imageCapture);
|
|
}
|
|
|
|
QMediaRecorder* QMediaCaptureSession_Recorder(QMediaCaptureSession* self) {
|
|
return self->recorder();
|
|
}
|
|
|
|
void QMediaCaptureSession_SetRecorder(QMediaCaptureSession* self, QMediaRecorder* recorder) {
|
|
self->setRecorder(recorder);
|
|
}
|
|
|
|
void QMediaCaptureSession_SetVideoOutput(QMediaCaptureSession* self, QObject* output) {
|
|
self->setVideoOutput(output);
|
|
}
|
|
|
|
QObject* QMediaCaptureSession_VideoOutput(const QMediaCaptureSession* self) {
|
|
return self->videoOutput();
|
|
}
|
|
|
|
void QMediaCaptureSession_SetVideoSink(QMediaCaptureSession* self, QVideoSink* sink) {
|
|
self->setVideoSink(sink);
|
|
}
|
|
|
|
QVideoSink* QMediaCaptureSession_VideoSink(const QMediaCaptureSession* self) {
|
|
return self->videoSink();
|
|
}
|
|
|
|
void QMediaCaptureSession_SetAudioOutput(QMediaCaptureSession* self, QAudioOutput* output) {
|
|
self->setAudioOutput(output);
|
|
}
|
|
|
|
QAudioOutput* QMediaCaptureSession_AudioOutput(const QMediaCaptureSession* self) {
|
|
return self->audioOutput();
|
|
}
|
|
|
|
void QMediaCaptureSession_AudioInputChanged(QMediaCaptureSession* self) {
|
|
self->audioInputChanged();
|
|
}
|
|
|
|
void QMediaCaptureSession_connect_AudioInputChanged(QMediaCaptureSession* self, intptr_t slot) {
|
|
QMediaCaptureSession::connect(self, static_cast<void (QMediaCaptureSession::*)()>(&QMediaCaptureSession::audioInputChanged), self, [=]() {
|
|
miqt_exec_callback_QMediaCaptureSession_AudioInputChanged(slot);
|
|
});
|
|
}
|
|
|
|
void QMediaCaptureSession_CameraChanged(QMediaCaptureSession* self) {
|
|
self->cameraChanged();
|
|
}
|
|
|
|
void QMediaCaptureSession_connect_CameraChanged(QMediaCaptureSession* self, intptr_t slot) {
|
|
QMediaCaptureSession::connect(self, static_cast<void (QMediaCaptureSession::*)()>(&QMediaCaptureSession::cameraChanged), self, [=]() {
|
|
miqt_exec_callback_QMediaCaptureSession_CameraChanged(slot);
|
|
});
|
|
}
|
|
|
|
void QMediaCaptureSession_ImageCaptureChanged(QMediaCaptureSession* self) {
|
|
self->imageCaptureChanged();
|
|
}
|
|
|
|
void QMediaCaptureSession_connect_ImageCaptureChanged(QMediaCaptureSession* self, intptr_t slot) {
|
|
QMediaCaptureSession::connect(self, static_cast<void (QMediaCaptureSession::*)()>(&QMediaCaptureSession::imageCaptureChanged), self, [=]() {
|
|
miqt_exec_callback_QMediaCaptureSession_ImageCaptureChanged(slot);
|
|
});
|
|
}
|
|
|
|
void QMediaCaptureSession_RecorderChanged(QMediaCaptureSession* self) {
|
|
self->recorderChanged();
|
|
}
|
|
|
|
void QMediaCaptureSession_connect_RecorderChanged(QMediaCaptureSession* self, intptr_t slot) {
|
|
QMediaCaptureSession::connect(self, static_cast<void (QMediaCaptureSession::*)()>(&QMediaCaptureSession::recorderChanged), self, [=]() {
|
|
miqt_exec_callback_QMediaCaptureSession_RecorderChanged(slot);
|
|
});
|
|
}
|
|
|
|
void QMediaCaptureSession_VideoOutputChanged(QMediaCaptureSession* self) {
|
|
self->videoOutputChanged();
|
|
}
|
|
|
|
void QMediaCaptureSession_connect_VideoOutputChanged(QMediaCaptureSession* self, intptr_t slot) {
|
|
QMediaCaptureSession::connect(self, static_cast<void (QMediaCaptureSession::*)()>(&QMediaCaptureSession::videoOutputChanged), self, [=]() {
|
|
miqt_exec_callback_QMediaCaptureSession_VideoOutputChanged(slot);
|
|
});
|
|
}
|
|
|
|
void QMediaCaptureSession_AudioOutputChanged(QMediaCaptureSession* self) {
|
|
self->audioOutputChanged();
|
|
}
|
|
|
|
void QMediaCaptureSession_connect_AudioOutputChanged(QMediaCaptureSession* self, intptr_t slot) {
|
|
QMediaCaptureSession::connect(self, static_cast<void (QMediaCaptureSession::*)()>(&QMediaCaptureSession::audioOutputChanged), self, [=]() {
|
|
miqt_exec_callback_QMediaCaptureSession_AudioOutputChanged(slot);
|
|
});
|
|
}
|
|
|
|
struct miqt_string QMediaCaptureSession_Tr2(const char* s, const char* c) {
|
|
QString _ret = QMediaCaptureSession::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 QMediaCaptureSession_Tr3(const char* s, const char* c, int n) {
|
|
QString _ret = QMediaCaptureSession::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;
|
|
}
|
|
|
|
void QMediaCaptureSession_Delete(QMediaCaptureSession* self) {
|
|
delete self;
|
|
}
|
|
|