Creating own file saving plugin with 3 input sources

Hello,

I am trying to create my own plugin for saving only H264 files so far.

Having such a GST pipeline:

gst-launch-1.0 videotestsrc ! videoconvert ! x264enc ! h264parse ! MySink max-size-time=1000000000 location=output/vid%02d.h264

I would like to develop my own GStreamer plugin that can save 1-second video clips into individual files. While I know that splitmuxsink provides similar functionality, my goal is to extend this by allowing the plugin to handle 3 input streams (3 sinks) and save the resulting files in a specified sequence/order.

The plugin will eventually have three sinks .h264, .jpg, and .mp4. I want to save the files in the following order: first the .jpg, then the .mp4, and finally the .h264.

To the best of my knowledge, no existing GStreamer plugins currently offer this exact functionality - specifying order of source files.

I’m relatively new to GStreamer, and I’m unsure how to approach implementing this. Could you suggest any examples or resources that would be helpful for my use case?