main.cpp 869 B

123456789101112131415161718192021222324252627282930
  1. #include <QApplication>
  2. #include <QDebug>
  3. #include "AVPlayer/avplayerwidget.h"
  4. #include "AVPlayer/vframe.h"
  5. #include "widgets/recorderwidget.h"
  6. int main(int argc, char *argv[])
  7. {
  8. QApplication app(argc, argv);
  9. qRegisterMetaType<QSharedPointer<VideoFrame>>("QSharedPointer<VideoFrame>");
  10. try {
  11. qDebug() << "Creating RecorderWidget...";
  12. RecorderWidget testRecorder;
  13. qDebug() << "Showing RecorderWidget...";
  14. testRecorder.show();
  15. AVPlayerWidget avPlayerWidget;
  16. avPlayerWidget.show();
  17. qDebug() << "RecorderWidget created and shown successfully!";
  18. return app.exec();
  19. } catch (const std::exception& e) {
  20. qCritical() << "Exception caught:" << e.what();
  21. return -1;
  22. } catch (...) {
  23. qCritical() << "Unknown exception caught";
  24. return -1;
  25. }
  26. }