123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- #ifndef MODULES_DISPLAYER_HPP_
- #define MODULES_DISPLAYER_HPP_
- #include <memory>
- #include <string>
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
- #if (CV_MAJOR_VERSION >= 3)
- #include "opencv2/imgcodecs/imgcodecs.hpp"
- #endif
- #include "cnstream_frame.hpp"
- #include "cnstream_module.hpp"
- namespace cnstream {
- class SDLVideoPlayer;
- /**
- * @brief Displayer is a module for displaying the video.
- */
- class Displayer : public Module, public ModuleCreator<Displayer> {
- public:
-
- explicit Displayer(const std::string& name);
-
- ~Displayer();
-
- bool Open(ModuleParamSet paramSet) override;
-
- void Close() override;
-
- int Process(CNFrameInfoPtr data) override;
-
- void GUILoop(const std::function<void()>& quit_callback);
-
- inline bool Show() { return show_; }
-
- bool CheckParamSet(const ModuleParamSet& paramSet) const override;
- private:
- SDLVideoPlayer* player_;
- bool show_ = false;
- };
- }
- #endif
|