multimedia/client/qt_gl_/yuvgl/main.cpp

38 lines
947 B
C++
Raw Normal View History

2020-06-04 15:28:45 +00:00
#include "mainwindow.h"
#include <QApplication>
#include "cplaywidget.h"
#include <QTimer>
#include "CameraCapture.h"
#include "mainwindow.h"
void CameraDataCallback(double ts, BYTE *dat, LONG size){
qDebug()<<"reieve cnt"<<size;
}
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow main;
main.show();
/*
CPlayWidget gPlayer(nullptr);
gPlayer.SetDataType(CPlayWidget::IMG_TYPE::TYPE_RGB32);
gPlayer.SetImgSize(640,480);
gPlayer.show();
Camera *gCam;
std::vector<std::wstring> names = Camera::EnumAllCamera();
for(auto itr = names.begin();itr != names.end();itr++){
if(gCam->Open(*names.begin()) ){
Camera *gCam = new Camera(*names.begin());
gCam->SetObserver(&gPlayer);
qDebug("open success");
}else{
qDebug("open fail");
}
qDebug()<<QString::fromStdWString(*itr);
}
*/
return a.exec();
}