Adding a second sink and source pad to GstOpenCVVideoFilter/GstBaseTransform
I'm in the process of writing a plugin to wrap OpenCV's stereo rectification functionality. Right now, it works by loading camera intrinsic/extrinsic files specified as plugin properties, and setting up the undistortion maps from stereoRectify() and initUndistortRectifyMap()
on the GST_EVENT_CAPS event. The transform function then calls remap() with the appropriate matrices to perform the rectification on the incoming buffer and sending it on down the pipeline.
To handle the two camera channels, I have another plugin parameter called cameraIndex that determines which set of maps are used for the remap() call. So, roughly, the pipeline looks like this:
Ideally, though, I feel like the cvstereorectify plugin should have a left and right sink pad, as well as left and right source pads, so that there would only be one in the pipeline. GstOpenCVVideoFilter/GstBaseTransform seem fairly solidly geared to only
support one source and sink, though. Any advice on the least-hack-y route to take to integrate the extra pads?