OSDN Git Service

add tstools.
[rec10/rec10-git.git] / tstools / DtsEdit / src / gpac / bifsengine.h
diff --git a/tstools/DtsEdit/src/gpac/bifsengine.h b/tstools/DtsEdit/src/gpac/bifsengine.h
new file mode 100644 (file)
index 0000000..d178e32
--- /dev/null
@@ -0,0 +1,138 @@
+/*\r
+ *                                     GPAC Multimedia Framework\r
+ *\r
+ *                     Authors: Cyril Concolato - Jean le Feuvre\r
+ *                             Copyright (c) 2005-200X ENST\r
+ *                                     All rights reserved\r
+ *\r
+ *  This file is part of GPAC / ISO Media File Format 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
+#ifndef _GF_BIFSENGINE_H_\r
+#define _GF_BIFSENGINE_H_\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+#include <gpac/scene_manager.h>\r
+\r
+#ifndef GPAC_READ_ONLY\r
+       \r
+typedef struct __tag_bifs_engine GF_BifsEngine;\r
+\r
+/**\r
+ * @calling_object is the calling object on which call back will be called\r
+ * @inputContext is the name of a scene file (bt, xmt or mp4) to initialize the coding context\r
+ *\r
+ * must be called only one time (by process calling the DLL) before other calls\r
+ */\r
+GF_BifsEngine *gf_beng_init(void *calling_object, char *inputContext);\r
+\r
+/**\r
+ * @calling_object is the calling object on which call back will be called\r
+ * @inputContext is an UTF-8 scene description (with or without IOD) in BT or XMT-A format\r
+ * @width, @height: width and height of scene if no IOD is given in the context.\r
+ * @usePixelMetrics: metrics system used in the scene, if no IOD is given in the context.\r
+ *\r
+ * must be called only one time (by process calling the DLL) before other calls\r
+ */\r
+GF_BifsEngine *gf_beng_init_from_string(void *calling_object, char *inputContext, u32 width, u32 height, Bool usePixelMetrics);\r
+\r
+\r
+/**\r
+ * @calling_object is the calling object on which call back will be called\r
+ * @ctx is an already loaded scene manager\r
+ *\r
+ * must be called only one time (by process calling the DLL) before other calls\r
+ */\r
+GF_BifsEngine *gf_beng_init_from_context(void *calling_object, GF_SceneManager *ctx);\r
+\r
+/**\r
+ * @beng, pointer to the GF_BifsEngine returned by BENC_Init\r
+ * @config: pointer to the encoded BIFS config (memory is not allocated)\r
+ * @config_len: length of the buffer\r
+ *\r
+ * must be called after BENC_Init\r
+ */\r
+void gf_beng_get_stream_config(GF_BifsEngine *beng, char **config, u32 *config_len);\r
+\r
+/**\r
+ * Encodes the AU context which is not encoded when calling BENC_EncodeAUFromString/File\r
+ * Should be called after Aggregate.\r
+ *\r
+ * @beng, pointer to the GF_BifsEngine returned by BENC_Init\r
+ * @AUCallback, pointer on a callback function to get the result of the coding the AU using the current context\r
+ *\r
+ */\r
+GF_Err gf_beng_encode_context(GF_BifsEngine *beng, GF_Err (*AUCallback)(void *, char *data, u32 size, u64 ts));\r
+\r
+/**\r
+ * @beng, pointer to the GF_BifsEngine returned by BENC_Init\r
+ * @auFile, name of a file containing a description for an access unit (BT or XMT)\r
+ * @AUCallback, pointer on a callback function to get the result of the coding the AU using the current context\r
+ *\r
+ */\r
+GF_Err gf_beng_encode_from_file(GF_BifsEngine *beng, char *auFile, GF_Err (*AUCallback)(void *, char *data, u32 size, u64 ts));\r
+\r
+/**\r
+ * @beng, pointer to the GF_BifsEngine returned by BENC_Init\r
+ * @auString, a char string to encode (must one or several complete nodes in BT\r
+ * @AUCallback, pointer on a callback function to get the result of the coding the AU using the current context\r
+ *\r
+ */\r
+GF_Err gf_beng_encode_from_string(GF_BifsEngine *beng, char *auString, GF_Err (*AUCallback)(void *, char *data, u32 size, u64 ts));\r
+\r
+/**\r
+ * @beng, pointer to the GF_BifsEngine returned by BENC_Init\r
+ * @ctxFileName, name of the file to save the current state of the BIFS scene to\r
+ *\r
+ * save the current context of the beng.\r
+ * if you want to save an aggregate context, use BENC_AggregateCurrentContext before\r
+ *\r
+ */\r
+GF_Err gf_beng_save_context(GF_BifsEngine *beng, char *ctxFileName);\r
+\r
+/**\r
+ * @beng, pointer to the GF_BifsEngine returned by BENC_Init\r
+ *\r
+ * aggregates the current context of the beng, creates a scene replace\r
+ *\r
+ */\r
+GF_Err gf_beng_aggregate_context(GF_BifsEngine *beng);\r
+\r
+/**\r
+ * @beng, pointer to the GF_BifsEngine returned by BENC_Init\r
+ *\r
+ * release the memory used by this beng, no more call on the beng should happen after this\r
+ *\r
+ */\r
+void gf_beng_terminate(GF_BifsEngine *beng);\r
+\r
+\r
+#endif\r
+\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif // __cplusplus\r
+\r
+\r
+#endif /*_GF_BIFSENGINE_H_*/\r
+\r