MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / process

Method process

extensions/opencv/FrameIO.h:55–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 ~FrameReadCallback() override = default;
54
55 int64_t process(const std::shared_ptr<io::BaseStream>& stream) override {
56 int64_t ret = 0;
57 image_buf_.resize(stream->getSize());
58 ret = stream->read(image_buf_.data(), static_cast<int>(stream->getSize()));
59 if (ret != stream->getSize()) {
60 throw std::runtime_error("ImageReadCallback failed to fully read flow file input stream");
61 }
62 image_mat_ = cv::imdecode(image_buf_, -1);
63 return ret;
64 }
65
66 private:
67 std::vector<uchar> image_buf_;

Callers

nothing calls this directly

Calls 2

getSizeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected