cutego/multimedia/qaudiodecoder.cpp

110 lines
5.3 KiB
C++
Raw Normal View History

2015-10-24 18:18:24 +03:00
#include "qaudiodecoder.h"
#include <QObject>
2015-11-09 20:23:42 +03:00
#include <QMetaObject>
2015-10-24 18:18:24 +03:00
#include <QIODevice>
#include <QString>
#include <QVariant>
#include <QUrl>
#include <QModelIndex>
2015-11-09 20:23:42 +03:00
#include <QAudioFormat>
2015-10-24 18:18:24 +03:00
#include <QAudioDecoder>
#include "_cgo_export.h"
class MyQAudioDecoder: public QAudioDecoder {
public:
void Signal_BufferAvailableChanged(bool available){callbackQAudioDecoderBufferAvailableChanged(this->objectName().toUtf8().data(), available);};
void Signal_BufferReady(){callbackQAudioDecoderBufferReady(this->objectName().toUtf8().data());};
void Signal_Finished(){callbackQAudioDecoderFinished(this->objectName().toUtf8().data());};
void Signal_SourceChanged(){callbackQAudioDecoderSourceChanged(this->objectName().toUtf8().data());};
void Signal_StateChanged(QAudioDecoder::State state){callbackQAudioDecoderStateChanged(this->objectName().toUtf8().data(), state);};
};
2015-11-09 20:23:42 +03:00
char* QAudioDecoder_ErrorString(void* ptr){
2015-10-24 18:18:24 +03:00
return static_cast<QAudioDecoder*>(ptr)->errorString().toUtf8().data();
}
2015-11-09 20:23:42 +03:00
void* QAudioDecoder_NewQAudioDecoder(void* parent){
2015-10-24 18:18:24 +03:00
return new QAudioDecoder(static_cast<QObject*>(parent));
}
2015-11-09 20:23:42 +03:00
int QAudioDecoder_BufferAvailable(void* ptr){
2015-10-24 18:18:24 +03:00
return static_cast<QAudioDecoder*>(ptr)->bufferAvailable();
}
2015-11-09 20:23:42 +03:00
void QAudioDecoder_ConnectBufferAvailableChanged(void* ptr){
2015-10-24 18:18:24 +03:00
QObject::connect(static_cast<QAudioDecoder*>(ptr), static_cast<void (QAudioDecoder::*)(bool)>(&QAudioDecoder::bufferAvailableChanged), static_cast<MyQAudioDecoder*>(ptr), static_cast<void (MyQAudioDecoder::*)(bool)>(&MyQAudioDecoder::Signal_BufferAvailableChanged));;
}
2015-11-09 20:23:42 +03:00
void QAudioDecoder_DisconnectBufferAvailableChanged(void* ptr){
2015-10-24 18:18:24 +03:00
QObject::disconnect(static_cast<QAudioDecoder*>(ptr), static_cast<void (QAudioDecoder::*)(bool)>(&QAudioDecoder::bufferAvailableChanged), static_cast<MyQAudioDecoder*>(ptr), static_cast<void (MyQAudioDecoder::*)(bool)>(&MyQAudioDecoder::Signal_BufferAvailableChanged));;
}
2015-11-09 20:23:42 +03:00
void QAudioDecoder_ConnectBufferReady(void* ptr){
2015-10-24 18:18:24 +03:00
QObject::connect(static_cast<QAudioDecoder*>(ptr), static_cast<void (QAudioDecoder::*)()>(&QAudioDecoder::bufferReady), static_cast<MyQAudioDecoder*>(ptr), static_cast<void (MyQAudioDecoder::*)()>(&MyQAudioDecoder::Signal_BufferReady));;
}
2015-11-09 20:23:42 +03:00
void QAudioDecoder_DisconnectBufferReady(void* ptr){
2015-10-24 18:18:24 +03:00
QObject::disconnect(static_cast<QAudioDecoder*>(ptr), static_cast<void (QAudioDecoder::*)()>(&QAudioDecoder::bufferReady), static_cast<MyQAudioDecoder*>(ptr), static_cast<void (MyQAudioDecoder::*)()>(&MyQAudioDecoder::Signal_BufferReady));;
}
2015-11-09 20:23:42 +03:00
int QAudioDecoder_Error(void* ptr){
2015-10-24 18:18:24 +03:00
return static_cast<QAudioDecoder*>(ptr)->error();
}
2015-11-09 20:23:42 +03:00
void QAudioDecoder_ConnectFinished(void* ptr){
2015-10-24 18:18:24 +03:00
QObject::connect(static_cast<QAudioDecoder*>(ptr), static_cast<void (QAudioDecoder::*)()>(&QAudioDecoder::finished), static_cast<MyQAudioDecoder*>(ptr), static_cast<void (MyQAudioDecoder::*)()>(&MyQAudioDecoder::Signal_Finished));;
}
2015-11-09 20:23:42 +03:00
void QAudioDecoder_DisconnectFinished(void* ptr){
2015-10-24 18:18:24 +03:00
QObject::disconnect(static_cast<QAudioDecoder*>(ptr), static_cast<void (QAudioDecoder::*)()>(&QAudioDecoder::finished), static_cast<MyQAudioDecoder*>(ptr), static_cast<void (MyQAudioDecoder::*)()>(&MyQAudioDecoder::Signal_Finished));;
}
2015-11-09 20:23:42 +03:00
void QAudioDecoder_SetAudioFormat(void* ptr, void* format){
2015-10-24 18:18:24 +03:00
static_cast<QAudioDecoder*>(ptr)->setAudioFormat(*static_cast<QAudioFormat*>(format));
}
2015-11-09 20:23:42 +03:00
void QAudioDecoder_SetSourceDevice(void* ptr, void* device){
2015-10-24 18:18:24 +03:00
static_cast<QAudioDecoder*>(ptr)->setSourceDevice(static_cast<QIODevice*>(device));
}
2015-11-09 20:23:42 +03:00
void QAudioDecoder_SetSourceFilename(void* ptr, char* fileName){
2015-10-24 18:18:24 +03:00
static_cast<QAudioDecoder*>(ptr)->setSourceFilename(QString(fileName));
}
2015-11-09 20:23:42 +03:00
void QAudioDecoder_ConnectSourceChanged(void* ptr){
2015-10-24 18:18:24 +03:00
QObject::connect(static_cast<QAudioDecoder*>(ptr), static_cast<void (QAudioDecoder::*)()>(&QAudioDecoder::sourceChanged), static_cast<MyQAudioDecoder*>(ptr), static_cast<void (MyQAudioDecoder::*)()>(&MyQAudioDecoder::Signal_SourceChanged));;
}
2015-11-09 20:23:42 +03:00
void QAudioDecoder_DisconnectSourceChanged(void* ptr){
2015-10-24 18:18:24 +03:00
QObject::disconnect(static_cast<QAudioDecoder*>(ptr), static_cast<void (QAudioDecoder::*)()>(&QAudioDecoder::sourceChanged), static_cast<MyQAudioDecoder*>(ptr), static_cast<void (MyQAudioDecoder::*)()>(&MyQAudioDecoder::Signal_SourceChanged));;
}
2015-11-09 20:23:42 +03:00
void* QAudioDecoder_SourceDevice(void* ptr){
2015-10-24 18:18:24 +03:00
return static_cast<QAudioDecoder*>(ptr)->sourceDevice();
}
2015-11-09 20:23:42 +03:00
char* QAudioDecoder_SourceFilename(void* ptr){
2015-10-24 18:18:24 +03:00
return static_cast<QAudioDecoder*>(ptr)->sourceFilename().toUtf8().data();
}
2015-11-09 20:23:42 +03:00
void QAudioDecoder_Start(void* ptr){
2015-10-24 18:18:24 +03:00
QMetaObject::invokeMethod(static_cast<QAudioDecoder*>(ptr), "start");
}
2015-11-09 20:23:42 +03:00
void QAudioDecoder_ConnectStateChanged(void* ptr){
2015-10-24 18:18:24 +03:00
QObject::connect(static_cast<QAudioDecoder*>(ptr), static_cast<void (QAudioDecoder::*)(QAudioDecoder::State)>(&QAudioDecoder::stateChanged), static_cast<MyQAudioDecoder*>(ptr), static_cast<void (MyQAudioDecoder::*)(QAudioDecoder::State)>(&MyQAudioDecoder::Signal_StateChanged));;
}
2015-11-09 20:23:42 +03:00
void QAudioDecoder_DisconnectStateChanged(void* ptr){
2015-10-24 18:18:24 +03:00
QObject::disconnect(static_cast<QAudioDecoder*>(ptr), static_cast<void (QAudioDecoder::*)(QAudioDecoder::State)>(&QAudioDecoder::stateChanged), static_cast<MyQAudioDecoder*>(ptr), static_cast<void (MyQAudioDecoder::*)(QAudioDecoder::State)>(&MyQAudioDecoder::Signal_StateChanged));;
}
2015-11-09 20:23:42 +03:00
void QAudioDecoder_Stop(void* ptr){
2015-10-24 18:18:24 +03:00
QMetaObject::invokeMethod(static_cast<QAudioDecoder*>(ptr), "stop");
}
2015-11-09 20:23:42 +03:00
void QAudioDecoder_DestroyQAudioDecoder(void* ptr){
2015-10-24 18:18:24 +03:00
static_cast<QAudioDecoder*>(ptr)->~QAudioDecoder();
}