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.
◆ on_period_reset()
def python.libgpac.libgpac.DASHCustomAlgorithm.on_period_reset |
( |
|
self, |
|
|
|
reset_type |
|
) |
| |
- Parameters
-
reset_type | indicate 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 |
|
) |
| |
◆ on_rate_adaptation()
def python.libgpac.libgpac.DASHCustomAlgorithm.on_rate_adaptation |
( |
|
self, |
|
|
|
group, |
|
|
|
base_group, |
|
|
|
force_low_complexity, |
|
|
|
stats |
|
) |
| |
- Parameters
-
group | the DASHGroup on which to perform adaptation |
base_group | the associated base DASHGroup (tiling only), or None if no base group |
force_low_complexity | indicates that the client would like a lower complexity (typically because it is dropping frames) |
stats | the 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
-
- 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)