2 * GPAC - Multimedia Framework C SDK
\r
4 * Copyright (c) Jean Le Feuvre 2000-2005
\r
5 * All rights reserved
\r
7 * This file is part of GPAC / Stream Management sub-project
\r
9 * GPAC is free software; you can redistribute it and/or modify
\r
10 * it under the terms of the GNU Lesser General Public License as published by
\r
11 * the Free Software Foundation; either version 2, or (at your option)
\r
12 * any later version.
\r
14 * GPAC is distributed in the hope that it will be useful,
\r
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
17 * GNU Lesser General Public License for more details.
\r
19 * You should have received a copy of the GNU Lesser General Public
\r
20 * License along with this library; see the file COPYING. If not, write to
\r
21 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
\r
27 #ifndef _GF_TERM_INFO_H_
\r
28 #define _GF_TERM_INFO_H_
\r
36 OD Browsing API - YOU MUST INCLUDE <gpac/terminal.h> before
\r
37 (this has been separated from terminal.h to limit dependency of core to mpeg4_odf.h header)
\r
38 ALL ITEMS ARE READ-ONLY AND SHALL NOT BE MODIFIED
\r
40 #include <gpac/mpeg4_odf.h>
\r
42 /*returns top-level OD of the presentation*/
\r
43 GF_ObjectManager *gf_term_get_root_object(GF_Terminal *term);
\r
44 /*returns number of sub-ODs in the current root. scene_od must be an inline OD*/
\r
45 u32 gf_term_get_object_count(GF_Terminal *term, GF_ObjectManager *scene_od);
\r
46 /*returns indexed (0-based) OD manager in the scene*/
\r
47 GF_ObjectManager *gf_term_get_object(GF_Terminal *term, GF_ObjectManager *scene_od, u32 index);
\r
49 0: regular media object, not inline
\r
52 3: externProto library
\r
54 u32 gf_term_object_subscene_type(GF_Terminal *term, GF_ObjectManager *odm);
\r
56 /*select given object when stream selection is available*/
\r
57 void gf_term_select_object(GF_Terminal *term, GF_ObjectManager *odm);
\r
61 GF_ObjectDescriptor *od;
\r
63 Double current_time;
\r
64 /*0: stoped, 1: playing, 2: paused, 3: not setup, 4; setup failed.*/
\r
66 /*if set, the PL flags are valid*/
\r
75 /*name of module handling the service service */
\r
76 const char *service_handler;
\r
78 const char *service_url;
\r
79 /*set if the service is owned by this object*/
\r
83 -2: stream is not playing
\r
84 -1: stream has no buffering
\r
85 >=0: amount of media data present in buffer, in ms
\r
88 /*number of AUs in DB (cumulated on all input channels)*/
\r
90 /*number of CUs in composition memory (if any) and CM capacity*/
\r
91 u16 cb_unit_count, cb_max_count;
\r
92 /*clock drift in ms of object clock: this is the delay set by the audio renderer to keep AV in sync*/
\r
95 const char *codec_name;
\r
96 /*object type - match streamType (cf constants.h)*/
\r
98 /*audio properties*/
\r
99 u32 sample_rate, bits_per_sample, num_channels;
\r
100 /*video properties (w & h also used for scene codecs)*/
\r
101 u32 width, height, pixelFormat, par;
\r
103 /*average birate over last second and max bitrate over one second at decoder input - expressed in bits per sec*/
\r
104 u32 avg_bitrate, max_bitrate;
\r
105 u32 total_dec_time, max_dec_time, nb_dec_frames, nb_droped;
\r
107 /*set if ISMACryp present on the object - will need refinement for IPMPX...
\r
108 0: not protected - 1: protected and OK - 2: protected and DRM failed*/
\r
113 /*name of media if not defined in OD framework*/
\r
114 const char *media_url;
\r
117 /*fills the GF_MediaInfo structure describing the OD manager*/
\r
118 GF_Err gf_term_get_object_info(GF_Terminal *term, GF_ObjectManager *odm, GF_MediaInfo *info);
\r
119 /*gets current downloads info for the service - only use if ODM owns thesrevice, returns 0 otherwise.
\r
120 @d_enum: in/out current enum - shall start to 0, incremented at each call. fct returns 0 if no more
\r
122 @server: server name
\r
123 @path: file/data location on server
\r
124 @bytes_done, @total_bytes: file info. total_bytes may be 0 (eg http streaming)
\r
125 @bytes_per_sec: guess what
\r
127 Bool gf_term_get_download_info(GF_Terminal *term, GF_ObjectManager *odm, u32 *d_enum, const char **server, const char **path, u32 *bytes_done, u32 *total_bytes, u32 *bytes_per_sec);
\r
129 /*same principles as above , struct __netcom is defined in service.h*/
\r
130 typedef struct __netstatcom NetStatCommand;
\r
131 Bool gf_term_get_channel_net_info(GF_Terminal *term, GF_ObjectManager *odm, u32 *d_enum, u32 *chid, NetStatCommand *netcom, GF_Err *ret_code);
\r
133 /*same principles as above , struct __netinfo is defined in service.h*/
\r
134 typedef struct __netinfocom NetInfoCommand;
\r
135 GF_Err gf_term_get_service_info(GF_Terminal *term, GF_ObjectManager *odm, NetInfoCommand *netcom);
\r
137 /*retrieves world info of the scene @od belongs to.
\r
138 If @odm is or points to an inlined OD the world info of the inlined content is retrieved
\r
139 If @odm is NULL the world info of the main scene is retrieved
\r
140 returns NULL if no WorldInfo available
\r
141 returns world title if available
\r
142 @descriptions: any textual descriptions is stored here
\r
143 strings are not allocated
\r
145 const char *gf_term_get_world_info(GF_Terminal *term, GF_ObjectManager *scene_od, GF_List *descriptions);
\r
147 /*dumps scene graph in specified file, in BT or XMT format
\r
148 @rad_name: file radical (NULL for stdout) - if not NULL MUST BE GF_MAX_PATH length
\r
149 if @skip_proto is set proto declarations are not dumped
\r
150 If @odm is or points to an inlined OD the inlined scene is dumped
\r
151 If @odm is NULL the main scene is dumped
\r
153 GF_Err gf_term_dump_scene(GF_Terminal *term, char *rad_name, Bool xml_dump, Bool skip_proto, GF_ObjectManager *odm);
\r
161 #endif /*_GF_TERM_INFO_H_*/
\r