aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/gstreamer_extractor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/gstreamer_extractor.c')
-rw-r--r--src/plugins/gstreamer_extractor.c1124
1 files changed, 634 insertions, 490 deletions
diff --git a/src/plugins/gstreamer_extractor.c b/src/plugins/gstreamer_extractor.c
index a293949..8370f36 100644
--- a/src/plugins/gstreamer_extractor.c
+++ b/src/plugins/gstreamer_extractor.c
@@ -34,581 +34,710 @@
34GST_DEBUG_CATEGORY_STATIC (gstreamer_extractor); 34GST_DEBUG_CATEGORY_STATIC (gstreamer_extractor);
35#define GST_CAT_DEFAULT gstreamer_extractor 35#define GST_CAT_DEFAULT gstreamer_extractor
36 36
37
38/**
39 * Struct mapping GSTREAMER tags to LE tags.
40 */
37struct KnownTag 41struct KnownTag
38{ 42{
43 /**
44 * GStreamer tag.
45 */
39 const char *gst_tag_id; 46 const char *gst_tag_id;
47
48 /**
49 * Corresponding LE tag.
50 */
40 enum EXTRACTOR_MetaType le_type; 51 enum EXTRACTOR_MetaType le_type;
41}; 52};
42 53
43struct KnownTag __known_tags[] = 54
55static struct KnownTag __known_tags[] =
44{ 56{
45/** 57 /**
46 * GST_TAG_TITLE: 58 * GST_TAG_TITLE:
47 * 59 *
48 * commonly used title (string) 60 * commonly used title (string)
49 * 61 *
50 * The title as it should be displayed, e.g. 'The Doll House' 62 * The title as it should be displayed, e.g. 'The Doll House'
51 */ 63 */
52 {GST_TAG_TITLE, EXTRACTOR_METATYPE_TITLE}, 64 {GST_TAG_TITLE, EXTRACTOR_METATYPE_TITLE},
53/** 65
54 * GST_TAG_TITLE_SORTNAME: 66 /**
55 * 67 * GST_TAG_TITLE_SORTNAME:
56 * commonly used title, as used for sorting (string) 68 *
57 * 69 * commonly used title, as used for sorting (string)
58 * The title as it should be sorted, e.g. 'Doll House, The' 70 *
59 */ 71 * The title as it should be sorted, e.g. 'Doll House, The'
72 */
60 {GST_TAG_TITLE_SORTNAME, EXTRACTOR_METATYPE_TITLE}, 73 {GST_TAG_TITLE_SORTNAME, EXTRACTOR_METATYPE_TITLE},
61/** 74
62 * GST_TAG_ARTIST: 75 /**
63 * 76 * GST_TAG_ARTIST:
64 * person(s) responsible for the recording (string) 77 *
65 * 78 * person(s) responsible for the recording (string)
66 * The artist name as it should be displayed, e.g. 'Jimi Hendrix' or 79 *
67 * 'The Guitar Heroes' 80 * The artist name as it should be displayed, e.g. 'Jimi Hendrix' or
68 */ 81 * 'The Guitar Heroes'
82 */
69 {GST_TAG_ARTIST, EXTRACTOR_METATYPE_ARTIST}, 83 {GST_TAG_ARTIST, EXTRACTOR_METATYPE_ARTIST},
70/** 84
71 * GST_TAG_ARTIST_SORTNAME: 85 /**
72 * 86 * GST_TAG_ARTIST_SORTNAME:
73 * person(s) responsible for the recording, as used for sorting (string) 87 *
74 * 88 * person(s) responsible for the recording, as used for sorting (string)
75 * The artist name as it should be sorted, e.g. 'Hendrix, Jimi' or 89 *
76 * 'Guitar Heroes, The' 90 * The artist name as it should be sorted, e.g. 'Hendrix, Jimi' or
77 */ 91 * 'Guitar Heroes, The'
92 */
78 {GST_TAG_ARTIST_SORTNAME, EXTRACTOR_METATYPE_ARTIST}, 93 {GST_TAG_ARTIST_SORTNAME, EXTRACTOR_METATYPE_ARTIST},
79/** 94
80 * GST_TAG_ALBUM: 95 /**
81 * 96 * GST_TAG_ALBUM:
82 * album containing this data (string) 97 *
83 * 98 * album containing this data (string)
84 * The album name as it should be displayed, e.g. 'The Jazz Guitar' 99 *
85 */ 100 * The album name as it should be displayed, e.g. 'The Jazz Guitar'
101 */
86 {GST_TAG_ALBUM, EXTRACTOR_METATYPE_ALBUM}, 102 {GST_TAG_ALBUM, EXTRACTOR_METATYPE_ALBUM},
87/** 103
88 * GST_TAG_ALBUM_SORTNAME: 104 /**
89 * 105 * GST_TAG_ALBUM_SORTNAME:
90 * album containing this data, as used for sorting (string) 106 *
91 * 107 * album containing this data, as used for sorting (string)
92 * The album name as it should be sorted, e.g. 'Jazz Guitar, The' 108 *
93 */ 109 * The album name as it should be sorted, e.g. 'Jazz Guitar, The'
110 */
94 {GST_TAG_ALBUM_SORTNAME, EXTRACTOR_METATYPE_ALBUM}, 111 {GST_TAG_ALBUM_SORTNAME, EXTRACTOR_METATYPE_ALBUM},
95/** 112
96 * GST_TAG_ALBUM_ARTIST: 113 /**
97 * 114 * GST_TAG_ALBUM_ARTIST:
98 * The artist of the entire album, as it should be displayed. 115 *
99 */ 116 * The artist of the entire album, as it should be displayed.
117 */
100 {GST_TAG_ALBUM_ARTIST, EXTRACTOR_METATYPE_ARTIST}, 118 {GST_TAG_ALBUM_ARTIST, EXTRACTOR_METATYPE_ARTIST},
101/** 119
102 * GST_TAG_ALBUM_ARTIST_SORTNAME: 120 /**
103 * 121 * GST_TAG_ALBUM_ARTIST_SORTNAME:
104 * The artist of the entire album, as it should be sorted. 122 *
105 */ 123 * The artist of the entire album, as it should be sorted.
124 */
106 {GST_TAG_ALBUM_ARTIST_SORTNAME, EXTRACTOR_METATYPE_ARTIST}, 125 {GST_TAG_ALBUM_ARTIST_SORTNAME, EXTRACTOR_METATYPE_ARTIST},
107/** 126
108 * GST_TAG_COMPOSER: 127 /**
109 * 128 * GST_TAG_COMPOSER:
110 * person(s) who composed the recording (string) 129 *
111 */ 130 * person(s) who composed the recording (string)
131 */
112 {GST_TAG_COMPOSER, EXTRACTOR_METATYPE_COMPOSER}, 132 {GST_TAG_COMPOSER, EXTRACTOR_METATYPE_COMPOSER},
113/** 133
114 * GST_TAG_DATE: 134 /**
115 * 135 * GST_TAG_DATE:
116 * date the data was created (#GDate structure) 136 *
117 */ 137 * date the data was created (#GDate structure)
138 */
118 {GST_TAG_DATE, EXTRACTOR_METATYPE_CREATION_TIME}, 139 {GST_TAG_DATE, EXTRACTOR_METATYPE_CREATION_TIME},
119/** 140
120 * GST_TAG_DATE_TIME: 141 /**
121 * 142 * GST_TAG_DATE_TIME:
122 * date and time the data was created (#GstDateTime structure) 143 *
123 */ 144 * date and time the data was created (#GstDateTime structure)
145 */
124 {GST_TAG_DATE_TIME, EXTRACTOR_METATYPE_CREATION_TIME}, 146 {GST_TAG_DATE_TIME, EXTRACTOR_METATYPE_CREATION_TIME},
125/** 147
126 * GST_TAG_GENRE: 148 /**
127 * 149 * GST_TAG_GENRE:
128 * genre this data belongs to (string) 150 *
129 */ 151 * genre this data belongs to (string)
152 */
130 {GST_TAG_GENRE, EXTRACTOR_METATYPE_GENRE}, 153 {GST_TAG_GENRE, EXTRACTOR_METATYPE_GENRE},
131/** 154
132 * GST_TAG_COMMENT: 155 /**
133 * 156 * GST_TAG_COMMENT:
134 * free text commenting the data (string) 157 *
135 */ 158 * free text commenting the data (string)
159 */
136 {GST_TAG_COMMENT, EXTRACTOR_METATYPE_COMMENT}, 160 {GST_TAG_COMMENT, EXTRACTOR_METATYPE_COMMENT},
137/** 161
138 * GST_TAG_EXTENDED_COMMENT: 162 /**
139 * 163 * GST_TAG_EXTENDED_COMMENT:
140 * key/value text commenting the data (string) 164 *
141 * 165 * key/value text commenting the data (string)
142 * Must be in the form of 'key=comment' or 166 *
143 * 'key[lc]=comment' where 'lc' is an ISO-639 167 * Must be in the form of 'key=comment' or
144 * language code. 168 * 'key[lc]=comment' where 'lc' is an ISO-639
145 * 169 * language code.
146 * This tag is used for unknown Vorbis comment tags, 170 *
147 * unknown APE tags and certain ID3v2 comment fields. 171 * This tag is used for unknown Vorbis comment tags,
148 */ 172 * unknown APE tags and certain ID3v2 comment fields.
149 {GST_TAG_EXTENDED_COMMENT, EXTRACTOR_METATYPE_UNKNOWN}, 173 */
150/** 174 {GST_TAG_EXTENDED_COMMENT, EXTRACTOR_METATYPE_COMMENT},
151 * GST_TAG_TRACK_NUMBER: 175
152 * 176 /**
153 * track number inside a collection (unsigned integer) 177 * GST_TAG_TRACK_NUMBER:
154 */ 178 *
179 * track number inside a collection (unsigned integer)
180 */
155 {GST_TAG_TRACK_NUMBER, EXTRACTOR_METATYPE_TRACK_NUMBER}, 181 {GST_TAG_TRACK_NUMBER, EXTRACTOR_METATYPE_TRACK_NUMBER},
156/** 182
157 * GST_TAG_TRACK_COUNT: 183 /**
158 * 184 * GST_TAG_TRACK_COUNT:
159 * count of tracks inside collection this track belongs to (unsigned integer) 185 *
160 */ 186 * count of tracks inside collection this track belongs to (unsigned integer)
187 */
161 {GST_TAG_TRACK_COUNT, EXTRACTOR_METATYPE_SONG_COUNT}, 188 {GST_TAG_TRACK_COUNT, EXTRACTOR_METATYPE_SONG_COUNT},
162/** 189
163 * GST_TAG_ALBUM_VOLUME_NUMBER: 190 /**
164 * 191 * GST_TAG_ALBUM_VOLUME_NUMBER:
165 * disc number inside a collection (unsigned integer) 192 *
166 */ 193 * disc number inside a collection (unsigned integer)
194 */
167 {GST_TAG_ALBUM_VOLUME_NUMBER, EXTRACTOR_METATYPE_DISC_NUMBER}, 195 {GST_TAG_ALBUM_VOLUME_NUMBER, EXTRACTOR_METATYPE_DISC_NUMBER},
168/** 196
169 * GST_TAG_ALBUM_VOLUME_COUNT: 197 /**
170 * 198 * GST_TAG_ALBUM_VOLUME_COUNT:
171 * count of discs inside collection this disc belongs to (unsigned integer) 199 *
172 */ 200 * count of discs inside collection this disc belongs to (unsigned integer)
201 */
173 {GST_TAG_ALBUM_VOLUME_NUMBER, EXTRACTOR_METATYPE_DISC_COUNT}, 202 {GST_TAG_ALBUM_VOLUME_NUMBER, EXTRACTOR_METATYPE_DISC_COUNT},
174/** 203
175 * GST_TAG_LOCATION: 204 /**
176 * 205 * GST_TAG_LOCATION:
177 * Origin of media as a URI (location, where the original of the file or stream 206 *
178 * is hosted) (string) 207 * Origin of media as a URI (location, where the original of the file or stream
179 */ 208 * is hosted) (string)
209 */
180 {GST_TAG_LOCATION, EXTRACTOR_METATYPE_URL}, 210 {GST_TAG_LOCATION, EXTRACTOR_METATYPE_URL},
181/** 211
182 * GST_TAG_HOMEPAGE: 212 /**
183 * 213 * GST_TAG_HOMEPAGE:
184 * Homepage for this media (i.e. artist or movie homepage) (string) 214 *
185 */ 215 * Homepage for this media (i.e. artist or movie homepage) (string)
216 */
186 {GST_TAG_HOMEPAGE, EXTRACTOR_METATYPE_URL}, 217 {GST_TAG_HOMEPAGE, EXTRACTOR_METATYPE_URL},
187/** 218
188 * GST_TAG_DESCRIPTION: 219 /**
189 * 220 * GST_TAG_DESCRIPTION:
190 * short text describing the content of the data (string) 221 *
191 */ 222 * short text describing the content of the data (string)
223 */
192 {GST_TAG_DESCRIPTION, EXTRACTOR_METATYPE_DESCRIPTION}, 224 {GST_TAG_DESCRIPTION, EXTRACTOR_METATYPE_DESCRIPTION},
193/** 225
194 * GST_TAG_VERSION: 226 /**
195 * 227 * GST_TAG_VERSION:
196 * version of this data (string) 228 *
197 */ 229 * version of this data (string)
230 */
198 {GST_TAG_VERSION, EXTRACTOR_METATYPE_PRODUCT_VERSION}, 231 {GST_TAG_VERSION, EXTRACTOR_METATYPE_PRODUCT_VERSION},
199/** 232
200 * GST_TAG_ISRC: 233 /**
201 * 234 * GST_TAG_ISRC:
202 * International Standard Recording Code - see http://www.ifpi.org/isrc/ (string) 235 *
203 */ 236 * International Standard Recording Code - see http://www.ifpi.org/isrc/ (string)
237 */
204 {GST_TAG_ISRC, EXTRACTOR_METATYPE_ISRC}, 238 {GST_TAG_ISRC, EXTRACTOR_METATYPE_ISRC},
205/** 239
206 * GST_TAG_ORGANIZATION: 240 /**
207 * 241 * GST_TAG_ORGANIZATION:
208 * organization (string) 242 *
209 */ 243 * organization (string)
244 */
210 {GST_TAG_ORGANIZATION, EXTRACTOR_METATYPE_COMPANY}, 245 {GST_TAG_ORGANIZATION, EXTRACTOR_METATYPE_COMPANY},
211/** 246
212 * GST_TAG_COPYRIGHT: 247 /**
213 * 248 * GST_TAG_COPYRIGHT:
214 * copyright notice of the data (string) 249 *
215 */ 250 * copyright notice of the data (string)
251 */
216 {GST_TAG_COPYRIGHT, EXTRACTOR_METATYPE_COPYRIGHT}, 252 {GST_TAG_COPYRIGHT, EXTRACTOR_METATYPE_COPYRIGHT},
217/** 253
218 * GST_TAG_COPYRIGHT_URI: 254 /**
219 * 255 * GST_TAG_COPYRIGHT_URI:
220 * URI to location where copyright details can be found (string) 256 *
221 */ 257 * URI to location where copyright details can be found (string)
258 */
222 {GST_TAG_COPYRIGHT_URI, EXTRACTOR_METATYPE_COPYRIGHT}, 259 {GST_TAG_COPYRIGHT_URI, EXTRACTOR_METATYPE_COPYRIGHT},
223/** 260
224 * GST_TAG_ENCODED_BY: 261 /**
225 * 262 * GST_TAG_ENCODED_BY:
226 * name of the person or organisation that encoded the file. May contain a 263 *
227 * copyright message if the person or organisation also holds the copyright 264 * name of the person or organisation that encoded the file. May contain a
228 * (string) 265 * copyright message if the person or organisation also holds the copyright
229 * 266 * (string)
230 * Note: do not use this field to describe the encoding application. Use 267 *
231 * #GST_TAG_APPLICATION_NAME or #GST_TAG_COMMENT for that. 268 * Note: do not use this field to describe the encoding application. Use
232 */ 269 * #GST_TAG_APPLICATION_NAME or #GST_TAG_COMMENT for that.
270 */
233 {GST_TAG_ENCODED_BY, EXTRACTOR_METATYPE_ENCODED_BY}, 271 {GST_TAG_ENCODED_BY, EXTRACTOR_METATYPE_ENCODED_BY},
234/** 272
235 * GST_TAG_CONTACT: 273 /**
236 * 274 * GST_TAG_CONTACT:
237 * contact information (string) 275 *
238 */ 276 * contact information (string)
277 */
239 {GST_TAG_CONTACT, EXTRACTOR_METATYPE_CONTACT_INFORMATION}, 278 {GST_TAG_CONTACT, EXTRACTOR_METATYPE_CONTACT_INFORMATION},
240/** 279
241 * GST_TAG_LICENSE: 280 /**
242 * 281 * GST_TAG_LICENSE:
243 * license of data (string) 282 *
244 */ 283 * license of data (string)
284 */
245 {GST_TAG_LICENSE, EXTRACTOR_METATYPE_LICENSE}, 285 {GST_TAG_LICENSE, EXTRACTOR_METATYPE_LICENSE},
246/** 286
247 * GST_TAG_LICENSE_URI: 287 /**
248 * 288 * GST_TAG_LICENSE_URI:
249 * URI to location where license details can be found (string) 289 *
250 */ 290 * URI to location where license details can be found (string)
291 */
251 {GST_TAG_LICENSE_URI, EXTRACTOR_METATYPE_LICENSE}, 292 {GST_TAG_LICENSE_URI, EXTRACTOR_METATYPE_LICENSE},
252/** 293
253 * GST_TAG_PERFORMER: 294 /**
254 * 295 * GST_TAG_PERFORMER:
255 * person(s) performing (string) 296 *
256 */ 297 * person(s) performing (string)
298 */
257 {GST_TAG_PERFORMER, EXTRACTOR_METATYPE_PERFORMER}, 299 {GST_TAG_PERFORMER, EXTRACTOR_METATYPE_PERFORMER},
258/** 300
259 * GST_TAG_DURATION: 301 /**
260 * 302 * GST_TAG_DURATION:
261 * length in GStreamer time units (nanoseconds) (unsigned 64-bit integer) 303 *
262 */ 304 * length in GStreamer time units (nanoseconds) (unsigned 64-bit integer)
305 */
263 {GST_TAG_DURATION, EXTRACTOR_METATYPE_DURATION}, 306 {GST_TAG_DURATION, EXTRACTOR_METATYPE_DURATION},
264/** 307
265 * GST_TAG_CODEC: 308 /**
266 * 309 * GST_TAG_CODEC:
267 * codec the data is stored in (string) 310 *
268 */ 311 * codec the data is stored in (string)
312 */
269 {GST_TAG_CODEC, EXTRACTOR_METATYPE_CODEC}, 313 {GST_TAG_CODEC, EXTRACTOR_METATYPE_CODEC},
270/** 314
271 * GST_TAG_VIDEO_CODEC: 315 /**
272 * 316 * GST_TAG_VIDEO_CODEC:
273 * codec the video data is stored in (string) 317 *
274 */ 318 * codec the video data is stored in (string)
319 */
275 {GST_TAG_VIDEO_CODEC, EXTRACTOR_METATYPE_VIDEO_CODEC}, 320 {GST_TAG_VIDEO_CODEC, EXTRACTOR_METATYPE_VIDEO_CODEC},
276/** 321
277 * GST_TAG_AUDIO_CODEC: 322 /**
278 * 323 * GST_TAG_AUDIO_CODEC:
279 * codec the audio data is stored in (string) 324 *
280 */ 325 * codec the audio data is stored in (string)
326 */
281 {GST_TAG_AUDIO_CODEC, EXTRACTOR_METATYPE_AUDIO_CODEC}, 327 {GST_TAG_AUDIO_CODEC, EXTRACTOR_METATYPE_AUDIO_CODEC},
282/** 328
283 * GST_TAG_SUBTITLE_CODEC: 329 /**
284 * 330 * GST_TAG_SUBTITLE_CODEC:
285 * codec/format the subtitle data is stored in (string) 331 *
286 */ 332 * codec/format the subtitle data is stored in (string)
333 */
287 {GST_TAG_SUBTITLE_CODEC, EXTRACTOR_METATYPE_SUBTITLE_CODEC}, 334 {GST_TAG_SUBTITLE_CODEC, EXTRACTOR_METATYPE_SUBTITLE_CODEC},
288/** 335
289 * GST_TAG_CONTAINER_FORMAT: 336 /**
290 * 337 * GST_TAG_CONTAINER_FORMAT:
291 * container format the data is stored in (string) 338 *
292 */ 339 * container format the data is stored in (string)
340 */
293 {GST_TAG_CONTAINER_FORMAT, EXTRACTOR_METATYPE_CONTAINER_FORMAT}, 341 {GST_TAG_CONTAINER_FORMAT, EXTRACTOR_METATYPE_CONTAINER_FORMAT},
294/** 342
295 * GST_TAG_BITRATE: 343 /**
296 * 344 * GST_TAG_BITRATE:
297 * exact or average bitrate in bits/s (unsigned integer) 345 *
298 */ 346 * exact or average bitrate in bits/s (unsigned integer)
347 */
299 {GST_TAG_BITRATE, EXTRACTOR_METATYPE_BITRATE}, 348 {GST_TAG_BITRATE, EXTRACTOR_METATYPE_BITRATE},
300/** 349
301 * GST_TAG_NOMINAL_BITRATE: 350 /**
302 * 351 * GST_TAG_NOMINAL_BITRATE:
303 * nominal bitrate in bits/s (unsigned integer). The actual bitrate might be 352 *
304 * different from this target bitrate. 353 * nominal bitrate in bits/s (unsigned integer). The actual bitrate might be
305 */ 354 * different from this target bitrate.
355 */
306 {GST_TAG_NOMINAL_BITRATE, EXTRACTOR_METATYPE_NOMINAL_BITRATE}, 356 {GST_TAG_NOMINAL_BITRATE, EXTRACTOR_METATYPE_NOMINAL_BITRATE},
307/** 357
308 * GST_TAG_MINIMUM_BITRATE: 358 /**
309 * 359 * GST_TAG_MINIMUM_BITRATE:
310 * minimum bitrate in bits/s (unsigned integer) 360 *
311 */ 361 * minimum bitrate in bits/s (unsigned integer)
362 */
312 {GST_TAG_MINIMUM_BITRATE, EXTRACTOR_METATYPE_MINIMUM_BITRATE}, 363 {GST_TAG_MINIMUM_BITRATE, EXTRACTOR_METATYPE_MINIMUM_BITRATE},
313/** 364
314 * GST_TAG_MAXIMUM_BITRATE: 365 /**
315 * 366 * GST_TAG_MAXIMUM_BITRATE:
316 * maximum bitrate in bits/s (unsigned integer) 367 *
317 */ 368 * maximum bitrate in bits/s (unsigned integer)
369 */
318 {GST_TAG_MAXIMUM_BITRATE, EXTRACTOR_METATYPE_MAXIMUM_BITRATE}, 370 {GST_TAG_MAXIMUM_BITRATE, EXTRACTOR_METATYPE_MAXIMUM_BITRATE},
319/** 371
320 * GST_TAG_SERIAL: 372 /**
321 * 373 * GST_TAG_SERIAL:
322 * serial number of track (unsigned integer) 374 *
323 */ 375 * serial number of track (unsigned integer)
376 */
324 {GST_TAG_SERIAL, EXTRACTOR_METATYPE_SERIAL}, 377 {GST_TAG_SERIAL, EXTRACTOR_METATYPE_SERIAL},
325/** 378
326 * GST_TAG_ENCODER: 379 /**
327 * 380 * GST_TAG_ENCODER:
328 * encoder used to encode this stream (string) 381 *
329 */ 382 * encoder used to encode this stream (string)
383 */
330 {GST_TAG_ENCODER, EXTRACTOR_METATYPE_ENCODER}, /* New */ 384 {GST_TAG_ENCODER, EXTRACTOR_METATYPE_ENCODER}, /* New */
331/** 385
332 * GST_TAG_ENCODER_VERSION: 386 /**
333 * 387 * GST_TAG_ENCODER_VERSION:
334 * version of the encoder used to encode this stream (unsigned integer) 388 *
335 */ 389 * version of the encoder used to encode this stream (unsigned integer)
390 */
336 {GST_TAG_ENCODER_VERSION, EXTRACTOR_METATYPE_ENCODER_VERSION}, 391 {GST_TAG_ENCODER_VERSION, EXTRACTOR_METATYPE_ENCODER_VERSION},
337/** 392
338 * GST_TAG_TRACK_GAIN: 393 /**
339 * 394 * GST_TAG_TRACK_GAIN:
340 * track gain in db (double) 395 *
341 */ 396 * track gain in db (double)
397 */
342 {GST_TAG_TRACK_GAIN, EXTRACTOR_METATYPE_TRACK_GAIN}, 398 {GST_TAG_TRACK_GAIN, EXTRACTOR_METATYPE_TRACK_GAIN},
343/** 399
344 * GST_TAG_TRACK_PEAK: 400 /**
345 * 401 * GST_TAG_TRACK_PEAK:
346 * peak of the track (double) 402 *
347 */ 403 * peak of the track (double)
404 */
348 {GST_TAG_TRACK_PEAK, EXTRACTOR_METATYPE_TRACK_PEAK}, 405 {GST_TAG_TRACK_PEAK, EXTRACTOR_METATYPE_TRACK_PEAK},
349/** 406
350 * GST_TAG_ALBUM_GAIN: 407 /**
351 * 408 * GST_TAG_ALBUM_GAIN:
352 * album gain in db (double) 409 *
353 */ 410 * album gain in db (double)
411 */
354 {GST_TAG_ALBUM_GAIN, EXTRACTOR_METATYPE_ALBUM_GAIN}, 412 {GST_TAG_ALBUM_GAIN, EXTRACTOR_METATYPE_ALBUM_GAIN},
355/** 413
356 * GST_TAG_ALBUM_PEAK: 414 /**
357 * 415 * GST_TAG_ALBUM_PEAK:
358 * peak of the album (double) 416 *
359 */ 417 * peak of the album (double)
418 */
360 {GST_TAG_ALBUM_PEAK, EXTRACTOR_METATYPE_ALBUM_PEAK}, 419 {GST_TAG_ALBUM_PEAK, EXTRACTOR_METATYPE_ALBUM_PEAK},
361/** 420
362 * GST_TAG_REFERENCE_LEVEL: 421 /**
363 * 422 * GST_TAG_REFERENCE_LEVEL:
364 * reference level of track and album gain values (double) 423 *
365 */ 424 * reference level of track and album gain values (double)
425 */
366 {GST_TAG_REFERENCE_LEVEL, EXTRACTOR_METATYPE_REFERENCE_LEVEL}, 426 {GST_TAG_REFERENCE_LEVEL, EXTRACTOR_METATYPE_REFERENCE_LEVEL},
367/** 427
368 * GST_TAG_LANGUAGE_CODE: 428 /**
369 * 429 * GST_TAG_LANGUAGE_CODE:
370 * ISO-639-2 or ISO-639-1 code for the language the content is in (string) 430 *
371 * 431 * ISO-639-2 or ISO-639-1 code for the language the content is in (string)
372 * There is utility API in libgsttag in gst-plugins-base to obtain a translated 432 *
373 * language name from the language code: gst_tag_get_language_name() 433 * There is utility API in libgsttag in gst-plugins-base to obtain a translated
374 */ 434 * language name from the language code: gst_tag_get_language_name()
435 */
375 {GST_TAG_LANGUAGE_CODE, EXTRACTOR_METATYPE_LANGUAGE}, 436 {GST_TAG_LANGUAGE_CODE, EXTRACTOR_METATYPE_LANGUAGE},
376/** 437
377 * GST_TAG_LANGUAGE_NAME: 438 /**
378 * 439 * GST_TAG_LANGUAGE_NAME:
379 * Name of the language the content is in (string) 440 *
380 * 441 * Name of the language the content is in (string)
381 * Free-form name of the language the content is in, if a language code 442 *
382 * is not available. This tag should not be set in addition to a language 443 * Free-form name of the language the content is in, if a language code
383 * code. It is undefined what language or locale the language name is in. 444 * is not available. This tag should not be set in addition to a language
384 */ 445 * code. It is undefined what language or locale the language name is in.
446 */
385 {GST_TAG_LANGUAGE_NAME, EXTRACTOR_METATYPE_LANGUAGE}, 447 {GST_TAG_LANGUAGE_NAME, EXTRACTOR_METATYPE_LANGUAGE},
386/** 448
387 * GST_TAG_IMAGE: 449 /**
388 * 450 * GST_TAG_IMAGE:
389 * image (sample) (sample taglist should specify the content type and preferably 451 *
390 * also set "image-type" field as #GstTagImageType) 452 * image (sample) (sample taglist should specify the content type and preferably
391 */ 453 * also set "image-type" field as #GstTagImageType)
454 */
392 {GST_TAG_IMAGE, EXTRACTOR_METATYPE_PICTURE}, 455 {GST_TAG_IMAGE, EXTRACTOR_METATYPE_PICTURE},
393/** 456
394 * GST_TAG_PREVIEW_IMAGE: 457 /**
395 * 458 * GST_TAG_PREVIEW_IMAGE:
396 * image that is meant for preview purposes, e.g. small icon-sized version 459 *
397 * (sample) (sample taglist should specify the content type) 460 * image that is meant for preview purposes, e.g. small icon-sized version
398 */ 461 * (sample) (sample taglist should specify the content type)
462 */
399 {GST_TAG_IMAGE, EXTRACTOR_METATYPE_THUMBNAIL}, 463 {GST_TAG_IMAGE, EXTRACTOR_METATYPE_THUMBNAIL},
400/** 464
401 * GST_TAG_ATTACHMENT: 465 /**
402 * 466 * GST_TAG_ATTACHMENT:
403 * generic file attachment (sample) (sample taglist should specify the content 467 *
404 * type and if possible set "filename" to the file name of the 468 * generic file attachment (sample) (sample taglist should specify the content
405 * attachment) 469 * type and if possible set "filename" to the file name of the
406 */ 470 * attachment)
471 */
407 /* No equivalent, and none needed? */ 472 /* No equivalent, and none needed? */
408/** 473
409 * GST_TAG_BEATS_PER_MINUTE: 474 /**
410 * 475 * GST_TAG_BEATS_PER_MINUTE:
411 * number of beats per minute in audio (double) 476 *
412 */ 477 * number of beats per minute in audio (double)
478 */
413 {GST_TAG_BEATS_PER_MINUTE, EXTRACTOR_METATYPE_BEATS_PER_MINUTE}, 479 {GST_TAG_BEATS_PER_MINUTE, EXTRACTOR_METATYPE_BEATS_PER_MINUTE},
414/** 480
415 * GST_TAG_KEYWORDS: 481 /**
416 * 482 * GST_TAG_KEYWORDS:
417 * comma separated keywords describing the content (string). 483 *
418 */ 484 * comma separated keywords describing the content (string).
485 */
419 {GST_TAG_KEYWORDS, EXTRACTOR_METATYPE_KEYWORDS}, 486 {GST_TAG_KEYWORDS, EXTRACTOR_METATYPE_KEYWORDS},
420/** 487
421 * GST_TAG_GEO_LOCATION_NAME: 488 /**
422 * 489 * GST_TAG_GEO_LOCATION_NAME:
423 * human readable descriptive location of where the media has been recorded or 490 *
424 * produced. (string). 491 * human readable descriptive location of where the media has been recorded or
425 */ 492 * produced. (string).
493 */
426 {GST_TAG_GEO_LOCATION_NAME, EXTRACTOR_METATYPE_LOCATION_NAME}, 494 {GST_TAG_GEO_LOCATION_NAME, EXTRACTOR_METATYPE_LOCATION_NAME},
427/** 495
428 * GST_TAG_GEO_LOCATION_LATITUDE: 496 /**
429 * 497 * GST_TAG_GEO_LOCATION_LATITUDE:
430 * geo latitude location of where the media has been recorded or produced in 498 *
431 * degrees according to WGS84 (zero at the equator, negative values for southern 499 * geo latitude location of where the media has been recorded or produced in
432 * latitudes) (double). 500 * degrees according to WGS84 (zero at the equator, negative values for southern
433 */ 501 * latitudes) (double).
502 */
434 {GST_TAG_GEO_LOCATION_LATITUDE, EXTRACTOR_METATYPE_GPS_LATITUDE}, 503 {GST_TAG_GEO_LOCATION_LATITUDE, EXTRACTOR_METATYPE_GPS_LATITUDE},
435/** 504
436 * GST_TAG_GEO_LOCATION_LONGITUDE: 505 /**
437 * 506 * GST_TAG_GEO_LOCATION_LONGITUDE:
438 * geo longitude location of where the media has been recorded or produced in 507 *
439 * degrees according to WGS84 (zero at the prime meridian in Greenwich/UK, 508 * geo longitude location of where the media has been recorded or produced in
440 * negative values for western longitudes). (double). 509 * degrees according to WGS84 (zero at the prime meridian in Greenwich/UK,
441 */ 510 * negative values for western longitudes). (double).
511 */
442 {GST_TAG_GEO_LOCATION_LONGITUDE, EXTRACTOR_METATYPE_GPS_LONGITUDE}, 512 {GST_TAG_GEO_LOCATION_LONGITUDE, EXTRACTOR_METATYPE_GPS_LONGITUDE},
443/** 513
444 * GST_TAG_GEO_LOCATION_ELEVATION: 514 /**
445 * 515 * GST_TAG_GEO_LOCATION_ELEVATION:
446 * geo elevation of where the media has been recorded or produced in meters 516 *
447 * according to WGS84 (zero is average sea level) (double). 517 * geo elevation of where the media has been recorded or produced in meters
448 */ 518 * according to WGS84 (zero is average sea level) (double).
519 */
449 {GST_TAG_GEO_LOCATION_ELEVATION, EXTRACTOR_METATYPE_LOCATION_ELEVATION}, 520 {GST_TAG_GEO_LOCATION_ELEVATION, EXTRACTOR_METATYPE_LOCATION_ELEVATION},
450/** 521
451 * GST_TAG_GEO_LOCATION_COUNTRY: 522 /**
452 * 523 * GST_TAG_GEO_LOCATION_COUNTRY:
453 * The country (english name) where the media has been produced (string). 524 *
454 */ 525 * The country (english name) where the media has been produced (string).
526 */
455 {GST_TAG_GEO_LOCATION_COUNTRY, EXTRACTOR_METATYPE_LOCATION_COUNTRY}, 527 {GST_TAG_GEO_LOCATION_COUNTRY, EXTRACTOR_METATYPE_LOCATION_COUNTRY},
456/** 528
457 * GST_TAG_GEO_LOCATION_CITY: 529 /**
458 * 530 * GST_TAG_GEO_LOCATION_CITY:
459 * The city (english name) where the media has been produced (string). 531 *
460 */ 532 * The city (english name) where the media has been produced (string).
533 */
461 {GST_TAG_GEO_LOCATION_CITY, EXTRACTOR_METATYPE_LOCATION_CITY}, 534 {GST_TAG_GEO_LOCATION_CITY, EXTRACTOR_METATYPE_LOCATION_CITY},
462/** 535
463 * GST_TAG_GEO_LOCATION_SUBLOCATION: 536 /**
464 * 537 * GST_TAG_GEO_LOCATION_SUBLOCATION:
465 * A location 'smaller' than GST_TAG_GEO_LOCATION_CITY that specifies better 538 *
466 * where the media has been produced. (e.g. the neighborhood) (string). 539 * A location 'smaller' than GST_TAG_GEO_LOCATION_CITY that specifies better
467 * 540 * where the media has been produced. (e.g. the neighborhood) (string).
468 * This tag has been added as this is how it is handled/named in XMP's 541 *
469 * Iptc4xmpcore schema. 542 * This tag has been added as this is how it is handled/named in XMP's
470 */ 543 * Iptc4xmpcore schema.
544 */
471 {GST_TAG_GEO_LOCATION_SUBLOCATION, EXTRACTOR_METATYPE_LOCATION_SUBLOCATION}, 545 {GST_TAG_GEO_LOCATION_SUBLOCATION, EXTRACTOR_METATYPE_LOCATION_SUBLOCATION},
472/** 546
473 * GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR: 547 /**
474 * 548 * GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR:
475 * Represents the expected error on the horizontal positioning in 549 *
476 * meters (double). 550 * Represents the expected error on the horizontal positioning in
477 */ 551 * meters (double).
552 */
478 {GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR, EXTRACTOR_METATYPE_LOCATION_HORIZONTAL_ERROR}, 553 {GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR, EXTRACTOR_METATYPE_LOCATION_HORIZONTAL_ERROR},
479/** 554
480 * GST_TAG_GEO_LOCATION_MOVEMENT_SPEED: 555 /**
481 * 556 * GST_TAG_GEO_LOCATION_MOVEMENT_SPEED:
482 * Speed of the capturing device when performing the capture. 557 *
483 * Represented in m/s. (double) 558 * Speed of the capturing device when performing the capture.
484 * 559 * Represented in m/s. (double)
485 * See also #GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION 560 *
486 */ 561 * See also #GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION
562 */
487 {GST_TAG_GEO_LOCATION_MOVEMENT_SPEED, EXTRACTOR_METATYPE_LOCATION_MOVEMENT_SPEED}, 563 {GST_TAG_GEO_LOCATION_MOVEMENT_SPEED, EXTRACTOR_METATYPE_LOCATION_MOVEMENT_SPEED},
488/** 564
489 * GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION: 565 /**
490 * 566 * GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION:
491 * Indicates the movement direction of the device performing the capture 567 *
492 * of a media. It is represented as degrees in floating point representation, 568 * Indicates the movement direction of the device performing the capture
493 * 0 means the geographic north, and increases clockwise (double from 0 to 360) 569 * of a media. It is represented as degrees in floating point representation,
494 * 570 * 0 means the geographic north, and increases clockwise (double from 0 to 360)
495 * See also #GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION 571 *
496 */ 572 * See also #GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION
573 */
497 {GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION, EXTRACTOR_METATYPE_LOCATION_MOVEMENT_DIRECTION}, 574 {GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION, EXTRACTOR_METATYPE_LOCATION_MOVEMENT_DIRECTION},
498/** 575
499 * GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION: 576 /**
500 * 577 * GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION:
501 * Indicates the direction the device is pointing to when capturing 578 *
502 * a media. It is represented as degrees in floating point representation, 579 * Indicates the direction the device is pointing to when capturing
503 * 0 means the geographic north, and increases clockwise (double from 0 to 360) 580 * a media. It is represented as degrees in floating point representation,
504 * 581 * 0 means the geographic north, and increases clockwise (double from 0 to 360)
505 * See also #GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION 582 *
506 */ 583 * See also #GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION
584 */
507 {GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION, EXTRACTOR_METATYPE_LOCATION_CAPTURE_DIRECTION}, 585 {GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION, EXTRACTOR_METATYPE_LOCATION_CAPTURE_DIRECTION},
508/** 586
509 * GST_TAG_SHOW_NAME: 587 /**
510 * 588 * GST_TAG_SHOW_NAME:
511 * Name of the show, used for displaying (string) 589 *
512 */ 590 * Name of the show, used for displaying (string)
591 */
513 {GST_TAG_SHOW_NAME, EXTRACTOR_METATYPE_SHOW_NAME}, 592 {GST_TAG_SHOW_NAME, EXTRACTOR_METATYPE_SHOW_NAME},
514/** 593
515 * GST_TAG_SHOW_SORTNAME: 594 /**
516 * 595 * GST_TAG_SHOW_SORTNAME:
517 * Name of the show, used for sorting (string) 596 *
518 */ 597 * Name of the show, used for sorting (string)
598 */
519 {GST_TAG_SHOW_SORTNAME, EXTRACTOR_METATYPE_SHOW_NAME}, 599 {GST_TAG_SHOW_SORTNAME, EXTRACTOR_METATYPE_SHOW_NAME},
520/** 600
521 * GST_TAG_SHOW_EPISODE_NUMBER: 601 /**
522 * 602 * GST_TAG_SHOW_EPISODE_NUMBER:
523 * Number of the episode within a season/show (unsigned integer) 603 *
524 */ 604 * Number of the episode within a season/show (unsigned integer)
605 */
525 {GST_TAG_SHOW_EPISODE_NUMBER, EXTRACTOR_METATYPE_SHOW_EPISODE_NUMBER}, 606 {GST_TAG_SHOW_EPISODE_NUMBER, EXTRACTOR_METATYPE_SHOW_EPISODE_NUMBER},
526/** 607
527 * GST_TAG_SHOW_SEASON_NUMBER: 608 /**
528 * 609 * GST_TAG_SHOW_SEASON_NUMBER:
529 * Number of the season of a show/series (unsigned integer) 610 *
530 */ 611 * Number of the season of a show/series (unsigned integer)
612 */
531 {GST_TAG_SHOW_SEASON_NUMBER, EXTRACTOR_METATYPE_SHOW_SEASON_NUMBER}, 613 {GST_TAG_SHOW_SEASON_NUMBER, EXTRACTOR_METATYPE_SHOW_SEASON_NUMBER},
532/** 614
533 * GST_TAG_LYRICS: 615 /**
534 * 616 * GST_TAG_LYRICS:
535 * The lyrics of the media (string) 617 *
536 */ 618 * The lyrics of the media (string)
619 */
537 {GST_TAG_LYRICS, EXTRACTOR_METATYPE_LYRICS}, 620 {GST_TAG_LYRICS, EXTRACTOR_METATYPE_LYRICS},
538/** 621
539 * GST_TAG_COMPOSER_SORTNAME: 622 /**
540 * 623 * GST_TAG_COMPOSER_SORTNAME:
541 * The composer's name, used for sorting (string) 624 *
542 */ 625 * The composer's name, used for sorting (string)
626 */
543 {GST_TAG_COMPOSER_SORTNAME, EXTRACTOR_METATYPE_COMPOSER}, 627 {GST_TAG_COMPOSER_SORTNAME, EXTRACTOR_METATYPE_COMPOSER},
544/** 628
545 * GST_TAG_GROUPING: 629 /**
546 * 630 * GST_TAG_GROUPING:
547 * Groups together media that are related and spans multiple tracks. An 631 *
548 * example are multiple pieces of a concerto. (string) 632 * Groups together media that are related and spans multiple tracks. An
549 */ 633 * example are multiple pieces of a concerto. (string)
634 */
550 {GST_TAG_GROUPING, EXTRACTOR_METATYPE_GROUPING}, 635 {GST_TAG_GROUPING, EXTRACTOR_METATYPE_GROUPING},
551/** 636
552 * GST_TAG_USER_RATING: 637 /**
553 * 638 * GST_TAG_USER_RATING:
554 * Rating attributed by a person (likely the application user). 639 *
555 * The higher the value, the more the user likes this media 640 * Rating attributed by a person (likely the application user).
556 * (unsigned int from 0 to 100) 641 * The higher the value, the more the user likes this media
557 */ 642 * (unsigned int from 0 to 100)
643 */
558 {GST_TAG_USER_RATING, EXTRACTOR_METATYPE_POPULARITY_METER}, 644 {GST_TAG_USER_RATING, EXTRACTOR_METATYPE_POPULARITY_METER},
559/** 645
560 * GST_TAG_DEVICE_MANUFACTURER: 646 /**
561 * 647 * GST_TAG_DEVICE_MANUFACTURER:
562 * Manufacturer of the device used to create the media (string) 648 *
563 */ 649 * Manufacturer of the device used to create the media (string)
650 */
564 {GST_TAG_DEVICE_MANUFACTURER, EXTRACTOR_METATYPE_DEVICE_MANUFACTURER}, 651 {GST_TAG_DEVICE_MANUFACTURER, EXTRACTOR_METATYPE_DEVICE_MANUFACTURER},
565/** 652
566 * GST_TAG_DEVICE_MODEL: 653 /**
567 * 654 * GST_TAG_DEVICE_MODEL:
568 * Model of the device used to create the media (string) 655 *
569 */ 656 * Model of the device used to create the media (string)
657 */
570 {GST_TAG_DEVICE_MODEL, EXTRACTOR_METATYPE_DEVICE_MODEL}, 658 {GST_TAG_DEVICE_MODEL, EXTRACTOR_METATYPE_DEVICE_MODEL},
571/** 659
572 * GST_TAG_APPLICATION_NAME: 660 /**
573 * 661 * GST_TAG_APPLICATION_NAME:
574 * Name of the application used to create the media (string) 662 *
575 */ 663 * Name of the application used to create the media (string)
664 */
576 {GST_TAG_APPLICATION_NAME, EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE}, 665 {GST_TAG_APPLICATION_NAME, EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE},
577/** 666
578 * GST_TAG_APPLICATION_DATA: 667 /**
579 * 668 * GST_TAG_APPLICATION_DATA:
580 * Arbitrary application data (sample) 669 *
581 * 670 * Arbitrary application data (sample)
582 * Some formats allow applications to add their own arbitrary data 671 *
583 * into files. This data is application dependent. 672 * Some formats allow applications to add their own arbitrary data
584 */ 673 * into files. This data is application dependent.
674 */
585 /* No equivalent, and none needed (not really metadata)? */ 675 /* No equivalent, and none needed (not really metadata)? */
676
677 /**
678 * GST_TAG_IMAGE_ORIENTATION:
679 *
680 * Represents the 'Orientation' tag from EXIF. Defines how the image
681 * should be rotated and mirrored for display. (string)
682 *
683 * This tag has a predefined set of allowed values:
684 * "rotate-0"
685 * "rotate-90"
686 * "rotate-180"
687 * "rotate-270"
688 * "flip-rotate-0"
689 * "flip-rotate-90"
690 * "flip-rotate-180"
691 * "flip-rotate-270"
692 *
693 * The naming is adopted according to a possible transformation to perform
694 * on the image to fix its orientation, obviously equivalent operations will
695 * yield the same result.
696 *
697 * Rotations indicated by the values are in clockwise direction and
698 * 'flip' means an horizontal mirroring.
699 */
700 {GST_TAG_IMAGE_ORIENTATION, EXTRACTOR_METATYPE_ORIENTATION}
701
702};
703
704
586/** 705/**
587 * GST_TAG_IMAGE_ORIENTATION: 706 * Struct mapping named tags (that don't occur in GST API) to LE tags.
588 *
589 * Represents the 'Orientation' tag from EXIF. Defines how the image
590 * should be rotated and mirrored for display. (string)
591 *
592 * This tag has a predefined set of allowed values:
593 * "rotate-0"
594 * "rotate-90"
595 * "rotate-180"
596 * "rotate-270"
597 * "flip-rotate-0"
598 * "flip-rotate-90"
599 * "flip-rotate-180"
600 * "flip-rotate-270"
601 *
602 * The naming is adopted according to a possible transformation to perform
603 * on the image to fix its orientation, obviously equivalent operations will
604 * yield the same result.
605 *
606 * Rotations indicated by the values are in clockwise direction and
607 * 'flip' means an horizontal mirroring.
608 */ 707 */
609 {GST_TAG_IMAGE_ORIENTATION, EXTRACTOR_METATYPE_ORIENTATION} 708struct NamedTag
709{
710 /**
711 * tag.
712 */
713 const char *tag;
714
715 /**
716 * Corresponding LE tag.
717 */
718 enum EXTRACTOR_MetaType le_type;
610}; 719};
611 720
721
722struct NamedTag named_tags[] =
723 {
724 "FPS", EXTRACTOR_METATYPE_FRAME_RATE,
725 "PLAY_COUNTER", EXTRACTOR_METATYPE_PLAY_COUNTER,
726 "RATING", EXTRACTOR_METATYPE_RATING,
727 "SUMMARY", EXTRACTOR_METATYPE_SUMMARY,
728 "SUBJECT", EXTRACTOR_METATYPE_SUBJECT,
729 "MOOD", EXTRACTOR_METATYPE_MOOD,
730 "LEAD_PERFORMER", EXTRACTOR_METATYPE_PERFORMER,
731 "DIRECTOR", EXTRACTOR_METATYPE_MOVIE_DIRECTOR,
732 "WRITTEN_BY", EXTRACTOR_METATYPE_WRITER,
733 "PRODUCER", EXTRACTOR_METATYPE_PRODUCER,
734 "PUBLISHER", EXTRACTOR_METATYPE_PUBLISHER,
735 "ORIGINAL/ARTIST", EXTRACTOR_METATYPE_ORIGINAL_ARTIST,
736 "ORIGINAL/TITLE", EXTRACTOR_METATYPE_ORIGINAL_TITLE,
737 NULL, EXTRACTOR_METATYPE_UNKNOWN
738 };
739
740
612enum CurrentStreamType 741enum CurrentStreamType
613{ 742{
614 STREAM_TYPE_NONE = 0, 743 STREAM_TYPE_NONE = 0,
@@ -894,15 +1023,30 @@ send_structure_foreach (GQuark field_id, const GValue *value,
894 str = NULL; 1023 str = NULL;
895 break; 1024 break;
896 } 1025 }
897 if (str != NULL) 1026 if (NULL != str)
1027 {
1028 unsigned int i;
1029
1030 for (i=0; NULL != named_tags[i].tag; i++)
1031 if (0 == strcmp (named_tags[i].tag, field_name))
1032 {
1033 ps->time_to_leave = ps->ec->proc (ps->ec->cls, "gstreamer",
1034 named_tags[i].le_type,
1035 EXTRACTOR_METAFORMAT_UTF8, "text/plain",
1036 (const char *) str, strlen (str) + 1);
1037 g_free (str);
1038 str = NULL;
1039 break;
1040 }
1041 }
1042 if (NULL != str)
898 { 1043 {
899 gchar *senddata = g_strdup_printf ("%s=%s", field_name, str); 1044 gchar *senddata = g_strdup_printf ("%s=%s", field_name, str);
900 ps->time_to_leave = ps->ec->proc (ps->ec->cls, "gstreamer", 1045 ps->time_to_leave = ps->ec->proc (ps->ec->cls, "gstreamer",
901 EXTRACTOR_METATYPE_UNKNOWN, EXTRACTOR_METAFORMAT_UTF8, "text/plain", 1046 EXTRACTOR_METATYPE_UNKNOWN, EXTRACTOR_METAFORMAT_UTF8, "text/plain",
902 (const char *) senddata, strlen (senddata) + 1); 1047 (const char *) senddata, strlen (senddata) + 1);
903 g_free (senddata); 1048 g_free (senddata);
904 } 1049 }
905
906 g_free (str); 1050 g_free (str);
907 1051
908 return !ps->time_to_leave; 1052 return !ps->time_to_leave;