libgpac
Documentation of the core library of GPAC
Terminal Info

GPAC media object browsing of the player. More...

+ Collaboration diagram for Terminal Info:

Data Structures

struct  GF_MediaInfo
 
struct  GF_TermNetStats
 
struct  GF_TermURLInfo
 

Typedefs

typedef struct _od_manager GF_ObjectManager
 

Functions

GF_ObjectManagergf_term_get_root_object (GF_Terminal *term)
 
u32 gf_term_get_object_count (GF_Terminal *term, GF_ObjectManager *scene_od)
 
GF_ObjectManagergf_term_get_object (GF_Terminal *term, GF_ObjectManager *scene_od, u32 index)
 
u32 gf_term_object_subscene_type (GF_Terminal *term, GF_ObjectManager *odm)
 
void gf_term_select_object (GF_Terminal *term, GF_ObjectManager *odm)
 
void gf_term_select_service (GF_Terminal *term, GF_ObjectManager *odm, u32 service_id)
 
void gf_term_toggle_addons (GF_Terminal *term, Bool show_addons)
 
Bool gf_term_find_service (GF_Terminal *term, GF_ObjectManager *odm, u32 service_id)
 
GF_Err gf_term_get_object_info (GF_Terminal *term, GF_ObjectManager *odm, GF_MediaInfo *info)
 
Bool gf_term_get_download_info (GF_Terminal *term, GF_ObjectManager *odm, u32 *d_enum, const char **url, u32 *bytes_done, u32 *total_bytes, u32 *bytes_per_sec)
 
Bool gf_term_get_channel_net_info (GF_Terminal *term, GF_ObjectManager *odm, u32 *d_enum, u32 *chid, GF_TermNetStats *net_stats, GF_Err *ret_code)
 
GF_Err gf_term_get_service_info (GF_Terminal *term, GF_ObjectManager *odm, GF_TermURLInfo *info)
 
const char * gf_term_get_world_info (GF_Terminal *term, GF_ObjectManager *scene_od, GF_List *descriptions)
 
GF_Err gf_term_dump_scene (GF_Terminal *term, char *rad_name, char **filename, Bool xml_dump, Bool skip_proto, GF_ObjectManager *odm)
 
void gf_term_print_stats (GF_Terminal *term)
 
void gf_term_print_graph (GF_Terminal *term)
 

Detailed Description

This section documents how a user can get information on running media object in the player.


Data Structure Documentation

◆ GF_MediaInfo

struct GF_MediaInfo

Media Object information

Data Fields
u32 ODID
u32 ServiceID
u32 pid_id
u32 ocr_id
Double duration
Double current_time
u32 status
Bool raw_media
Bool generated_scene
const char * service_handler
const char * service_url
const char * remote_url
Bool owns_service
s32 buffer
u32 min_buffer
u32 max_buffer
u32 db_unit_count
u32 cb_unit_count
u32 cb_max_count
Bool direct_video_memory
s32 clock_drift
const char * codec_name
u32 od_type
u32 sample_rate
u32 afmt
u32 num_channels
u32 width
u32 height
u32 pixelFormat
u32 par
u32 avg_bitrate
u32 max_bitrate
u32 avg_process_bitrate
u32 max_process_bitrate
u32 nb_dec_frames
u32 nb_dropped
u32 first_frame_time
u32 last_frame_time
u64 total_dec_time
u64 irap_total_dec_time
u32 max_dec_time
u32 irap_max_dec_time
u32 au_duration
u32 nb_iraps
s32 ntp_diff
u32 nb_views
u32 protection
u32 lang
const char * lang_code
const char * media_url

◆ GF_TermNetStats

struct GF_TermNetStats

Net statistics gathering object

Data Fields
Float pck_loss_percentage
u16 port
u16 ctrl_port
u32 bw_up
u32 bw_down
u32 ctrl_bw_down
u32 ctrl_bw_up
u16 multiplex_port

◆ GF_TermURLInfo

struct GF_TermURLInfo

URL information for current session

Data Fields
u32 service_id
u16 track_num
u16 track_total
u32 genre
const char * album
const char * artist
const char * comment
const char * composer
const char * name
const char * writer
const char * provider
const char * role
const char * accessibility
const char * rating

Typedef Documentation

◆ GF_ObjectManager

typedef struct _od_manager GF_ObjectManager

Media object manager

Function Documentation

◆ gf_term_get_root_object()

GF_ObjectManager* gf_term_get_root_object ( GF_Terminal term)

gets top-level OD of the presentation

Parameters
termthe target terminal
Returns
the root object descriptor or NULL if not connected

◆ gf_term_get_object_count()

u32 gf_term_get_object_count ( GF_Terminal term,
GF_ObjectManager scene_od 
)

gets number of objects in sub scene of object

Parameters
termthe target terminal
scene_odthe OD to browse for resources. This must be an inline OD
Returns
the number of objects in the scene described by the OD

◆ gf_term_get_object()

GF_ObjectManager* gf_term_get_object ( GF_Terminal term,
GF_ObjectManager scene_od,
u32  index 
)

gets an OD manager in the scene

Parameters
termthe target terminal
scene_odthe OD to browse for resources. This must be an inline OD
index0-based index of the obhect to query
Returns
the object manager or NULL if not found

