Resize GAPI inputs in IStreamSource

Hi there,

I have set up a custom implementation of the IStreamSource interface and implemented the “pull” and the “descr_of” method. In the latter, I return the metadata of the first frame I capture.

Now, it can happen, that my source changes its dimensions at some point (as I am recording windows on the screen). As soon as this happens, the pipeline crashes with the error code “libc++abi.dylib: terminating with uncaught exception of type std::logic_error: OpenCV kernel output parameter was reallocated. Incorrect meta data was provided?”

The reason seams to be clear: On start, I report some dimensions and later those dimensions change… Now, how can I resolve this issue? I checked an the “descr_of” method is only once at startup so I don’t know how I can report a change in dimensions later on.

Thanks,
Maurice

That’s my fear : that the open cv gapi source be of constant size. Interesting point from Maurice. Can someone confirm or infirm ?.
Btw, Maurice Can you share a bit of your implementation? There isn’t any example of istreamingsource implementation out there. Just wandering if you could stream out a constant size and then do the resize with cv:: Rect after pulling the image out of the istreamingsource?