| 81 | } |
| 82 | |
| 83 | int Algorithm::getVideoFrameOutput(GLuint &textureId, size_t &width, |
| 84 | size_t &height) { |
| 85 | if (!valid_) { |
| 86 | return -1; |
| 87 | } |
| 88 | |
| 89 | bmf_lite::Param output_param; |
| 90 | bmf_lite::VideoFrame output_video_frame; |
| 91 | algorithm_->getVideoFrameOutput(output_video_frame, output_param); |
| 92 | width = output_video_frame.buffer()->width(); |
| 93 | height = output_video_frame.buffer()->height(); |
| 94 | textureId = (long)(output_video_frame.buffer()->data()); |
| 95 | return 0; |
| 96 | } |
| 97 | |
| 98 | Algorithm::~Algorithm() { |
| 99 | bmf_lite::AlgorithmFactory::releaseAlgorithmInterface(algorithm_); |