I have two images I'd like to go down a complex pipe together at the same
time. Currently I have
one Multifilesrc element sending one image down this pipe.
How would I do that?
I thought of the following:
- Some sort of other technique I am not familiar with in Gstreamer.
- Replace the multifilesrc element with a dummy videotestsrc with the size
of both images and in the source pad, replace the test image by
concatenating the two images.
I want to send one RGB image and one YUV image down a complex pipe at the
Both images have to arrive at the elements down the pipeline together to
be processed by two different threads/c++ code.
The main question is how to make sure that one bin gets a RGB image and the
other bin gets the corresponding YUV image. Since the RGB and YUV has
different sizes and aspect ratio, I didn't even manage to allocate a buffer
RGB larger, paste the YUV inside it and then crop the relevant portion for
the YUV image, since the RGB is 3 channels and the other image is 2 image -
so a crop of, say 512 x 512, crops an "incorrect" buffer size for the YUV
I'm not aware of how to send two video frames in one buffer. I think you need
to have 2 pipelines to do this. One pipeline will handle all RGB images, and
the other will handle all YUV images. To process them at the exact same time
(I'm assuming it'll be in an appsink), you can probably use the "offset"
property in GstBuffer to make sure the frames are numbered the same before
processing. If you're not using an appsink, you'd probably have to put a pad
probe on the sink element to block frames until you're ready.