| | |
| | | |
| | | Wrapper::~Wrapper() |
| | | { |
| | | if(thread_){ |
| | | stop_stream_.store(true); |
| | | thread_->join(); |
| | | } |
| | | if(bridge_){ |
| | | delete bridge_; bridge_ = NULL; |
| | | } |
| | | |
| | | map_rec_.clear(); |
| | | list_rec_pkt_.clear(); |
| | | try |
| | | { |
| | | if(thread_){ |
| | | stop_stream_.store(true); |
| | | thread_->join(); |
| | | } |
| | | if(bridge_){ |
| | | delete bridge_; bridge_ = NULL; |
| | | } |
| | | |
| | | for(auto &i : list_pic_){ |
| | | free(i.data); |
| | | map_rec_.clear(); |
| | | list_rec_pkt_.clear(); |
| | | |
| | | for(auto &i : list_pic_){ |
| | | free(i.data); |
| | | } |
| | | } |
| | | catch(const std::exception& e) |
| | | { |
| | | logIt("WRAPPER EXCEPTION: ", e.what()); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | void Wrapper::ScalePicture(const int w, const int h, const int flags){ |