◆ gf_term_object_subscene_type()

u32 gf_term_object_subscene_type ( GF_Terminal term,
GF_ObjectManager odm 
)

gets the type of the associated subscene

Parameters
termthe target terminal
odmthe object to query
Returns
0: regular media object, not inline, 1: root scene, 2: inline scene, 3: externProto library

◆ gf_term_select_object()

void gf_term_select_object ( GF_Terminal term,
GF_ObjectManager odm 
)

selects a given object when stream selection is available

Parameters
termthe target terminal
odmthe object to select

◆ gf_term_select_service()

void gf_term_select_service ( GF_Terminal term,
GF_ObjectManager odm,
u32  service_id 
)

selects service by given ID for multiplexed services (MPEG-2 TS)

Parameters
termthe target terminal
odman object in the scene attached to the same multiplex
service_idthe service ID to select

◆ gf_term_toggle_addons()

void gf_term_toggle_addons ( GF_Terminal term,
Bool  show_addons 
)

sets addon on or off (only one addon possible for now). When OFF, the associated service is shut down

Parameters
termthe target terminal
show_addonsif GF_TRUE, displays addons otheriwse hides the addons

◆ gf_term_find_service()

Bool gf_term_find_service ( GF_Terminal term,
GF_ObjectManager odm,
u32  service_id 
)

checks for an existing service ID in a session

Parameters
termthe target terminal
odman object in the scene attached to the same multiplex
service_idthe ID of the service to find
Returns
GF_TRUE if given service ID is declared

◆ gf_term_get_object_info()

GF_Err gf_term_get_object_info ( GF_Terminal term,
GF_ObjectManager odm,
GF_MediaInfo info 
)

gets information on an object

Parameters
termthe target terminal
odmthe object manager to query
infofilled with object manager properties
Returns
error if any

◆ gf_term_get_download_info()

Bool gf_term_get_download_info ( GF_Terminal term,
GF_ObjectManager odm,
u32 d_enum,
const char **  url,
u32 bytes_done,
u32 total_bytes,
u32 bytes_per_sec 
)

gets current downloads info for the service - only use if ODM owns the service, returns 0 otherwise.

Parameters
termthe target terminal
odmthe object manager to query
d_enumin/out current enum - shall start to 0, incremented at each call. fct returns 0 if no more downloads
urlservice URL
bytes_donebytes downloaded for this service
total_bytestotal bytes for this service, may be 0 (eg http streaming)
bytes_per_secdownload speed
Returns
GF_TRUE if success, GF_FALSE otherwise

◆ gf_term_get_channel_net_info()

Bool gf_term_get_channel_net_info ( GF_Terminal term,
GF_ObjectManager odm,
u32 d_enum,
u32 chid,
GF_TermNetStats net_stats,
GF_Err ret_code 
)

gets network statistics for the given channel in the given object

Parameters
termthe target terminal
odmthe object manager to query
d_enumin/out current enum - shall start to 0, incremented at each call. fct returns 0 if no more downloads
chidset to the channel identifier
net_statsfilled with the channel network statistics
ret_codeset to the error code if error
Returns
GF_TRUE if success, GF_FALSE otherwise

◆ gf_term_get_service_info()

GF_Err gf_term_get_service_info ( GF_Terminal term,
GF_ObjectManager odm,
GF_TermURLInfo info 
)

gets meta information about the service

Parameters
termthe target terminal
odmthe object manager to query
infofilled with service information
Returns
error if any

◆ gf_term_get_world_info()

const char* gf_term_get_world_info ( GF_Terminal term,
GF_ObjectManager scene_od,
GF_List descriptions 
)

retrieves world info of the scene of an object.

Parameters
termthe target terminal
scene_odthe object manager to query. If this is an inline OD, the world info of the inline content is retrieved. If NULL, the world info of the main scene is retrieved
descriptionsany textual descriptions is stored here (const strings not allocated, do NOT modify)
Returns
NULL if no WorldInfo available or world title if available

◆ gf_term_dump_scene()

GF_Err gf_term_dump_scene ( GF_Terminal term,
char *  rad_name,
char **  filename,
Bool  xml_dump,
Bool  skip_proto,
GF_ObjectManager odm 
)

dumps scene graph in specified file, in BT or XMT format

Parameters
termthe target terminal
rad_namefile radical (NULL for stdout) - if not NULL MUST BE GF_MAX_PATH length
filenamesets to the complete filename (rad + ext) and shall be destroyed by caller (optional can be NULL)
xml_dumpif GF_TRUE, duimps using XML format (XMT-A, X3D) for scene graphs having both XML and simple text representations
skip_protois GF_TRUE, proto declarations are not dumped
odmif this is an inline OD, the inline scene is dumped; if this is NULL, the main scene is dumped; otherwise the parent scene is dumped
Returns
error if any

◆ gf_term_print_stats()

void gf_term_print_stats ( GF_Terminal term)

prints filter session statistics as log tool app log level debuf

Parameters
termthe target terminal

◆ gf_term_print_graph()

void gf_term_print_graph ( GF_Terminal term)

prints filter session graph as log tool app log level debuf

Parameters
termthe target terminal