libgpac
Documentation of the core library of GPAC
MediaObject Interface Reference

import"scenejs.idl";

Public Member Functions

MediaObject get_resource (unsigned long index)
 
*QualityDesc get_quality (unsigned long index)
 
void select_service (unsigned long serviceID)
 
void select_quality (unsigned long quality_index)
 
void select ()
 
SRDDesc get_srd ()
 
boolean in_parent_chain (JSFSFilter filter)
 
void declare_addon (DOMString addon_url)
 
void enable_addon (DOMString addon_url)
 
void addon_layout (DOMString addon_url, optional unsigned long pos=0, optional unsigned long size=0)
 
void disable_main_addon ()
 

Data Fields

readonly atttribute unsigned long ID
 
readonly atttribute unsigned long nb_resources
 
readonly atttribute DOMString service_url
 
readonly atttribute double duration
 
readonly atttribute double clock_time
 
readonly atttribute unsigned long clock_drift
 
readonly atttribute DOMString status
 
readonly atttribute unsigned long buffer
 
readonly atttribute unsigned long db_unit_count
 
readonly atttribute unsigned long cb_unit_count
 
readonly atttribute unsigned long cb_capacity
 
readonly atttribute unsigned long type
 
readonly atttribute unsigned long samplerate
 
readonly atttribute unsigned long channels
 
readonly atttribute DOMString lang
 
readonly atttribute unsigned long width
 
readonly atttribute unsigned long height
 
readonly atttribute unsigned long pixelformt
 
readonly atttribute unsigned long par
 
readonly atttribute unsigned long dec_frames
 
readonly atttribute unsigned long drop_frames
 
readonly atttribute unsigned long max_dec_time
 
readonly atttribute unsigned long long total_dec_time
 
readonly atttribute unsigned long avg_bitrate
 
readonly atttribute unsigned long max_bitrate
 
readonly atttribute DOMString service_handler
 
readonly atttribute DOMString codec
 
readonly atttribute unsigned long nb_qualities
 
readonly atttribute unsigned long max_buffer
 
readonly atttribute unsigned long min_buffer
 
readonly atttribute unsigned long frame_duration
 
readonly atttribute unsigned long irap_frames
 
readonly atttribute unsigned long irap_dec_time
 
readonly atttribute unsigned long long irap_max_time
 
readonly atttribute unsigned long service_id
 
readonly atttribute unsigned long selected_service
 
readonly atttribute unsigned long bandwidth_down
 
readonly atttribute unsigned long nb_http
 
readonly atttribute double timeshift_depth
 
readonly atttribute double timeshift_time
 
readonly atttribute boolean is_addon
 
readonly atttribute boolean main_addon_on
 
readonly atttribute boolean is_over
 
readonly atttribute boolean dynamic_scene
 
readonly atttribute DOMString service_name
 
readonly atttribute unsigned long ntp_diff
 
readonly atttribute unsigned long ntp_sender_diff
 
readonly atttribute DOMString main_addon_url
 
readonly atttribute boolean reverse_playback_supported
 
readonly atttribute boolean scalable_enhancement
 
readonly atttribute double main_addon_media_time
 
readonly atttribute unsigned long dependent_groups
 
readonly atttribute boolean vr_scene
 
readonly atttribute boolean disabled
 

Detailed Description

interface to Object Managet - see MediaObject

Member Function Documentation

◆ get_resource()

MediaObject MediaObject::get_resource ( unsigned long  index)

gets MediaObject in this object subscene by index

Parameters
indexthe 0-based index of the media object to query
Returns
the MediaObject or null if error

◆ get_quality()

* QualityDesc MediaObject::get_quality ( unsigned long  index)

gets quality by index

Parameters
indexthe 0-based index of the quality to query
Returns
the quality description or null if error

◆ select_service()

void MediaObject::select_service ( unsigned long  serviceID)

selects service ID

Parameters
serviceIDID of the service to select

