I have the same problem since our inference task need special data layout. We change the network input data layout and train again, or need a converter to change the decoded NV12 frame to other format. Still, we need to know how does deepstream engine when and how calling each module with its each function and parameter. I’ll issue a title if we can’t predict the IO of IModule::execute function.
the addDecodeTask just return void, then we can’t tell deepstream which module’s output is the custom module’s input, Is it allow return empty pair in IModule::getPreModule function?
I want to ask another question: Is it allowed to add more than one color space converter?
I’m using debugger to study when and which and what is the parameter the module’s function will be called. I known the initialize is called when the user code call IDeviceWorker::addCustomTask, and the getNbInputs is called in another thread after user code called IDeviceWorker::start. It is hard to write clean code without known these.
I checked the color converter result with IMAGE_FORMAT::GRAY by add a custom task after color converter, found out the output is float32 type, range from 0.0 to 255.0. I just mis-understand the IMAGE_FORMAT enumeration at beginning.