gavl
metadata.h
1 /*****************************************************************
2  * gavl - a general purpose audio/video processing library
3  *
4  * Copyright (c) 2001 - 2012 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 <inttypes.h>
30 
31 #include <gavl/gavldefs.h>
32 
56 #define GAVL_METADATA_DATE_STRING_LEN 11
57 
61 #define GAVL_METADATA_DATE_TIME_STRING_LEN 20
62 
66 typedef struct
67  {
68  char * key;
69  char * val;
71 
76 typedef struct
77  {
79  int tags_alloc;
80  int num_tags;
82 
87 GAVL_PUBLIC void
89 
98 GAVL_PUBLIC void
100 
109 GAVL_PUBLIC void
111  const char * key,
112  const char * val);
113 
123 GAVL_PUBLIC void
125  const char * key,
126  char * val);
127 
134 GAVL_PUBLIC
135 const char * gavl_metadata_get(const gavl_metadata_t * m,
136  const char * key);
137 
144 GAVL_PUBLIC
145 const char * gavl_metadata_get_i(const gavl_metadata_t * m,
146  const char * key);
147 
154 GAVL_PUBLIC void
156  const char * key,
157  int val);
158 
165 GAVL_PUBLIC void
167  const char * key,
168  int64_t val);
169 
177 GAVL_PUBLIC
179  const char * key, int * ret);
180 
188 GAVL_PUBLIC
190  const char * key, int64_t * ret);
191 
199 GAVL_PUBLIC
201  const char * key, int * ret);
202 
210 GAVL_PUBLIC
212  const char * key, int64_t * ret);
213 
214 
215 
224 GAVL_PUBLIC void
226  const char * key,
227  int year,
228  int month,
229  int day);
230 
240 GAVL_PUBLIC int
242  const char * key,
243  int * year,
244  int * month,
245  int * day);
246 
258 GAVL_PUBLIC void
260  const char * key,
261  int year,
262  int month,
263  int day,
264  int hour,
265  int minute,
266  int second);
267 
280 GAVL_PUBLIC int
282  const char * key,
283  int * year,
284  int * month,
285  int * day,
286  int * hour,
287  int * minute,
288  int * second);
289 
300 GAVL_PUBLIC void
302  int month,
303  int day, char * ret);
304 
318 GAVL_PUBLIC void
320  int month,
321  int day,
322  int hour,
323  int minute,
324  int second,
325  char * ret);
326 
337 GAVL_PUBLIC
339  const gavl_metadata_t * src1,
340  const gavl_metadata_t * src2);
341 
350 GAVL_PUBLIC
352  const gavl_metadata_t * src);
353 
361 GAVL_PUBLIC void
363  const gavl_metadata_t * src);
364 
370 GAVL_PUBLIC void
371 gavl_metadata_dump(const gavl_metadata_t * m, int indent);
372 
379 GAVL_PUBLIC int
381  const gavl_metadata_t * m2);
382 
392 GAVL_PUBLIC void
394 
401 GAVL_PUBLIC void
403 
411 GAVL_PUBLIC void
413 
419 GAVL_PUBLIC int
421 
422 
423 
428 #ifdef __cplusplus
429 }
430 #endif
431 
432 #endif // GAVL_METADATA_H_INCLUDED