| 1234567891011121314151617181920212223242526272829303132 |
- #ifndef AVPLAYER2_READ_THREAD_H
- #define AVPLAYER2_READ_THREAD_H
- #pragma once
- #include "ThreadBase.h"
- #include "packets_sync.h"
- class ReadThread : public ThreadBase
- {
- public:
- explicit ReadThread(VideoState* pState = nullptr);
- ~ReadThread();
- ReadThread(const ReadThread&) = delete;
- ReadThread& operator=(const ReadThread&) = delete;
- ReadThread(ReadThread&&) = delete;
- ReadThread& operator=(ReadThread&&) = delete;
- void set_video_state(VideoState* pState = nullptr); // call before start
- void stop() override;
- protected:
- int stream_component_open(int stream_index);
- void stream_component_close(VideoState* is, int stream_index);
- int loop_read();
- void run() override;
- private:
- VideoState* m_pPlayData;
- };
- #endif // AVPLAYER2_READ_THREAD_H
|