| 107 | } |
| 108 | |
| 109 | std::shared_ptr<AVFrame> avframe_queue::pop_only() |
| 110 | { |
| 111 | std::unique_lock<std::mutex> ulock(this->_lock); |
| 112 | if (_frames.size() == 0) { |
| 113 | return nullptr; |
| 114 | } |
| 115 | std::shared_ptr<AVFrame> ret = _frames.front(); |
| 116 | if (ret == nullptr) { |
| 117 | return nullptr; |
| 118 | } |
| 119 | _frames.pop_front(); |
| 120 | return ret; |
| 121 | } |
| 122 | |
| 123 | bool avframe_queue::empty() |
| 124 | { |