12345678910111213141516171819202122232425262728293031323334353637 |
- #include "MppDecoder.h"
- #ifndef MPPMANAGER_H
- #define MPPMANAGER_H
- #include "MppDecoder.h"
- #include <thread>
- #include <vector>
- class MppManager
- {
- public:
- static MppManager &getInstance()
- {
- static MppManager instance;
- return instance;
- }
- MppManager(const MppManager &) = delete;
- MppManager &operator=(const MppManager &) = delete;
- void addMppDecode();
- private:
- MppManager() = default;
- ~MppManager();
- void decodeThread();
- private:
- std::vector<std::thread> m_threads;
- // thread switch
- bool m_threadSwitch{false};
- };
- #endif // MPPMANAGER_H
|