OSDN Git Service

add tstools.
[rec10/rec10-git.git] / tstools / DtsEdit / src / gpac / modules / ipmp.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_IPMP_H_\r
27 #define _GF_MODULE_IPMP_H_\r
28 \r
29 #ifdef __cplusplus\r
30 extern "C" {\r
31 #endif\r
32 \r
33 #include <gpac/module.h>\r
34 \r
35 /*\r
36         NOTE ON IPMP TOOLS\r
37 \r
38   The current implementation is very basic and does not follow MPEG-4 IPMPX architecture\r
39   This is just a place holder for ISMA/OMA-like schemes\r
40   Currently all operations are synchronous...\r
41 */\r
42 \r
43 enum\r
44 {\r
45         /*push some configuration data to the IPMP tool*/\r
46         GF_IPMP_TOOL_SETUP,\r
47         /*request access to the object (eg, PLAY)*/\r
48         GF_IPMP_TOOL_GRANT_ACCESS,\r
49         /*release access to the object (eg, STOP)*/\r
50         GF_IPMP_TOOL_RELEASE_ACCESS,\r
51         /*push some configuration data to the IPMP tool*/\r
52         GF_IPMP_TOOL_PROCESS_DATA,\r
53 };\r
54 \r
55 typedef struct\r
56 {\r
57         u32 scheme_version;\r
58         u32 scheme_type;\r
59         const char *scheme_uri;\r
60         const char *kms_uri;\r
61 } GF_ISMACrypConfig;\r
62 \r
63 typedef struct\r
64 {\r
65         u32 scheme_version;\r
66         u32 scheme_type;\r
67         const char *scheme_uri;\r
68         const char *kms_uri;\r
69         /*SHA-1 hash*/\r
70         u8 hash[20];\r
71 \r
72         const char *contentID;\r
73         u32 oma_drm_crypt_type;\r
74         Bool oma_drm_use_pad, oma_drm_use_hdr;\r
75         const char *oma_drm_textual_headers;\r
76         u32 oma_drm_textual_headers_len;\r
77 } GF_OMADRM2Config;\r
78 \r
79 /*IPMP events*/\r
80 typedef struct\r
81 {\r
82         /*event type*/\r
83         u32 event_type;\r
84 \r
85         /*gpac's channel triggering this event, NULL if unknown/unspecified*/\r
86         struct _es_channel *channel;\r
87 \r
88         /*identifier of the config data (GF_IPMP_TOOL_SETUP)*/\r
89         u32 config_data_code;\r
90         /*config data (GF_IPMP_TOOL_SETUP). Type depends on the config_data_code*/\r
91         void *config_data;\r
92 \r
93         Bool restart_requested;\r
94 \r
95         /*data manipulation (GF_IPMP_TOOL_PROCESS_DATA) - data is always processed in-place in a\r
96         synchronous way*/\r
97         char *data;\r
98         u32 data_size;\r
99         u32 out_data_size;\r
100         /*indicates if payload passed is encrypted or not - this is used by ISMA, OMA and 3GP*/\r
101         Bool is_encrypted;\r
102         /*ISMA payload resync indicator*/\r
103         u64 isma_BSO;\r
104 } GF_IPMPEvent;\r
105 \r
106 /*interface name and version for IPMP tools*/\r
107 #define GF_IPMP_TOOL_INTERFACE          GF_4CC('G','I','P', 0x01)\r
108 \r
109 typedef struct _ipmp_tool GF_IPMPTool;\r
110 \r
111 struct _ipmp_tool\r
112 {\r
113         /* interface declaration*/\r
114         GF_DECL_MODULE_INTERFACE\r
115 \r
116         /*process an ipmp event*/\r
117         GF_Err (*process)(GF_IPMPTool *dr, GF_IPMPEvent *evt);\r
118         /*tool private*/\r
119         void *udta;\r
120 \r
121 };\r
122 \r
123 \r
124 #ifdef __cplusplus\r
125 }\r
126 #endif\r
127 \r
128 \r
129 #endif  /*#define _GF_MODULE_IPMP_H_\r
130 */\r
131 \r