read_thread.h 464 B

12345678910111213141516171819202122232425
  1. #ifndef AVPLAYER2_READ_THREAD_H
  2. #define AVPLAYER2_READ_THREAD_H
  3. #pragma once
  4. #include "ThreadBase.h"
  5. #include "packets_sync.h"
  6. class ReadThread : public ThreadBase
  7. {
  8. public:
  9. explicit ReadThread(VideoState* pState = nullptr);
  10. ~ReadThread();
  11. void set_video_state(VideoState* pState = nullptr); // call before start
  12. protected:
  13. int loop_read();
  14. void run() override;
  15. private:
  16. VideoState* m_pPlayData;
  17. };
  18. #endif // AVPLAYER2_READ_THREAD_H