--- /dev/null
+/*\r
+ * GPAC - Multimedia Framework C SDK\r
+ *\r
+ * Copyright (c) Jean Le Feuvre 2000-2005 \r
+ * All rights reserved\r
+ *\r
+ * This file is part of GPAC / Stream Management sub-project\r
+ *\r
+ * GPAC is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU Lesser General Public License as published by\r
+ * the Free Software Foundation; either version 2, or (at your option)\r
+ * any later version.\r
+ * \r
+ * GPAC is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU Lesser General Public License for more details.\r
+ * \r
+ * You should have received a copy of the GNU Lesser General Public\r
+ * License along with this library; see the file COPYING. If not, write to\r
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. \r
+ *\r
+ */\r
+\r
+\r
+\r
+#ifndef _GF_TERM_INFO_H_\r
+#define _GF_TERM_INFO_H_\r
+\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+/*\r
+ OD Browsing API - YOU MUST INCLUDE <gpac/terminal.h> before \r
+ (this has been separated from terminal.h to limit dependency of core to mpeg4_odf.h header)\r
+ ALL ITEMS ARE READ-ONLY AND SHALL NOT BE MODIFIED\r
+*/\r
+#include <gpac/mpeg4_odf.h>\r
+\r
+/*returns top-level OD of the presentation*/\r
+GF_ObjectManager *gf_term_get_root_object(GF_Terminal *term);\r
+/*returns number of sub-ODs in the current root. scene_od must be an inline OD*/\r
+u32 gf_term_get_object_count(GF_Terminal *term, GF_ObjectManager *scene_od);\r
+/*returns indexed (0-based) OD manager in the scene*/\r
+GF_ObjectManager *gf_term_get_object(GF_Terminal *term, GF_ObjectManager *scene_od, u32 index);\r
+/*return values:\r
+ 0: regular media object, not inline\r
+ 1: root scene\r
+ 2: inline scene\r
+ 3: externProto library\r
+*/\r
+u32 gf_term_object_subscene_type(GF_Terminal *term, GF_ObjectManager *odm);\r
+\r
+/*select given object when stream selection is available*/\r
+void gf_term_select_object(GF_Terminal *term, GF_ObjectManager *odm);\r
+\r
+typedef struct\r
+{\r
+ GF_ObjectDescriptor *od;\r
+ Double duration;\r
+ Double current_time;\r
+ /*0: stoped, 1: playing, 2: paused, 3: not setup, 4; setup failed.*/\r
+ u32 status;\r
+ /*if set, the PL flags are valid*/\r
+ Bool has_profiles;\r
+ Bool inline_pl;\r
+ u8 OD_pl; \r
+ u8 scene_pl;\r
+ u8 audio_pl;\r
+ u8 visual_pl;\r
+ u8 graphics_pl;\r
+\r
+ /*name of module handling the service service */\r
+ const char *service_handler;\r
+ /*name of service*/\r
+ const char *service_url;\r
+ /*set if the service is owned by this object*/\r
+ Bool owns_service;\r
+\r
+ /*stream buffer:\r
+ -2: stream is not playing\r
+ -1: stream has no buffering\r
+ >=0: amount of media data present in buffer, in ms\r
+ */\r
+ s32 buffer;\r
+ /*number of AUs in DB (cumulated on all input channels)*/\r
+ u32 db_unit_count;\r
+ /*number of CUs in composition memory (if any) and CM capacity*/\r
+ u16 cb_unit_count, cb_max_count;\r
+ /*clock drift in ms of object clock: this is the delay set by the audio renderer to keep AV in sync*/\r
+ s32 clock_drift;\r
+ /*codec name*/\r
+ const char *codec_name;\r
+ /*object type - match streamType (cf constants.h)*/\r
+ u32 od_type;\r
+ /*audio properties*/\r
+ u32 sample_rate, bits_per_sample, num_channels;\r
+ /*video properties (w & h also used for scene codecs)*/\r
+ u32 width, height, pixelFormat, par;\r
+\r
+ /*average birate over last second and max bitrate over one second at decoder input - expressed in bits per sec*/\r
+ u32 avg_bitrate, max_bitrate;\r
+ u32 total_dec_time, max_dec_time, nb_dec_frames, nb_droped;\r
+\r
+ /*set if ISMACryp present on the object - will need refinement for IPMPX...\r
+ 0: not protected - 1: protected and OK - 2: protected and DRM failed*/\r
+ u32 protection;\r
+\r
+ u32 lang;\r
+\r
+ /*name of media if not defined in OD framework*/\r
+ const char *media_url;\r
+} GF_MediaInfo;\r
+\r
+/*fills the GF_MediaInfo structure describing the OD manager*/\r
+GF_Err gf_term_get_object_info(GF_Terminal *term, GF_ObjectManager *odm, GF_MediaInfo *info);\r
+/*gets current downloads info for the service - only use if ODM owns thesrevice, returns 0 otherwise.\r
+ @d_enum: in/out current enum - shall start to 0, incremented at each call. fct returns 0 if no more \r
+ downloads\r
+ @server: server name\r
+ @path: file/data location on server\r
+ @bytes_done, @total_bytes: file info. total_bytes may be 0 (eg http streaming)\r
+ @bytes_per_sec: guess what\r
+*/\r
+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
+\r
+/*same principles as above , struct __netcom is defined in service.h*/\r
+typedef struct __netstatcom NetStatCommand;\r
+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
+\r
+/*same principles as above , struct __netinfo is defined in service.h*/\r
+typedef struct __netinfocom NetInfoCommand;\r
+GF_Err gf_term_get_service_info(GF_Terminal *term, GF_ObjectManager *odm, NetInfoCommand *netcom);\r
+\r
+/*retrieves world info of the scene @od belongs to. \r
+If @odm is or points to an inlined OD the world info of the inlined content is retrieved\r
+If @odm is NULL the world info of the main scene is retrieved\r
+returns NULL if no WorldInfo available\r
+returns world title if available \r
+@descriptions: any textual descriptions is stored here\r
+ strings are not allocated\r
+*/\r
+const char *gf_term_get_world_info(GF_Terminal *term, GF_ObjectManager *scene_od, GF_List *descriptions);\r
+\r
+/*dumps scene graph in specified file, in BT or XMT format\r
+@rad_name: file radical (NULL for stdout) - if not NULL MUST BE GF_MAX_PATH length\r
+if @skip_proto is set proto declarations are not dumped\r
+If @odm is or points to an inlined OD the inlined scene is dumped\r
+If @odm is NULL the main scene is dumped\r
+*/\r
+GF_Err gf_term_dump_scene(GF_Terminal *term, char *rad_name, Bool xml_dump, Bool skip_proto, GF_ObjectManager *odm);\r
+\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+\r
+#endif /*_GF_TERM_INFO_H_*/\r