OSDN Git Service

stop using trunk directory in rectool
[rec10/rec10-git.git] / tstools / DtsEdit / src / gpac / term_info.h
1 /*\r
2  *                      GPAC - Multimedia Framework C SDK\r
3  *\r
4  *                      Copyright (c) Jean Le Feuvre 2000-2005 \r
5  *                                      All rights reserved\r
6  *\r
7  *  This file is part of GPAC / Stream Management sub-project\r
8  *\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
13  *   \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
18  *   \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
22  *\r
23  */\r
24 \r
25 \r
26 \r
27 #ifndef _GF_TERM_INFO_H_\r
28 #define _GF_TERM_INFO_H_\r
29 \r
30 \r
31 #ifdef __cplusplus\r
32 extern "C" {\r
33 #endif\r
34 \r
35 /*\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
39 */\r
40 #include <gpac/mpeg4_odf.h>\r
41 \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
48 /*return values:\r
49         0: regular media object, not inline\r
50         1: root scene\r
51         2: inline scene\r
52         3: externProto library\r
53 */\r
54 u32 gf_term_object_subscene_type(GF_Terminal *term, GF_ObjectManager *odm);\r
55 \r
56 /*select given object when stream selection is available*/\r
57 void gf_term_select_object(GF_Terminal *term, GF_ObjectManager *odm);\r
58 \r
59 typedef struct\r
60 {\r
61         GF_ObjectDescriptor *od;\r
62         Double duration;\r
63         Double current_time;\r
64         /*0: stoped, 1: playing, 2: paused, 3: not setup, 4; setup failed.*/\r
65         u32 status;\r
66         /*if set, the PL flags are valid*/\r
67         Bool has_profiles;\r
68         Bool inline_pl;\r
69         u8 OD_pl; \r
70         u8 scene_pl;\r
71         u8 audio_pl;\r
72         u8 visual_pl;\r
73         u8 graphics_pl;\r
74 \r
75         /*name of module handling the service service */\r
76         const char *service_handler;\r
77         /*name of service*/\r
78         const char *service_url;\r
79         /*set if the service is owned by this object*/\r
80         Bool owns_service;\r
81 \r
82         /*stream buffer:\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
86         */\r
87         s32 buffer;\r
88         /*number of AUs in DB (cumulated on all input channels)*/\r
89         u32 db_unit_count;\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
93         s32 clock_drift;\r
94         /*codec name*/\r
95         const char *codec_name;\r
96         /*object type - match streamType (cf constants.h)*/\r
97         u32 od_type;\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
102 \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
106 \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
109         u32 protection;\r
110 \r
111         u32 lang;\r
112 \r
113         /*name of media if not defined in OD framework*/\r
114         const char *media_url;\r
115 } GF_MediaInfo;\r
116 \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
121         downloads\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
126 */\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
128 \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
132 \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
136 \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
144 */\r
145 const char *gf_term_get_world_info(GF_Terminal *term, GF_ObjectManager *scene_od, GF_List *descriptions);\r
146 \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
152 */\r
153 GF_Err gf_term_dump_scene(GF_Terminal *term, char *rad_name, Bool xml_dump, Bool skip_proto, GF_ObjectManager *odm);\r
154 \r
155 \r
156 #ifdef __cplusplus\r
157 }\r
158 #endif\r
159 \r
160 \r
161 #endif  /*_GF_TERM_INFO_H_*/\r