For DASH streams, AAMP downloads and injects ISO-BMFF fragments to gstreamer pipeline. Demuxing is done by opensource qtdemux gstreamer plugin. To achieve PTS re-stamping to achieve desired rate/ continuity across period boundaries, AAMP has added custom patches to qtdemux gstreamer plugin. These patches support custom events from AAMP.

https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/rdk-oe/meta-rdk-ext/+/refs/heads/rdk-next/recipes-multimedia/gstreamer/files/


0009-qtdemux-aamp-tm.patch

  • Add support for retimestamping in qtdemux based on a custom event which is sent only when aamp is used
  • This patch adds support for PTS restamping of outgoing buffers from qtdemux based on a custom event aamp_override. App can override the base PTS which is to be used as base for restamping using property "basePTS". If it is not proved, PTS of first fragment will be used as base PTS.
  • gst_qtdemux_decorate_and_push_buffer is the function in which qtdemux pushes the buffers to srcpad. If override is enabled by the event, the patch re-stamps PTS of ES packets based on the rate and basePTS.


0021-qtdemux-aamp-tm-multiperiod.patch

  • Support smooth PTS restamping across period boundaries by handling discontinuity by a new custom event
  • On period transition during trickmode, PTS of the new fragment changes. To ensure smooth trickplay experience, PTS restamping should be continuous. This patch ensures this using aamp-tm-disc event. Fragments after this event has PTS very different from previous fragments. So base PTS has to be recalculated to have continuous trick play experience at this point. PTS offset is calculated by adding last restamped PTS prior to the event and expected delay between Iframes. Base PTS is reset. PTS offset is added to the recalculated PTS on next fragments. 


0031-qtdemux-aamp-fix-mp4a-atom-skip.patch

  • While playing a fragmented MP4 asset with clear and encrypted discontinuous fragments, AAMP push init header with pssh data first for initializing decryptor plugins. During this, mp4a atom is skipped because stream->protected is not reset in AAMP use-case


0037-qtdemux-aamp-avoid-unwanted-header-logging.patch

0013-qtdemux-remove-override-segment-event.patch

  • qtdemux overrides segment.position value of a received SEGMENT event. This was resulting in PTS error from brcmvideodecoder since AAMP sends a GST_EVENT_SEGMENT right after flushing gst pipeline for seek.


0014-qtdemux-clear-crypto-info-on-trak-switch.patch

  • Flush crypto_info stored previous trak's senc on trak change



  • No labels