OSDN Git Service

stop using trunk directory in rectool
[rec10/rec10-git.git] / tstools / DtsEdit / src / gpac / modules / term_ext.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 / modules interfaces\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 #ifndef _GF_MODULE_TERM_EXT_H_\r
27 #define _GF_MODULE_TERM_EXT_H_\r
28 \r
29 #ifdef __cplusplus\r
30 extern "C" {\r
31 #endif\r
32 \r
33 #include <gpac/terminal.h>\r
34 \r
35 /*interface name and version for Terminal Extensions services*/\r
36 #define GF_TERM_EXT_INTERFACE           GF_4CC('G','T','E', 0x01)\r
37 \r
38 typedef struct _term_ext GF_TermExt;\r
39 \r
40 \r
41 enum\r
42 {\r
43         /*start terminal extension. If 0 is returned, the module will be unloaded*/\r
44         GF_TERM_EXT_START = 1,\r
45         /*stop terminal extension*/\r
46         GF_TERM_EXT_STOP,\r
47         /*process extension - the GF_TERM_EXT_CAP_NOT_THREADED capability MUST be set*/\r
48         GF_TERM_EXT_PROCESS,\r
49 };\r
50 \r
51 enum\r
52 {\r
53         /*signal the extension is to be called on regular basis (once per simulation tick). This MUST be set during\r
54         the GF_TERM_EXT_START command and cannot be changed at run-time*/\r
55         GF_TERM_EXT_CAP_NOT_THREADED = 1<<1,\r
56 };\r
57 \r
58 \r
59 struct _term_ext\r
60 {\r
61         /* interface declaration*/\r
62         GF_DECL_MODULE_INTERFACE\r
63 \r
64         /*caps of the module*/\r
65         u32 caps;\r
66 \r
67         /*load JS extension\r
68          termext: pointer to the module\r
69          term: pointer to GPAC terminal\r
70         */\r
71         Bool (*process)(GF_TermExt *termext, GF_Terminal *term, u32 action);\r
72 \r
73         /*module private*/\r
74         void *udta;\r
75 };\r
76 \r
77 \r
78 #ifdef __cplusplus\r
79 }\r
80 #endif\r
81 \r
82 \r
83 #endif  /*#define _GF_MODULE_TERM_EXT_H_*/\r
84 \r