◆ select_quality()

void MediaObject::select_quality ( unsigned long  quality_index)

selects object quality by index.

Parameters
quality_indexif "auto", turns on automatic rate adaptation. Otherwise selects quality by index (0-based) and turn off rate adaptation

◆ select()

void MediaObject::select ( )

select this MediaObject

◆ get_srd()

SRDDesc MediaObject::get_srd ( )

gets SRD information if any this MediaObject

Returns
the SRD information, or null

◆ in_parent_chain()

boolean MediaObject::in_parent_chain ( JSFSFilter  filter)

checks if the given filter is in parent (down the source) chain of this object. The compositor filter and any filter connected after the compositor are excluded

Parameters
filterthe filter to test
Returns
true if the filter is in the parent chain, false otherwise

◆ declare_addon()

void MediaObject::declare_addon ( DOMString  addon_url)

declares an addon

Parameters
addon_urlURL of addon to insert

◆ enable_addon()

void MediaObject::enable_addon ( DOMString  addon_url)

enables an addon

Parameters
addon_urlURL of addon to insert

◆ addon_layout()

void MediaObject::addon_layout ( DOMString  addon_url,
optional unsigned long  pos = 0,
optional unsigned long  size = 0 
)

set addon size and position in main window

Parameters
addon_urlURL of addon to insert
poscode for addon position on screen: bottom-left(0), top-left (1) bottom-right (2) or top-right (3)
sizecode for addon size on screen: 1/2 height (0), 1/3 (1) or 1/4 (2)

◆ disable_main_addon()

void MediaObject::disable_main_addon ( )

disable main addon

Field Documentation

◆ ID

readonly atttribute unsigned long MediaObject::ID

Object ID

◆ nb_resources

readonly atttribute unsigned long MediaObject::nb_resources

number of ODM in subscene

◆ service_url

readonly atttribute DOMString MediaObject::service_url

URL of parent network service

◆ duration

readonly atttribute double MediaObject::duration

duration in sec

◆ clock_time

readonly atttribute double MediaObject::clock_time

clock time in sec

◆ clock_drift

readonly atttribute unsigned long MediaObject::clock_drift

clock drif in milliseconds (how late the last frame was compared to its theoretical CTS)

◆ status

readonly atttribute DOMString MediaObject::status

playback status: "Stopped" , "Playing", "Paused", "Not Setup", "Setup Failed"

◆ buffer

readonly atttribute unsigned long MediaObject::buffer

buffer in ms

◆ db_unit_count

readonly atttribute unsigned long MediaObject::db_unit_count

number of AUs in decoder input buffer

◆ cb_unit_count

readonly atttribute unsigned long MediaObject::cb_unit_count

number of decoded AUs in decoder output buffer

◆ cb_capacity

readonly atttribute unsigned long MediaObject::cb_capacity

maxumum allowed number of decoded AUs in decoder output buffer

◆ type

readonly atttribute unsigned long MediaObject::type

stream type

◆ samplerate

readonly atttribute unsigned long MediaObject::samplerate

audio sample rate

◆ channels

readonly atttribute unsigned long MediaObject::channels

number audio channels

◆ lang

readonly atttribute DOMString MediaObject::lang

language

◆ width

readonly atttribute unsigned long MediaObject::width

width in pixels

◆ height

readonly atttribute unsigned long MediaObject::height

height in pixels

◆ pixelformt

readonly atttribute unsigned long MediaObject::pixelformt

pixel format

◆ par

readonly atttribute unsigned long MediaObject::par

pixel aspect ratio

◆ dec_frames

readonly atttribute unsigned long MediaObject::dec_frames

number of decoded frames

◆ drop_frames

readonly atttribute unsigned long MediaObject::drop_frames

number of drop frames

◆ max_dec_time

readonly atttribute unsigned long MediaObject::max_dec_time

max decode of an AU time in microseconds

◆ total_dec_time

readonly atttribute unsigned long long MediaObject::total_dec_time

