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__)
47#else
48# include <annodex/anx_int64.h>
49#endif
50
51#ifndef _ANX_PRIVATE
55typedef void ANNODEX;
56#endif
57
58/* Annotation elements */
59typedef struct _AnxHead AnxHead;
60typedef struct _AnxClip AnxClip;
61typedef struct _AnxMetaElement AnxMetaElement;
62typedef 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
87struct _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
102struct _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
134typedef int (*AnxImportStream) (double presentation_time, double basetime,
135 char * utc, void * user_data);
136typedef int (*AnxImportHead) (AnxHead * head, void * user_data);
137typedef int (*AnxImportClip) (AnxClip * clip,
138 double time_offset, void * user_data);
139typedef int (*AnxImportCMML) (const char * cmml, long n,
140 double time_offset, void * user_data);
141
142typedef 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__ */
Platform specific types for anx_int64_t.
Win32 specific type for anx_int64_t.
A doubly linked list.
void ANNODEX
An ANNODEX handle.
Definition: anx_types.h:55
Definition: anx_types.h:102
const char * anchor_id
id attribute of anchor
Definition: anx_types.h:109
const char * title
title attribute of clip
Definition: anx_types.h:105
const char * anchor_text
anchor text
Definition: anx_types.h:115
const char * lang
language attribute of desc element
Definition: anx_types.h:106
const char * desc_dir
directionality of lang
Definition: anx_types.h:127
const char * track
track attribute of clip
Definition: anx_types.h:108
const char * clip_id
id attribute of clip
Definition: anx_types.h:103
const char * img_id
id attribute of image
Definition: anx_types.h:116
const char * img_src
keyframe image of clip
Definition: anx_types.h:121
const char * img_lang
language of img
Definition: anx_types.h:119
const char * anchor_title
title attribute of clip
Definition: anx_types.h:111
const char * desc_lang
language attribute of desc element
Definition: anx_types.h:126
const char * anchor_href
href out of clip
Definition: anx_types.h:114
const char * desc_class
class attribute of desc
Definition: anx_types.h:124
const char * desc_title
title attribute of desc
Definition: anx_types.h:125
AnxList * meta
list of meta elements
Definition: anx_types.h:129
const char * img_title
title attribute of image
Definition: anx_types.h:118
const char * img_dir
directionality of lang
Definition: anx_types.h:120
const char * anchor_dir
directionality of lang
Definition: anx_types.h:113
const char * img_alt
alternate text for image
Definition: anx_types.h:122
const char * anchor_lang
language of anchor
Definition: anx_types.h:112
const char * anchor_class
class attribute of clip
Definition: anx_types.h:110
const char * desc_text
the description itself
Definition: anx_types.h:128
const char * dir
directionality of lang
Definition: anx_types.h:107
const char * desc_id
id attribute of desc element
Definition: anx_types.h:123
const char * img_class
class attribute of image
Definition: anx_types.h:117
Definition: anx_types.h:87
const char * lang
language of header
Definition: anx_types.h:89
const char * title_dir
directionality of title_lang
Definition: anx_types.h:95
AnxList * meta
list of meta elements
Definition: anx_types.h:98
const char * base_id
id attribute of base element
Definition: anx_types.h:96
AnxList * link
list of link elements
Definition: anx_types.h:99
const char * base_href
href attribute of base element
Definition: anx_types.h:97
const char * title_lang
language of title
Definition: anx_types.h:94
const char * profile
profile of header
Definition: anx_types.h:91
const char * title_id
id attribute of title element
Definition: anx_types.h:93
const char * dir
directionality of lang
Definition: anx_types.h:90
const char * title
title element of header
Definition: anx_types.h:92
const char * head_id
id attribute of header
Definition: anx_types.h:88
Definition: anx_types.h:149
Definition: anx_types.h:73
char * lang
language code of link
Definition: anx_types.h:77
char * media
media attribute of link
Definition: anx_types.h:83
char * title
title attribute of link
Definition: anx_types.h:76
char * href
href attribute of link
Definition: anx_types.h:79
char * type
type attribute of link
Definition: anx_types.h:80
char * rev
rev attribute of link
Definition: anx_types.h:82
char * id
id attribute of link
Definition: anx_types.h:74
char * dir
directionality of lang (ltr/rtl)
Definition: anx_types.h:78
char * rel
rel attribute of link
Definition: anx_types.h:81
Definition: anx_list.h:47
Definition: anx_types.h:64
const char * lang
language code of meta element
Definition: anx_types.h:66
const char * dir
directionality of lang (ltr/rtl)
Definition: anx_types.h:67
const char * id
id attribute of meta element
Definition: anx_types.h:65
const char * name
property name of meta element
Definition: anx_types.h:68
const char * content
property value of meta element
Definition: anx_types.h:69
const char * scheme
scheme name of meta element
Definition: anx_types.h:70