gavl
metadata.h
1 /*****************************************************************
2  * gavl - a general purpose audio/video processing library
3  *
4  * Copyright (c) 2001 - 2011 Members of the Gmerlin project
5  * gmerlin-general@lists.sourceforge.net
6  * http://gmerlin.sourceforge.net
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  * *****************************************************************/
21 
22 #ifndef GAVL_METADATA_H_INCLUDED
23 #define GAVL_METADATA_H_INCLUDED
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 #include <gavl/gavldefs.h>
30 
54 #define GAVL_METADATA_DATE_STRING_LEN 11
55 
59 #define GAVL_METADATA_DATE_TIME_STRING_LEN 20
60 
64 typedef struct
65  {
66  char * key;
67  char * val;
69 
74 typedef struct
75  {
77  int tags_alloc;
78  int num_tags;
80 
85 GAVL_PUBLIC void
87 
96 GAVL_PUBLIC void
98 
107 GAVL_PUBLIC void
109  const char * key,
110  const char * val);
111 
121 GAVL_PUBLIC void
123  const char * key,
124  char * val);
125 
132 GAVL_PUBLIC
133 const char * gavl_metadata_get(const gavl_metadata_t * m,
134  const char * key);
135 
142 GAVL_PUBLIC void
144  const char * key,
145  int val);
146 
154 GAVL_PUBLIC
156  const char * key, int * ret);
157 
166 GAVL_PUBLIC void
168  const char * key,
169  int year,
170  int month,
171  int day);
172 
182 GAVL_PUBLIC int
184  const char * key,
185  int * year,
186  int * month,
187  int * day);
188 
200 GAVL_PUBLIC void
202  const char * key,
203  int year,
204  int month,
205  int day,
206  int hour,
207  int minute,
208  int second);
209 
222 GAVL_PUBLIC int
224  const char * key,
225  int * year,
226  int * month,
227  int * day,
228  int * hour,
229  int * minute,
230  int * second);
231 
242 GAVL_PUBLIC void
244  int month,
245  int day, char * ret);
246 
260 GAVL_PUBLIC void
262  int month,
263  int day,
264  int hour,
265  int minute,
266  int second,
267  char * ret);
268 
279 GAVL_PUBLIC
281  const gavl_metadata_t * src1,
282  const gavl_metadata_t * src2);
283 
292 GAVL_PUBLIC
294  const gavl_metadata_t * src);
295 
303 GAVL_PUBLIC void
305  const gavl_metadata_t * src);
306 
312 GAVL_PUBLIC void
313 gavl_metadata_dump(const gavl_metadata_t * m, int indent);
314 
321 GAVL_PUBLIC int
323  const gavl_metadata_t * m2);
324 
329 #ifdef __cplusplus
330 }
331 #endif
332 
333 #endif // GAVL_METADATA_H_INCLUDED