修复CLSID_NullRenderer在mingw下头文件丢失导致找不到摄像头
parent
587a642bbb
commit
0441204f6e
|
@ -2,7 +2,11 @@
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include "cplaywidget.h"
|
#include "cplaywidget.h"
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include "CameraCapture.h"
|
||||||
|
|
||||||
|
void CameraDataCallback(double ts, BYTE *dat, LONG size){
|
||||||
|
qDebug()<<"reieve cnt"<<size;
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
@ -11,5 +15,18 @@ int main(int argc, char *argv[])
|
||||||
CPlayWidget x(nullptr);
|
CPlayWidget x(nullptr);
|
||||||
x.show();
|
x.show();
|
||||||
x.PlayOneFrame();
|
x.PlayOneFrame();
|
||||||
|
|
||||||
|
Camera *gCam = Camera::GetInstance();
|
||||||
|
std::vector<std::wstring> names = gCam->EnumAllCamera();
|
||||||
|
for(auto itr = names.begin();itr != names.end();itr++){
|
||||||
|
qDebug()<<QString::fromStdWString(*itr);
|
||||||
|
}
|
||||||
|
gCam->SetCallBack(CameraDataCallback);
|
||||||
|
if(gCam->Open(*names.begin()) ){
|
||||||
|
qDebug("open success");
|
||||||
|
}else{
|
||||||
|
qDebug("open fail");
|
||||||
|
|
||||||
|
}
|
||||||
return a.exec();
|
return a.exec();
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ QT += core gui
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
QT += network
|
QT += network
|
||||||
|
QT += multimedia
|
||||||
|
|
||||||
TARGET = yuvgl
|
TARGET = yuvgl
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
@ -30,6 +31,7 @@ SOURCES += \
|
||||||
mainwindow.cpp \
|
mainwindow.cpp \
|
||||||
cplaywidget.cpp \
|
cplaywidget.cpp \
|
||||||
media/AACAudioCoder.cpp \
|
media/AACAudioCoder.cpp \
|
||||||
|
media/CameraCapture.cpp \
|
||||||
utils/Base64.cpp \
|
utils/Base64.cpp \
|
||||||
utils/Debuger.cpp \
|
utils/Debuger.cpp \
|
||||||
utils/utils.cpp
|
utils/utils.cpp
|
||||||
|
@ -48,8 +50,8 @@ message($$PWD/third/libs/)
|
||||||
LIBS += -L$$PWD/third/libs/
|
LIBS += -L$$PWD/third/libs/
|
||||||
LIBS += -lws2_32
|
LIBS += -lws2_32
|
||||||
LIBS += -lm
|
LIBS += -lm
|
||||||
LIBS += -lavformat -lavdevice -lavcodec -lavutil -lswresample -lpthread -lbz2 -lm -lfdk-aac -lx264 -lOle32 -lbcrypt -liconv -lucrtbase
|
LIBS += -lavformat -lavdevice -lavcodec -lavutil -lswresample -lpthread -lbz2 -lm -lfdk-aac -lx264 -lbcrypt -liconv -lucrtbase -lstrmiids -lGdi32
|
||||||
|
LIBS += -lole32 -loleAut32 -lquartz -ldxguid -ldxapi
|
||||||
|
|
||||||
# Default rules for deployment.
|
# Default rules for deployment.
|
||||||
qnx: target.path = /tmp/$${TARGET}/bin
|
qnx: target.path = /tmp/$${TARGET}/bin
|
||||||
|
|
Loading…
Reference in New Issue