main.cpp 592 B

12345678910111213141516171819202122232425262728293031323334
  1. #include <iostream>
  2. using namespace std;
  3. #include "AppConfig.h"
  4. #include "Video/GetVideoThread.h"
  5. int main()
  6. {
  7. cout << "Hello World!" << endl;
  8. av_register_all();
  9. avformat_network_init();
  10. avdevice_register_all();
  11. GetVideoThread *getVideoThread = new GetVideoThread();
  12. getVideoThread->setQuantity(10);
  13. if (getVideoThread->init() == SUCCEED)
  14. {
  15. getVideoThread->startRecord();
  16. while(1)
  17. {
  18. AppConfig::mSleep(10000);
  19. }
  20. }
  21. else
  22. {
  23. fprintf(stderr, "init device failed! \n");
  24. }
  25. return 0;
  26. }