OSDN Git Service

add tstools.
[rec10/rec10-git.git] / tstools / DtsEdit / src / gpac / laser.h
1 /*\r
2  *                      GPAC - Multimedia Framework C SDK\r
3  *\r
4  *                      Authors: Jean le Feuvre\r
5  *                              Copyright (c) 2005-200X ENST\r
6  *                                      All rights reserved\r
7  *\r
8  *  This file is part of GPAC / BIFS codec sub-project\r
9  *\r
10  *  GPAC is free software; you can redistribute it and/or modify\r
11  *  it under the terms of the GNU Lesser General Public License as published by\r
12  *  the Free Software Foundation; either version 2, or (at your option)\r
13  *  any later version.\r
14  *   \r
15  *  GPAC is distributed in the hope that it will be useful,\r
16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
18  *  GNU Lesser General Public License for more details.\r
19  *   \r
20  *  You should have received a copy of the GNU Lesser General Public\r
21  *  License along with this library; see the file COPYING.  If not, write to\r
22  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. \r
23  *\r
24  */\r
25 \r
26 #ifndef _GF_LASER_H_\r
27 #define _GF_LASER_H_\r
28 \r
29 #ifdef __cplusplus\r
30 extern "C" {\r
31 #endif\r
32 \r
33 #include <gpac/nodes_svg.h>\r
34 \r
35 /*for LASeRConfig*/\r
36 #include <gpac/mpeg4_odf.h>\r
37 \r
38 #ifndef GPAC_DISABLE_SVG\r
39 \r
40 typedef struct __tag_laser_codec GF_LASeRCodec;\r
41 \r
42 \r
43 /*LASeR decoder constructor*/\r
44 GF_LASeRCodec *gf_laser_decoder_new(GF_SceneGraph *scenegraph);\r
45 void gf_laser_decoder_del(GF_LASeRCodec *codec);\r
46 \r
47 /*sets the scene time. Scene time is the real clock of the bifs stream in secs*/\r
48 void gf_laser_decoder_set_clock(GF_LASeRCodec *codec, Double (*GetSceneTime)(void *st_cbk), void *st_cbk );\r
49 \r
50 /*setup a stream*/\r
51 GF_Err gf_laser_decoder_configure_stream(GF_LASeRCodec *codec, u16 ESID, char *DecoderSpecificInfo, u32 DecoderSpecificInfoLength);\r
52 /*removes a stream*/\r
53 GF_Err gf_laser_decoder_remove_stream(GF_LASeRCodec *codec, u16 ESID);\r
54 \r
55 /*decode a laser AU and applies it to the graph (non-memory mode only)*/\r
56 GF_Err gf_laser_decode_au(GF_LASeRCodec *codec, u16 ESID, char *data, u32 data_length);\r
57 \r
58 /*Memory laser decoding - fills the command list with the content of the AU - cf scenegraph_vrml.h for commands usage\r
59         @ESID: ID of input stream\r
60         @data, @data_length: BIFS AU\r
61         @com_list: target list for decoded commands\r
62 */\r
63 GF_Err gf_laser_decode_command_list(GF_LASeRCodec *codec, u16 ESID, char *data, u32 data_length, GF_List *com_list);\r
64 \r
65 \r
66 /*constructor - @graph: scene graph being encoded*/\r
67 GF_LASeRCodec *gf_laser_encoder_new(GF_SceneGraph *graph);\r
68 /*destructor*/\r
69 void gf_laser_encoder_del(GF_LASeRCodec *codec);\r
70 /*setup a destination stream*/\r
71 GF_Err gf_laser_encoder_new_stream(GF_LASeRCodec *codec, u16 ESID, GF_LASERConfig *cfg);\r
72 /*encodes a list of commands for the given stream in the output buffer - data is dynamically allocated for output*/\r
73 GF_Err gf_laser_encode_au(GF_LASeRCodec *codec, u16 ESID, GF_List *command_list, Bool reset_encoding_context, char **out_data, u32 *out_data_length);\r
74 /*returns encoded config desc*/\r
75 GF_Err gf_laser_encoder_get_config(GF_LASeRCodec *codec, u16 ESID, char **out_data, u32 *out_data_length);\r
76 \r
77 /*Encodes current graph as a scene replace*/\r
78 GF_Err gf_laser_encoder_get_rap(GF_LASeRCodec *codec, char **out_data, u32 *out_data_length);\r
79 \r
80 \r
81 #endif\r
82 \r
83 #ifdef __cplusplus\r
84 }\r
85 #endif\r
86 \r
87 #endif\r
88 \r