libgpac
Documentation of the core library of GPAC
python.libgpac.libgpac.DASHCustomAlgorithm Class Reference

DASH custom algo Upon successful binding to the dashin filter, the object will be assigned a list member called groups, containing the declared group for the active period.

Public Member Functions

def on_period_reset (self, reset_type)
 Callback (optional) called upon a period reset. More...
 
def on_new_group (self, group)
 Callback (optional) called when a new group (adaptation set) is created. More...
 
def on_rate_adaptation (self, group, base_group, force_low_complexity, stats)
 Callback (mandatory) called at the end of the segment download to perform rate adaptation. More...
 
def on_download_monitor (self, group, stats)
 Callback (optional) called on regular basis during a segment download. More...
 

Member Function Documentation

◆ on_period_reset()

def python.libgpac.libgpac.DASHCustomAlgorithm.on_period_reset (   self,
  reset_type 
)
Parameters
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
Returns

◆ on_new_group()

def python.libgpac.libgpac.DASHCustomAlgorithm.on_new_group (   self,
  group 
)
Parameters
groupthe newly created DASHGroup
Returns

◆ on_rate_adaptation()

def python.libgpac.libgpac.DASHCustomAlgorithm.on_rate_adaptation (   self,
  group,
  base_group,
  force_low_complexity,
  stats 
)
Parameters
groupthe DASHGroup on which to perform adaptation
base_groupthe associated base DASHGroup (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 DASHGroupStatistics for the downloaded segment
Returns
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()

def python.libgpac.libgpac.DASHCustomAlgorithm.on_download_monitor (   self,
  group,
  stats 
)
Parameters
groupthe DASHGroup associated with the current download
statsthe DASHGroupDownloadStatistics for the download
Returns
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)