Documentation of the core library of GPAC
_DASHCustomAlgorithm Interface Reference


Public Member Functions

void on_period_reset (unsigned long reset_type)
void on_new_group (_DASHGroup group)
long on_rate_adaptation (_DASHGroup group, _DASHGroup base_group, boolean force_low_complexity, _DASHGroupStatistics stats)
long on_download_monitor (_DASHGroup group, _DASHGroupDownloadStatistics stats)

Detailed Description

interface for custom DASH algorithms

Callbacks may be changed at runtime, however if the object passed to initialize the binding has no on_download_monitor function, rate monitoring will be disabled for the binding

Member Function Documentation

◆ on_period_reset()

void _DASHCustomAlgorithm::on_period_reset ( unsigned long  reset_type)

Callback (optional) called upon a period reset.

reset_typeindicate the type of period reset. Values can be:
  • 0: end of period (groups are no longer valid)
  • 1: start of a static period
  • 2: start of a dynamic (live) period

◆ on_new_group()

void _DASHCustomAlgorithm::on_new_group ( _DASHGroup  group)

Callback (optional) called when a new group (adaptation set) is created

groupthe newly created dash group

◆ on_rate_adaptation()

long _DASHCustomAlgorithm::on_rate_adaptation ( _DASHGroup  group,
_DASHGroup  base_group,
boolean  force_low_complexity,
_DASHGroupStatistics  stats 

Callback (mandatory) called at the end of the segment download to perform rate adaptation

groupthe group on which to perform adaptation
base_groupthe associated base group (tiling only), or None if no base group
force_low_complexityindicates that the client would like a lower complexity (typically because it is dropping frames)
statsthe statistics for the downloaded segment
value can be:
  • new quality index,
  • -1 to take no decision
  • -2 to disable quality (debug, will drop segment)
  • other negative values are handled as error

◆ on_download_monitor()

long _DASHCustomAlgorithm::on_download_monitor ( _DASHGroup  group,
_DASHGroupDownloadStatistics  stats 

Callback (optional) called on regular basis during a segment download

groupthe group associated with the current download
statsthe current statistics for the download
value can be:
  • -1 to continue download
  • -2 to abort download but without retrying to downloading the same segment at lower quality
  • the index of the new quality to download for the same segment index (same time)