libgpac
Documentation of the core library of GPAC
DASHAlgorithm interface

DASH and HLS user-defined rate adaptation algorithms. More...

+ Collaboration diagram for DASHAlgorithm interface:

Data Structures

interface  _DASHCustomAlgorithm
 
interface  _DASHGroup
 
interface  _DASHQualityInfo
 
interface  _DASHSegmentInfo
 
interface  _DASHGroupStatistics
 
interface  _DASHSRD
 

Detailed Description

The DASH demuxer can be provided with a custom JS algorithm, provided as an object implementing the DASHAlgorithm interface.

When running the session in multithreaded mode, the dash demuxer will always be scheduled on the main thread if a custom algorithm is bound.


Data Structure Documentation

◆ _DASHGroup

interface _DASHGroup

interface for custom DASH groups

+ Collaboration diagram for _DASHGroup:
Data Fields
attribute readonly idx

Index of group, as used in callbacks

attribute readonly Array qualities

List of _DASHQualityInfo for group

attribute readonly unsigned long duration

period duration in milliseconds, 0 if unknown

_DASHSRD SRD

SRD object or null if no SRD defined

◆ _DASHQualityInfo

interface _DASHQualityInfo

interface for custom DASH groups

Data Fields
attribute readonly unsigned long bandwidth

bandwidth in bits per second

attribute readonly DOMString ID

ID (representation ID in DASH)

attribute readonly DOMString mime

MIME type

attribute readonly DOMString codec

codec parameter string

attribute readonly unsigned long width

width in pixels, 0 if not visual

attribute readonly unsigned long height

height in pixels, 0 if not visual

attribute readonly boolean interlaced

interlaced flag, false 0 if not visual

attribute readonly _Fraction fps

Frame Rate (Fraction), 0/0 if not visual

attribute readonly _Fraction sar

Sample Aspect Ration (Fraction), 0/0 if not visual

attribute readonly unsigned long sample_rate

Samplerate, 0 if not audio

attribute readonly unsigned long nb_channels

Number of channels, 0 if not audio

attribute readonly disabled disabled

set to true if quality is disabled (no playback support)

attribute readonly boolean is_selected

set to true if quality is selected

attribute readonly double ast_offset

AST offset for DASH low latency mode, 0 otherwise

attribute readonly double avg_duration

Average segment duration in seconds, 0 if unknown

attribute readonly Array sizes

list of segment _DASHSegmentInfo for onDemand profiles or empty otherwise

◆ _DASHSegmentInfo

interface _DASHSegmentInfo

segemnt size info

Data Fields
attribute readonly unsigned long long size

segemnt size

attribute readonly unsigned long duration

segemnt duration

◆ _DASHGroupStatistics

interface _DASHGroupStatistics

statistics for rate adaptation

statistics for download monitoring

Data Fields
attribute readonly unsigned long download_rate

download rate of last segment in bits per second, divided by current playback speed

attribute readonly unsigned long file_size

size of last segment in bytes

attribute readonly double speed

current playback speed

attribute readonly double max_available_speed

max playback speed based on associated codec runtime statistics

attribute readonly unsigned long display_width

display width in pixels of object

attribute readonly unsigned long display_height

display height in pixels of object

attribute readonly unsigned long active_quality_idx

index of current quality or last downloaded quality

attribute readonly unsigned long buffer_min

minimum buffer in milliseconds, below witch rebuffer occurs

attribute readonly unsigned long self buffer_max

maximum buffer in milliseconds, algorithm should not fill more than this

attribute readonly unsigned long self buffer

current buffer in milliseconds

attribute readonly unsigned long self quality_degradation_hint

degradation hint, 0 means no degradation, 100 means tile completely hidden

attribute readonly unsigned long self total_rate

cumulated download rate of all active groups in bytes per seconds - 0 means all files are local

attribute readonly unsigned long bits_per_sec

download rate of last segment in bits per second

attribute readonly unsigned long total_bytes

total number of bytes in segment

attribute readonly unsigned long long bytes_done

number of downloaded bytes from segment (starting from first byte)

attribute readonly unsigned longlong time_since_start

number of microseconds elapsed since segment was scheduled for download

attribute readonly unsigned long buffer_dur

current buffer length in milliseconds

attribute readonly unsigned long current_seg_dur

duration of segment being downloaded, in milliseconds - 0 if unknown

◆ _DASHSRD

interface _DASHSRD

Spacial Relationship Descriptor for DASH group

Data Fields
attribute readonly unsigned long x

X coordinate of SRD for this tile

attribute readonly unsigned long y

Y coordinate of SRD for this tile

attribute readonly unsigned long w

width of SRD for this tile - 0 for tile base track

attribute readonly unsigned long h

height of SRD for this tile - 0 for tile base track

attribute readonly unsigned long fw

total width of SRD descriptor for this tile

attribute readonly unsigned long fh

total height of SRD descriptor for this tile