OSDN Git Service

add tstools.
[rec10/rec10-git.git] / tstools / DtsEdit / src / gpac / internal / vobsub.h
diff --git a/tstools/DtsEdit/src/gpac/internal/vobsub.h b/tstools/DtsEdit/src/gpac/internal/vobsub.h
new file mode 100644 (file)
index 0000000..6d95a3c
--- /dev/null
@@ -0,0 +1,82 @@
+/*\r
+ *                     GPAC - Multimedia Framework C SDK\r
+ *\r
+ *                     Copyright (c) by  Falco (Ivan Vecera) 2006\r
+ *                                     All rights reserved\r
+ *\r
+ *  This file is part of GPAC / Media Tools 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_VOBSUB_H_\r
+#define _GF_VOBSUB_H_\r
+\r
+#include <gpac/tools.h>\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+#define VOBSUBIDXVER 7\r
+\r
+typedef struct _tag_vobsub_pos\r
+{\r
+       u64  filepos;\r
+       u64  start;\r
+       u64  stop;\r
+} vobsub_pos;\r
+\r
+typedef struct _tag_vobsub_lang\r
+{\r
+       u32      id;\r
+       char    *name;\r
+       GF_List *subpos;\r
+} vobsub_lang;\r
+\r
+typedef struct _tag_vobsub_file\r
+{\r
+       u32         width;\r
+       u32         height;\r
+       u8          palette[16][4];\r
+       u32         num_langs;\r
+       vobsub_lang langs[32];\r
+} vobsub_file;\r
+\r
+GFINLINE static void vobsub_trim_ext(char *filename)\r
+{\r
+       char *pos = strchr(filename, '.');\r
+\r
+       if (pos != NULL) {\r
+               if (!stricmp(pos, ".idx") || !stricmp(pos, ".sub")) {\r
+                       *pos = '\0';\r
+               }\r
+       }\r
+}\r
+\r
+s32    vobsub_lang_name(u16 id);\r
+char  *vobsub_lang_id(char *name);\r
+GF_Err vobsub_read_idx(FILE *file, vobsub_file *vobsub, int *version);\r
+void   vobsub_free(vobsub_file *vobsub);\r
+GF_Err vobsub_get_subpic_duration(char *data, u32 psize, u32 dsize, u32 *duration);\r
+GF_Err vobsub_packetize_subpicture(FILE *fsub, u64 pts, char *data, u32 dataSize);\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif /* _GF_VOBSUB_H_ */\r