stopplay_waiting_thread.h 781 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef AVPLAYER2_STOPPLAY_WAITING_THREAD_H
  2. #define AVPLAYER2_STOPPLAY_WAITING_THREAD_H
  3. #pragma once
  4. #include "ThreadBase.h"
  5. #include <atomic>
  6. #include <string>
  7. class PlayerController;
  8. class StopWaitingThread : public ThreadBase
  9. {
  10. public:
  11. StopWaitingThread(const StopWaitingThread&) = delete;
  12. StopWaitingThread& operator=(const StopWaitingThread&) = delete;
  13. StopWaitingThread(StopWaitingThread&&) = delete;
  14. StopWaitingThread& operator=(StopWaitingThread&&) = delete;
  15. explicit StopWaitingThread(PlayerController* parent, const std::string& file = "");
  16. ~StopWaitingThread();
  17. void stop() override;
  18. protected:
  19. void run() override;
  20. private:
  21. std::string m_file;
  22. PlayerController* m_parent;
  23. };
  24. #endif // AVPLAYER2_STOPPLAY_WAITING_THREAD_H