2 * GPAC - Multimedia Framework C SDK
\r
4 * Authors: Jean le Feuvre
\r
5 * Copyright (c) 2005-200X ENST
\r
6 * All rights reserved
\r
8 * This file is part of GPAC / BIFS codec sub-project
\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
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
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
26 #ifndef _GF_LASER_H_
\r
27 #define _GF_LASER_H_
\r
33 #include <gpac/nodes_svg.h>
\r
36 #include <gpac/mpeg4_odf.h>
\r
38 #ifndef GPAC_DISABLE_SVG
\r
40 typedef struct __tag_laser_codec GF_LASeRCodec;
\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
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
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
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
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
63 GF_Err gf_laser_decode_command_list(GF_LASeRCodec *codec, u16 ESID, char *data, u32 data_length, GF_List *com_list);
\r
66 /*constructor - @graph: scene graph being encoded*/
\r
67 GF_LASeRCodec *gf_laser_encoder_new(GF_SceneGraph *graph);
\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
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