Skip to main content

Module multi_track

Module multi_track 

Source
Expand description

Multi-track frame-level pipeline executor with DTS-ordered interleaving.

This module provides MultiTrackExecutor — the real decode → filter → encode engine for oximedia-transcode. It connects the FrameDecoder / FilterGraph / FrameEncoder plumbing from pipeline_context to a container-level output via a Muxer and performs DTS-ordered interleaving across all tracks using a min-heap.

§Architecture

   [FrameDecoder₀] → FilterGraph₀ → [FrameEncoder₀] ─┐
   [FrameDecoder₁] → FilterGraph₁ → [FrameEncoder₁] ─┤→ DTS min-heap → Muxer
          …                                            ┘

§Execute loop

  1. For each active track, call FrameDecoder::decode_next.
  2. Apply the track’s FilterGraph::apply to the decoded frame.
  3. Pass filtered frames to the track’s FrameEncoder::encode_frame.
  4. Push resulting encoded bytes as a StagedPacket onto the DTS min-heap.
  5. After all tracks are exhausted, flush each encoder.
  6. Pop the heap in DTS order and write every packet to the Muxer.

The MultiTrackExecutor::step method performs one packet-cycle (one pass through all tracks) and pushes ready encoded data into the internal staging buffer, so a segment or parallel driver can call it externally.

Structs§

MultiTrackExecutor
Frame-level multi-track decode → filter → encode executor with DTS-ordered muxing.
MultiTrackStats
Statistics returned by MultiTrackExecutor::execute.
PerTrack
One logical media track wired through decode → filter → encode.