I'm trying to build a GStreamer plugin that would produce segments of MPEGTS files, each with a fixed duration. This is to create TS segments for the Apple HTTP live streaming protocol. I'm fairly new to developing for GStreamer and have a basic understanding of how it works.

The approach I had in mind is to create a plugin that includes both mpegtsmux and filesink. Within that plugin, it could produce individual ts files when certain duration is accumulated.

Is this feasible? Is there another way to do this without having to replicate code that's already in mpegtsmux and filesink?