JSDASHClient API.
More...
import"dash_algo.idl";
The JSDASHClient interface has a single instance exposed to the script under the name "dashin". It implements callbacks from the DASH client. The object can also be bound to a running filter using JSFSFilter.bind
◆ new_group()
attribute void JSDASHClient::new_group |
( |
JSDASHGroup |
group | ) |
|
indicate a new group is being created
- Note
- this function is optional
- Parameters
-
group | group being created, can be kept for future use |
◆ period_reset()
attribute void JSDASHClient::period_reset |
( |
unsigned long |
reset_type | ) |
|
indicate the period has changed
- Note
- this function is optional
- Parameters
-
reset_type | indicates the type of reset:
- 0: end of period, groups are no longer valid
- 1: start of a static period
- 2: start of a dynamic (live) period
|
◆ rate_adaptation()
attribute int JSDASHClient::rate_adaptation |
( |
unsigned long |
group_idx, |
|
|
unsigned long |
base_group_idx, |
|
|
Boolean |
force_lower_complexity, |
|
|
JSDASHStats |
stats |
|
) |
| |
perform rate adaptation on the given group (AdaptationSet in DASH, corresponds to one adaptable media)
- Parameters
-
group_idx | index of group on which to perform adaptation |
base_group_idx | index of associated base group (usually same as group, differs in tiling mode), |
force_lower_complexity | set to true if the dash client would like a lower complexity |
stats | current statistics for the group JSDASHStats |
- Returns
- value can be:
- the index of the new quality to select (as listed in group.reps[])
- -1 to not take decision now
- -2 to disable the group (debug, will drop segment)
- other negative values are handled as error
◆ download_monitor()
attribute int JSDASHClient::download_monitor |
( |
unsigned long |
group_idx, |
|
|
JSDASHDownloadStats |
stats |
|
) |
| |
monitor download of the current segment in a group
- Note
- this function is optional
- Parameters
-
group_idx | index of group on which to perform adaptation |
stats | current download statistics for the group JSDASHDownloadStats |
- Returns
- integer value indicating the action to take. Return value can be:
-1
to continue download
-2
to abort download but without retrying to download the same segment at lower quality
- the index of the new quality to download for the same segment index (same time)