cumultaed AU decode time in microseconds

◆ avg_bitrate

readonly atttribute unsigned long MediaObject::avg_bitrate

average rate in bits per second

◆ max_bitrate

readonly atttribute unsigned long MediaObject::max_bitrate

max rate in bits per second

◆ service_handler

readonly atttribute DOMString MediaObject::service_handler

name of filter handling demuxer

◆ codec

readonly atttribute DOMString MediaObject::codec

name of decoder

◆ nb_qualities

readonly atttribute unsigned long MediaObject::nb_qualities

number of qualities for this object (http streaming and co)

◆ max_buffer

readonly atttribute unsigned long MediaObject::max_buffer

max playout buffer in milliseconds

◆ min_buffer

readonly atttribute unsigned long MediaObject::min_buffer

min rebuffer lvel in milliseconds

◆ frame_duration

readonly atttribute unsigned long MediaObject::frame_duration

frame duration in milliseconds

◆ irap_frames

readonly atttribute unsigned long MediaObject::irap_frames

number of frames with SAP != 0 seen

◆ irap_dec_time

readonly atttribute unsigned long MediaObject::irap_dec_time

cumulated time of decoding of frames with SAP != 0, in microseconds

◆ irap_max_time

readonly atttribute unsigned long long MediaObject::irap_max_time

maximum decoding of frames with SAP != 0, in microseconds

◆ service_id

readonly atttribute unsigned long MediaObject::service_id

service ID

◆ selected_service

readonly atttribute unsigned long MediaObject::selected_service

ID of the selected service in the main scene

◆ bandwidth_down

readonly atttribute unsigned long MediaObject::bandwidth_down

download bandwidth in bits per second

◆ nb_http

readonly atttribute unsigned long MediaObject::nb_http

number of HTTP sessions for this object

◆ timeshift_depth

readonly atttribute double MediaObject::timeshift_depth

timeshift buffer depth in seconds

◆ timeshift_time

readonly atttribute double MediaObject::timeshift_time

timeshift time in seconds, 0 being live edge

◆ is_addon

readonly atttribute boolean MediaObject::is_addon

true if object is an addon media (added externally from the main service delivering the scene, eg TEMI-like)

◆ main_addon_on

readonly atttribute boolean MediaObject::main_addon_on

checks if main addon is enabled (typically the timeshift addon DASH object for a live broadcast)

◆ is_over

readonly atttribute boolean MediaObject::is_over

end of stream state

◆ dynamic_scene

readonly atttribute boolean MediaObject::dynamic_scene

if false, the scene, in which the object is, is an SVG/BIFS/VRML

◆ service_name

readonly atttribute DOMString MediaObject::service_name

name of the service if known

◆ ntp_diff

readonly atttribute unsigned long MediaObject::ntp_diff

current NTP diff between composition of a frame and indicated NTP target

◆ ntp_sender_diff

readonly atttribute unsigned long MediaObject::ntp_sender_diff

NTP diff last packet reception time and its sent time. If unknown, attribute value is null

◆ main_addon_url

readonly atttribute DOMString MediaObject::main_addon_url

URL of main addon

◆ reverse_playback_supported

readonly atttribute boolean MediaObject::reverse_playback_supported

indicates reverse playback is supported

◆ scalable_enhancement

readonly atttribute boolean MediaObject::scalable_enhancement

indicates if scalable enhancements (SVC, SHVC) are available for the object

◆ main_addon_media_time

readonly atttribute double MediaObject::main_addon_media_time

media time in seconds of main addon

◆ dependent_groups

readonly atttribute unsigned long MediaObject::dependent_groups

true if object has dependent groups (tile streaming in DASH)

◆ vr_scene

readonly atttribute boolean MediaObject::vr_scene

true if scene is a VR scene

◆ disabled

readonly atttribute boolean MediaObject::disabled

true if object is disabled (such objects are only used to describe redirections)