1 /*
2  *			GPAC - Multimedia Framework C SDK
3  *
4  *			Authors: Jean Le Feuvre
5  *			Copyright (c) Telecom ParisTech 2012
6  *					All rights reserved
7  *
8  *  This file is part of GPAC / modules interfaces
9  *
10  *  GPAC is free software; you can redistribute it and/or modify
11  *  it under the terms of the GNU Lesser General Public License as published by
12  *  the Free Software Foundation; either version 2, or (at your option)
13  *  any later version.
14  *
15  *  GPAC is distributed in the hope that it will be useful,
16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  *  GNU Lesser General Public License for more details.
19  *
20  *  You should have received a copy of the GNU Lesser General Public
21  *  License along with this library; see the file COPYING.  If not, write to
22  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23  *
24  */
25 
26 
27 #ifndef _GF_MODULE_PROTO_MOD_H_
28 #define _GF_MODULE_PROTO_MOD_H_
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #include <gpac/module.h>
35 #include <gpac/scenegraph.h>
36 #include <gpac/compositor.h>
37 
38 /*interface name and version for Built-in proto User Extensions*/
39 #define GF_HARDCODED_PROTO_INTERFACE		GF_4CC('G','H','P', '4')
40 
41 typedef struct _hc_proto_mod
42 {
43 	/* interface declaration*/
44 	GF_DECL_MODULE_INTERFACE
45 
46 	/*Initialize hardcoded proto node.
47 	 itfs: ProtoModuleInterface
48 	 compositor: GPAC compositor
49 	 node: node to be loaded - this node is always a PROTO instance
50 	 proto_uri: the proto URI
51 	*/
52 	Bool (*init)(struct _hc_proto_mod* itfs, GF_Compositor* compositor, GF_Node* node, const char *proto_uri);
53 
54 	/*check if the module can load a proto
55 	 uri: proto uri to check for support
56 	*/
57 	Bool (*can_load_proto)(const char* uri);
58 
59 	/*module private*/
60 	void *udta;
61 } GF_HardcodedProto;
62 
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 
68 
69 #endif	/*#define _GF_MODULE_PROTO_MOD_H_*/
70 
71