AAMP Discontinuity and Multi-Period Handling

Created on June 21, 2022


HLS discontinuity and DASH period transition handling

  • For Ad Insertion, CDN uses #EXT-X-DISCONTINUITY tags in HLS media playlists at the transitions. In the case of DASH, multiple periods are used.
  • Discontinuity is handled in a similar way for HLS and DASH. Once discontinuity is detected ( #EXT-X-DISCONTINUITY for HLS and new period with PTS discontinuity for DASH) EOS gstreamer event is sent to the gstreamer playbins. Then AAMP stops injecting further buffers to gstreamer. After both audio and video gstreamer sinks  done presenting all the injected buffers, EOS is posted in gstreamer bus. AAMP listens to this event, and once it is received, it flushes the pipeline, send new segement event to mark the start PTS of next buffer after discontinuity and restarts injecting the buffers.
  • For Broadcom platforms, some times EOS message is not received from the gstreamer bus. To avoid freezes in this scenario, AAMP treats underflow signals sent by Broadcom gstreamer elements after sending  EOS event as EOS message.

Go To Top