libannodex  0.7.3
anx_types.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003 Commonwealth Scientific and Industrial Research
3  Organisation (CSIRO) Australia
4 
5  Redistribution and use in source and binary forms, with or without
6  modification, are permitted provided that the following conditions
7  are met:
8 
9  - Redistributions of source code must retain the above copyright
10  notice, this list of conditions and the following disclaimer.
11 
12  - Redistributions in binary form must reproduce the above copyright
13  notice, this list of conditions and the following disclaimer in the
14  documentation and/or other materials provided with the distribution.
15 
16  - Neither the name of CSIRO Australia nor the names of its
17  contributors may be used to endorse or promote products derived from
18  this software without specific prior written permission.
19 
20  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
24  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32 
37 #ifndef __ANX_TYPES_H__
38 #define __ANX_TYPES_H__
39 
40 #include <stdio.h>
41 #include <annodex/anx_list.h>
42 
43 /* On GNU systems, anx_int64.h is autogenerated during configure. On
44  * non-GNU Win32 systems, we instead include a static definition. */
45 #if defined(_WIN32) && !defined(__GNUC__)
46 # include <annodex/anx_int64_w32.h>
47 #else
48 # include <annodex/anx_int64.h>
49 #endif
50 
51 #ifndef _ANX_PRIVATE
52 
55 typedef void ANNODEX;
56 #endif
57 
58 /* Annotation elements */
59 typedef struct _AnxHead AnxHead;
60 typedef struct _AnxClip AnxClip;
61 typedef struct _AnxMetaElement AnxMetaElement;
62 typedef struct _AnxLinkElement AnxLinkElement;
63 
65  const char *id;
66  const char *lang;
67  const char *dir;
68  const char *name;
69  const char *content;
70  const char *scheme;
71 };
72 
74  char *id;
75  char *class;
76  char *title;
77  char *lang;
78  char *dir;
79  char *href;
80  char *type;
81  char *rel;
82  char *rev;
83  char *media;
84 };
85 
86 
87 struct _AnxHead {
88  const char *head_id;
89  const char *lang;
90  const char *dir;
91  const char *profile;
92  const char *title;
93  const char *title_id;
94  const char *title_lang;
95  const char *title_dir;
96  const char *base_id;
97  const char *base_href;
100 };
101 
102 struct _AnxClip {
103  const char *clip_id;
104  const char *class;
105  const char *title;
106  const char *lang;
107  const char *dir;
108  const char *track;
109  const char *anchor_id;
110  const char *anchor_class;
111  const char *anchor_title;
112  const char *anchor_lang;
113  const char *anchor_dir;
114  const char *anchor_href;
115  const char *anchor_text;
116  const char *img_id;
117  const char *img_class;
118  const char *img_title;
119  const char *img_lang;
120  const char *img_dir;
121  const char *img_src;
122  const char *img_alt;
123  const char *desc_id;
124  const char *desc_class;
125  const char *desc_title;
126  const char *desc_lang;
127  const char *desc_dir;
128  const char *desc_text;
130 };
131 
132 /* Importer Callbacks */
133 
134 typedef int (*AnxImportStream) (double presentation_time, double basetime,
135  char * utc, void * user_data);
136 typedef int (*AnxImportHead) (AnxHead * head, void * user_data);
137 typedef int (*AnxImportClip) (AnxClip * clip,
138  double time_offset, void * user_data);
139 typedef int (*AnxImportCMML) (const char * cmml, long n,
140  double time_offset, void * user_data);
141 
142 typedef int (*AnxImportImport) (double start_time, char * filename,
143  char * id, char * content_type,
144  double seek_offset, double seek_end,
145  void * user_data);
146 
148 
150  AnxImportStream import_stream;
151  AnxImportHead import_head;
152  AnxImportClip import_clip;
153  AnxImportCMML import_cmml;
154  void * import_user_data;
155  AnxImportImport import_import;
156  void * import_import_user_data;
157 };
158 
159 #endif /* __ANX_TYPES_H__ */