taglib-ruby 0.6.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +1 -1
- data/{CHANGES.md → CHANGELOG.md} +46 -11
- data/README.md +61 -17
- data/Rakefile +12 -3
- data/docs/taglib/aiff.rb +95 -0
- data/docs/taglib/base.rb +30 -2
- data/docs/taglib/flac.rb +60 -4
- data/docs/taglib/id3v1.rb +29 -0
- data/docs/taglib/id3v2.rb +22 -3
- data/docs/taglib/mp4.rb +124 -13
- data/docs/taglib/mpeg.rb +30 -1
- data/docs/taglib/ogg.rb +47 -5
- data/docs/taglib/riff.rb +3 -0
- data/docs/taglib/vorbis.rb +1 -1
- data/docs/taglib/wav.rb +116 -0
- data/ext/extconf_common.rb +24 -3
- data/ext/taglib_aiff/extconf.rb +4 -0
- data/ext/taglib_aiff/taglib_aiff.i +84 -0
- data/ext/taglib_aiff/taglib_aiff_wrap.cxx +3111 -0
- data/ext/taglib_base/includes.i +34 -5
- data/ext/taglib_base/taglib_base.i +42 -2
- data/ext/taglib_base/taglib_base_wrap.cxx +226 -186
- data/ext/taglib_flac/taglib_flac.i +21 -18
- data/ext/taglib_flac/taglib_flac_wrap.cxx +519 -955
- data/ext/taglib_flac_picture/extconf.rb +4 -0
- data/ext/taglib_flac_picture/includes.i +15 -0
- data/ext/taglib_flac_picture/taglib_flac_picture.i +15 -0
- data/ext/taglib_flac_picture/taglib_flac_picture_wrap.cxx +3087 -0
- data/ext/taglib_id3v1/taglib_id3v1.i +19 -0
- data/ext/taglib_id3v1/taglib_id3v1_wrap.cxx +391 -193
- data/ext/taglib_id3v2/relativevolumeframe.i +4 -17
- data/ext/taglib_id3v2/taglib_id3v2.i +72 -2
- data/ext/taglib_id3v2/taglib_id3v2_wrap.cxx +3051 -1113
- data/ext/taglib_mp4/taglib_mp4.i +101 -20
- data/ext/taglib_mp4/taglib_mp4_wrap.cxx +1088 -282
- data/ext/taglib_mpeg/taglib_mpeg.i +11 -16
- data/ext/taglib_mpeg/taglib_mpeg_wrap.cxx +646 -317
- data/ext/taglib_ogg/taglib_ogg.i +11 -0
- data/ext/taglib_ogg/taglib_ogg_wrap.cxx +478 -192
- data/ext/taglib_vorbis/taglib_vorbis.i +8 -0
- data/ext/taglib_vorbis/taglib_vorbis_wrap.cxx +202 -156
- data/ext/taglib_wav/extconf.rb +4 -0
- data/ext/taglib_wav/taglib_wav.i +90 -0
- data/ext/taglib_wav/taglib_wav_wrap.cxx +3423 -0
- data/lib/taglib.rb +2 -0
- data/lib/taglib/aiff.rb +7 -0
- data/lib/taglib/mp4.rb +2 -1
- data/lib/taglib/version.rb +2 -2
- data/lib/taglib/wav.rb +11 -0
- data/taglib-ruby.gemspec +42 -8
- data/tasks/ext.rake +48 -20
- data/tasks/gemspec_check.rake +1 -1
- data/tasks/swig.rake +36 -2
- data/test/aiff_examples_test.rb +39 -0
- data/test/aiff_file_test.rb +103 -0
- data/test/aiff_file_write_test.rb +88 -0
- data/test/data/Makefile +8 -2
- data/test/data/aiff-sample.aiff +0 -0
- data/test/data/flac_nopic.flac +0 -0
- data/test/data/vorbis-create.cpp +20 -1
- data/test/data/vorbis.oga +0 -0
- data/test/data/wav-create.cpp +55 -0
- data/test/data/wav-dump.cpp +74 -0
- data/test/data/wav-sample.wav +0 -0
- data/test/file_test.rb +21 -0
- data/test/fileref_properties_test.rb +1 -1
- data/test/flac_file_test.rb +45 -30
- data/test/flac_picture_memory_test.rb +43 -0
- data/test/id3v1_genres_test.rb +23 -0
- data/test/id3v1_tag_test.rb +1 -0
- data/test/id3v2_frames_test.rb +64 -0
- data/test/id3v2_tag_test.rb +6 -6
- data/test/id3v2_unknown_frames_test.rb +30 -0
- data/test/id3v2_write_test.rb +10 -13
- data/test/mp4_file_test.rb +33 -4
- data/test/mp4_file_write_test.rb +5 -5
- data/test/mp4_items_test.rb +83 -29
- data/test/mpeg_file_test.rb +120 -7
- data/test/vorbis_file_test.rb +2 -2
- data/test/vorbis_tag_test.rb +61 -7
- data/test/wav_examples_test.rb +42 -0
- data/test/wav_file_test.rb +108 -0
- data/test/wav_file_write_test.rb +113 -0
- metadata +86 -56
data/ext/taglib_ogg/taglib_ogg.i
CHANGED
@@ -2,11 +2,16 @@
|
|
2
2
|
%{
|
3
3
|
#include <taglib/taglib.h>
|
4
4
|
#include <taglib/oggfile.h>
|
5
|
+
#include <taglib/flacpicture.h>
|
5
6
|
#include <taglib/xiphcomment.h>
|
7
|
+
// Help find FLAC::
|
8
|
+
using namespace TagLib;
|
6
9
|
%}
|
7
10
|
|
8
11
|
%include "../taglib_base/includes.i"
|
9
12
|
%import(module="taglib_base") "../taglib_base/taglib_base.i"
|
13
|
+
%include "../taglib_flac_picture/includes.i"
|
14
|
+
%import(module="taglib_flac_picture") "../taglib_flac_picture/taglib_flac_picture.i"
|
10
15
|
|
11
16
|
%typemap(out) TagLib::Ogg::FieldListMap {
|
12
17
|
$result = taglib_ogg_fieldlistmap_to_ruby_hash(*$1);
|
@@ -15,6 +20,12 @@
|
|
15
20
|
|
16
21
|
%include <taglib/oggfile.h>
|
17
22
|
|
23
|
+
%apply SWIGTYPE *DISOWN { TagLib::FLAC::Picture *picture };
|
24
|
+
// Don't expose second parameter, memory should be freed by TagLib
|
25
|
+
%ignore TagLib::Ogg::XiphComment::removePicture(Picture *, bool);
|
26
|
+
|
27
|
+
%ignore TagLib::Ogg::XiphComment::removeField;
|
28
|
+
|
18
29
|
%rename("contains?") TagLib::Ogg::XiphComment::contains;
|
19
30
|
|
20
31
|
%include <taglib/xiphcomment.h>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/* ----------------------------------------------------------------------------
|
2
2
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
3
|
-
* Version
|
4
|
-
*
|
5
|
-
* This file is not intended to be easily readable and contains a number of
|
3
|
+
* Version 3.0.7
|
4
|
+
*
|
5
|
+
* This file is not intended to be easily readable and contains a number of
|
6
6
|
* coding conventions designed to improve portability and efficiency. Do not make
|
7
|
-
* changes to this file unless you know what you are doing--modify the SWIG
|
8
|
-
* interface file instead.
|
7
|
+
* changes to this file unless you know what you are doing--modify the SWIG
|
8
|
+
* interface file instead.
|
9
9
|
* ----------------------------------------------------------------------------- */
|
10
10
|
|
11
11
|
#define SWIGRUBY
|
@@ -65,28 +65,28 @@ template <typename T> T SwigValueInit() {
|
|
65
65
|
#ifndef SWIGUNUSED
|
66
66
|
# if defined(__GNUC__)
|
67
67
|
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
68
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
68
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
69
69
|
# else
|
70
70
|
# define SWIGUNUSED
|
71
71
|
# endif
|
72
72
|
# elif defined(__ICC)
|
73
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
73
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
74
74
|
# else
|
75
|
-
# define SWIGUNUSED
|
75
|
+
# define SWIGUNUSED
|
76
76
|
# endif
|
77
77
|
#endif
|
78
78
|
|
79
79
|
#ifndef SWIG_MSC_UNSUPPRESS_4505
|
80
80
|
# if defined(_MSC_VER)
|
81
81
|
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
82
|
-
# endif
|
82
|
+
# endif
|
83
83
|
#endif
|
84
84
|
|
85
85
|
#ifndef SWIGUNUSEDPARM
|
86
86
|
# ifdef __cplusplus
|
87
87
|
# define SWIGUNUSEDPARM(p)
|
88
88
|
# else
|
89
|
-
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
89
|
+
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
90
90
|
# endif
|
91
91
|
#endif
|
92
92
|
|
@@ -129,7 +129,7 @@ template <typename T> T SwigValueInit() {
|
|
129
129
|
# define SWIGSTDCALL __stdcall
|
130
130
|
# else
|
131
131
|
# define SWIGSTDCALL
|
132
|
-
# endif
|
132
|
+
# endif
|
133
133
|
#endif
|
134
134
|
|
135
135
|
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
|
@@ -142,6 +142,19 @@ template <typename T> T SwigValueInit() {
|
|
142
142
|
# define _SCL_SECURE_NO_DEPRECATE
|
143
143
|
#endif
|
144
144
|
|
145
|
+
/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
|
146
|
+
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
|
147
|
+
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
|
148
|
+
#endif
|
149
|
+
|
150
|
+
/* Intel's compiler complains if a variable which was never initialised is
|
151
|
+
* cast to void, which is a common idiom which we use to indicate that we
|
152
|
+
* are aware a variable isn't used. So we just silence that warning.
|
153
|
+
* See: https://github.com/swig/swig/issues/192 for more discussion.
|
154
|
+
*/
|
155
|
+
#ifdef __INTEL_COMPILER
|
156
|
+
# pragma warning disable 592
|
157
|
+
#endif
|
145
158
|
|
146
159
|
/* -----------------------------------------------------------------------------
|
147
160
|
* This section contains generic SWIG labels for method/variable
|
@@ -174,28 +187,28 @@ template <typename T> T SwigValueInit() {
|
|
174
187
|
#ifndef SWIGUNUSED
|
175
188
|
# if defined(__GNUC__)
|
176
189
|
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
177
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
190
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
178
191
|
# else
|
179
192
|
# define SWIGUNUSED
|
180
193
|
# endif
|
181
194
|
# elif defined(__ICC)
|
182
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
195
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
183
196
|
# else
|
184
|
-
# define SWIGUNUSED
|
197
|
+
# define SWIGUNUSED
|
185
198
|
# endif
|
186
199
|
#endif
|
187
200
|
|
188
201
|
#ifndef SWIG_MSC_UNSUPPRESS_4505
|
189
202
|
# if defined(_MSC_VER)
|
190
203
|
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
191
|
-
# endif
|
204
|
+
# endif
|
192
205
|
#endif
|
193
206
|
|
194
207
|
#ifndef SWIGUNUSEDPARM
|
195
208
|
# ifdef __cplusplus
|
196
209
|
# define SWIGUNUSEDPARM(p)
|
197
210
|
# else
|
198
|
-
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
211
|
+
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
199
212
|
# endif
|
200
213
|
#endif
|
201
214
|
|
@@ -238,7 +251,7 @@ template <typename T> T SwigValueInit() {
|
|
238
251
|
# define SWIGSTDCALL __stdcall
|
239
252
|
# else
|
240
253
|
# define SWIGSTDCALL
|
241
|
-
# endif
|
254
|
+
# endif
|
242
255
|
#endif
|
243
256
|
|
244
257
|
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
|
@@ -251,6 +264,19 @@ template <typename T> T SwigValueInit() {
|
|
251
264
|
# define _SCL_SECURE_NO_DEPRECATE
|
252
265
|
#endif
|
253
266
|
|
267
|
+
/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
|
268
|
+
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
|
269
|
+
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
|
270
|
+
#endif
|
271
|
+
|
272
|
+
/* Intel's compiler complains if a variable which was never initialised is
|
273
|
+
* cast to void, which is a common idiom which we use to indicate that we
|
274
|
+
* are aware a variable isn't used. So we just silence that warning.
|
275
|
+
* See: https://github.com/swig/swig/issues/192 for more discussion.
|
276
|
+
*/
|
277
|
+
#ifdef __INTEL_COMPILER
|
278
|
+
# pragma warning disable 592
|
279
|
+
#endif
|
254
280
|
|
255
281
|
/* -----------------------------------------------------------------------------
|
256
282
|
* swigrun.swg
|
@@ -276,7 +302,7 @@ template <typename T> T SwigValueInit() {
|
|
276
302
|
You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
|
277
303
|
creating a static or dynamic library from the SWIG runtime code.
|
278
304
|
In 99.9% of the cases, SWIG just needs to declare them as 'static'.
|
279
|
-
|
305
|
+
|
280
306
|
But only do this if strictly necessary, ie, if you have problems
|
281
307
|
with your compiler or suchlike.
|
282
308
|
*/
|
@@ -302,16 +328,16 @@ template <typename T> T SwigValueInit() {
|
|
302
328
|
#define SWIG_POINTER_OWN 0x1
|
303
329
|
|
304
330
|
|
305
|
-
/*
|
331
|
+
/*
|
306
332
|
Flags/methods for returning states.
|
307
|
-
|
308
|
-
The SWIG conversion methods, as ConvertPtr, return an integer
|
333
|
+
|
334
|
+
The SWIG conversion methods, as ConvertPtr, return an integer
|
309
335
|
that tells if the conversion was successful or not. And if not,
|
310
336
|
an error code can be returned (see swigerrors.swg for the codes).
|
311
|
-
|
337
|
+
|
312
338
|
Use the following macros/flags to set or process the returning
|
313
339
|
states.
|
314
|
-
|
340
|
+
|
315
341
|
In old versions of SWIG, code such as the following was usually written:
|
316
342
|
|
317
343
|
if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
|
@@ -344,23 +370,23 @@ template <typename T> T SwigValueInit() {
|
|
344
370
|
} else {
|
345
371
|
// fail code
|
346
372
|
}
|
347
|
-
|
373
|
+
|
348
374
|
I.e., now SWIG_ConvertPtr can return new objects and you can
|
349
375
|
identify the case and take care of the deallocation. Of course that
|
350
376
|
also requires SWIG_ConvertPtr to return new result values, such as
|
351
377
|
|
352
|
-
int SWIG_ConvertPtr(obj, ptr,...) {
|
353
|
-
if (<obj is ok>) {
|
354
|
-
if (<need new object>) {
|
355
|
-
*ptr = <ptr to new allocated object>;
|
356
|
-
return SWIG_NEWOBJ;
|
357
|
-
} else {
|
358
|
-
*ptr = <ptr to old object>;
|
359
|
-
return SWIG_OLDOBJ;
|
360
|
-
}
|
361
|
-
} else {
|
362
|
-
return SWIG_BADOBJ;
|
363
|
-
}
|
378
|
+
int SWIG_ConvertPtr(obj, ptr,...) {
|
379
|
+
if (<obj is ok>) {
|
380
|
+
if (<need new object>) {
|
381
|
+
*ptr = <ptr to new allocated object>;
|
382
|
+
return SWIG_NEWOBJ;
|
383
|
+
} else {
|
384
|
+
*ptr = <ptr to old object>;
|
385
|
+
return SWIG_OLDOBJ;
|
386
|
+
}
|
387
|
+
} else {
|
388
|
+
return SWIG_BADOBJ;
|
389
|
+
}
|
364
390
|
}
|
365
391
|
|
366
392
|
Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
|
@@ -374,17 +400,17 @@ template <typename T> T SwigValueInit() {
|
|
374
400
|
int fooi(int);
|
375
401
|
|
376
402
|
and you call
|
377
|
-
|
403
|
+
|
378
404
|
food(1) // cast rank '1' (1 -> 1.0)
|
379
405
|
fooi(1) // cast rank '0'
|
380
406
|
|
381
407
|
just use the SWIG_AddCast()/SWIG_CheckState()
|
382
408
|
*/
|
383
409
|
|
384
|
-
#define SWIG_OK (0)
|
410
|
+
#define SWIG_OK (0)
|
385
411
|
#define SWIG_ERROR (-1)
|
386
412
|
#define SWIG_IsOK(r) (r >= 0)
|
387
|
-
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
413
|
+
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
388
414
|
|
389
415
|
/* The CastRankLimit says how many bits are used for the cast rank */
|
390
416
|
#define SWIG_CASTRANKLIMIT (1 << 8)
|
@@ -415,14 +441,14 @@ template <typename T> T SwigValueInit() {
|
|
415
441
|
# endif
|
416
442
|
# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
|
417
443
|
# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
|
418
|
-
SWIGINTERNINLINE int SWIG_AddCast(int r) {
|
444
|
+
SWIGINTERNINLINE int SWIG_AddCast(int r) {
|
419
445
|
return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
|
420
446
|
}
|
421
|
-
SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
422
|
-
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
447
|
+
SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
448
|
+
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
423
449
|
}
|
424
450
|
#else /* no cast-rank mode */
|
425
|
-
# define SWIG_AddCast
|
451
|
+
# define SWIG_AddCast(r) (r)
|
426
452
|
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
|
427
453
|
#endif
|
428
454
|
|
@@ -466,7 +492,7 @@ typedef struct swig_module_info {
|
|
466
492
|
void *clientdata; /* Language specific module data */
|
467
493
|
} swig_module_info;
|
468
494
|
|
469
|
-
/*
|
495
|
+
/*
|
470
496
|
Compare two type names skipping the space characters, therefore
|
471
497
|
"char*" == "char *" and "Class<int>" == "Class<int >", etc.
|
472
498
|
|
@@ -486,18 +512,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
|
|
486
512
|
|
487
513
|
/*
|
488
514
|
Check type equivalence in a name list like <name1>|<name2>|...
|
489
|
-
Return 0 if
|
515
|
+
Return 0 if equal, -1 if nb < tb, 1 if nb > tb
|
490
516
|
*/
|
491
517
|
SWIGRUNTIME int
|
492
|
-
|
493
|
-
int equiv =
|
518
|
+
SWIG_TypeCmp(const char *nb, const char *tb) {
|
519
|
+
int equiv = 1;
|
494
520
|
const char* te = tb + strlen(tb);
|
495
521
|
const char* ne = nb;
|
496
|
-
while (
|
522
|
+
while (equiv != 0 && *ne) {
|
497
523
|
for (nb = ne; *ne; ++ne) {
|
498
524
|
if (*ne == '|') break;
|
499
525
|
}
|
500
|
-
equiv =
|
526
|
+
equiv = SWIG_TypeNameComp(nb, ne, tb, te);
|
501
527
|
if (*ne) ++ne;
|
502
528
|
}
|
503
529
|
return equiv;
|
@@ -505,24 +531,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
|
|
505
531
|
|
506
532
|
/*
|
507
533
|
Check type equivalence in a name list like <name1>|<name2>|...
|
508
|
-
Return 0 if equal,
|
534
|
+
Return 0 if not equal, 1 if equal
|
509
535
|
*/
|
510
536
|
SWIGRUNTIME int
|
511
|
-
|
512
|
-
|
513
|
-
const char* te = tb + strlen(tb);
|
514
|
-
const char* ne = nb;
|
515
|
-
while (!equiv && *ne) {
|
516
|
-
for (nb = ne; *ne; ++ne) {
|
517
|
-
if (*ne == '|') break;
|
518
|
-
}
|
519
|
-
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
|
520
|
-
if (*ne) ++ne;
|
521
|
-
}
|
522
|
-
return equiv;
|
537
|
+
SWIG_TypeEquiv(const char *nb, const char *tb) {
|
538
|
+
return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
|
523
539
|
}
|
524
540
|
|
525
|
-
|
526
541
|
/*
|
527
542
|
Check the typename
|
528
543
|
*/
|
@@ -550,7 +565,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
|
|
550
565
|
return 0;
|
551
566
|
}
|
552
567
|
|
553
|
-
/*
|
568
|
+
/*
|
554
569
|
Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
|
555
570
|
*/
|
556
571
|
SWIGRUNTIME swig_cast_info *
|
@@ -585,7 +600,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
|
|
585
600
|
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
|
586
601
|
}
|
587
602
|
|
588
|
-
/*
|
603
|
+
/*
|
589
604
|
Dynamic pointer casting. Down an inheritance hierarchy
|
590
605
|
*/
|
591
606
|
SWIGRUNTIME swig_type_info *
|
@@ -629,7 +644,7 @@ SWIG_TypePrettyName(const swig_type_info *type) {
|
|
629
644
|
return type->name;
|
630
645
|
}
|
631
646
|
|
632
|
-
/*
|
647
|
+
/*
|
633
648
|
Set the clientdata field for a type
|
634
649
|
*/
|
635
650
|
SWIGRUNTIME void
|
@@ -637,14 +652,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
|
|
637
652
|
swig_cast_info *cast = ti->cast;
|
638
653
|
/* if (ti->clientdata == clientdata) return; */
|
639
654
|
ti->clientdata = clientdata;
|
640
|
-
|
655
|
+
|
641
656
|
while (cast) {
|
642
657
|
if (!cast->converter) {
|
643
658
|
swig_type_info *tc = cast->type;
|
644
659
|
if (!tc->clientdata) {
|
645
660
|
SWIG_TypeClientData(tc, clientdata);
|
646
661
|
}
|
647
|
-
}
|
662
|
+
}
|
648
663
|
cast = cast->next;
|
649
664
|
}
|
650
665
|
}
|
@@ -653,31 +668,31 @@ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
|
|
653
668
|
SWIG_TypeClientData(ti, clientdata);
|
654
669
|
ti->owndata = 1;
|
655
670
|
}
|
656
|
-
|
671
|
+
|
657
672
|
/*
|
658
673
|
Search for a swig_type_info structure only by mangled name
|
659
674
|
Search is a O(log #types)
|
660
|
-
|
661
|
-
We start searching at module start, and finish searching when start == end.
|
675
|
+
|
676
|
+
We start searching at module start, and finish searching when start == end.
|
662
677
|
Note: if start == end at the beginning of the function, we go all the way around
|
663
678
|
the circular list.
|
664
679
|
*/
|
665
680
|
SWIGRUNTIME swig_type_info *
|
666
|
-
SWIG_MangledTypeQueryModule(swig_module_info *start,
|
667
|
-
swig_module_info *end,
|
681
|
+
SWIG_MangledTypeQueryModule(swig_module_info *start,
|
682
|
+
swig_module_info *end,
|
668
683
|
const char *name) {
|
669
684
|
swig_module_info *iter = start;
|
670
685
|
do {
|
671
686
|
if (iter->size) {
|
672
|
-
|
673
|
-
|
687
|
+
size_t l = 0;
|
688
|
+
size_t r = iter->size - 1;
|
674
689
|
do {
|
675
690
|
/* since l+r >= 0, we can (>> 1) instead (/ 2) */
|
676
|
-
|
691
|
+
size_t i = (l + r) >> 1;
|
677
692
|
const char *iname = iter->types[i]->name;
|
678
693
|
if (iname) {
|
679
|
-
|
680
|
-
if (compare == 0) {
|
694
|
+
int compare = strcmp(name, iname);
|
695
|
+
if (compare == 0) {
|
681
696
|
return iter->types[i];
|
682
697
|
} else if (compare < 0) {
|
683
698
|
if (i) {
|
@@ -702,14 +717,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
|
|
702
717
|
Search for a swig_type_info structure for either a mangled name or a human readable name.
|
703
718
|
It first searches the mangled names of the types, which is a O(log #types)
|
704
719
|
If a type is not found it then searches the human readable names, which is O(#types).
|
705
|
-
|
706
|
-
We start searching at module start, and finish searching when start == end.
|
720
|
+
|
721
|
+
We start searching at module start, and finish searching when start == end.
|
707
722
|
Note: if start == end at the beginning of the function, we go all the way around
|
708
723
|
the circular list.
|
709
724
|
*/
|
710
725
|
SWIGRUNTIME swig_type_info *
|
711
|
-
SWIG_TypeQueryModule(swig_module_info *start,
|
712
|
-
swig_module_info *end,
|
726
|
+
SWIG_TypeQueryModule(swig_module_info *start,
|
727
|
+
swig_module_info *end,
|
713
728
|
const char *name) {
|
714
729
|
/* STEP 1: Search the name field using binary search */
|
715
730
|
swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
|
@@ -720,7 +735,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
|
|
720
735
|
of the str field (the human readable name) */
|
721
736
|
swig_module_info *iter = start;
|
722
737
|
do {
|
723
|
-
|
738
|
+
size_t i = 0;
|
724
739
|
for (; i < iter->size; ++i) {
|
725
740
|
if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
|
726
741
|
return iter->types[i];
|
@@ -728,56 +743,56 @@ SWIG_TypeQueryModule(swig_module_info *start,
|
|
728
743
|
iter = iter->next;
|
729
744
|
} while (iter != end);
|
730
745
|
}
|
731
|
-
|
746
|
+
|
732
747
|
/* neither found a match */
|
733
748
|
return 0;
|
734
749
|
}
|
735
750
|
|
736
|
-
/*
|
751
|
+
/*
|
737
752
|
Pack binary data into a string
|
738
753
|
*/
|
739
754
|
SWIGRUNTIME char *
|
740
755
|
SWIG_PackData(char *c, void *ptr, size_t sz) {
|
741
756
|
static const char hex[17] = "0123456789abcdef";
|
742
|
-
|
743
|
-
|
757
|
+
const unsigned char *u = (unsigned char *) ptr;
|
758
|
+
const unsigned char *eu = u + sz;
|
744
759
|
for (; u != eu; ++u) {
|
745
|
-
|
760
|
+
unsigned char uu = *u;
|
746
761
|
*(c++) = hex[(uu & 0xf0) >> 4];
|
747
762
|
*(c++) = hex[uu & 0xf];
|
748
763
|
}
|
749
764
|
return c;
|
750
765
|
}
|
751
766
|
|
752
|
-
/*
|
767
|
+
/*
|
753
768
|
Unpack binary data from a string
|
754
769
|
*/
|
755
770
|
SWIGRUNTIME const char *
|
756
771
|
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
757
|
-
|
758
|
-
|
772
|
+
unsigned char *u = (unsigned char *) ptr;
|
773
|
+
const unsigned char *eu = u + sz;
|
759
774
|
for (; u != eu; ++u) {
|
760
|
-
|
761
|
-
|
775
|
+
char d = *(c++);
|
776
|
+
unsigned char uu;
|
762
777
|
if ((d >= '0') && (d <= '9'))
|
763
778
|
uu = ((d - '0') << 4);
|
764
779
|
else if ((d >= 'a') && (d <= 'f'))
|
765
780
|
uu = ((d - ('a'-10)) << 4);
|
766
|
-
else
|
781
|
+
else
|
767
782
|
return (char *) 0;
|
768
783
|
d = *(c++);
|
769
784
|
if ((d >= '0') && (d <= '9'))
|
770
785
|
uu |= (d - '0');
|
771
786
|
else if ((d >= 'a') && (d <= 'f'))
|
772
787
|
uu |= (d - ('a'-10));
|
773
|
-
else
|
788
|
+
else
|
774
789
|
return (char *) 0;
|
775
790
|
*u = uu;
|
776
791
|
}
|
777
792
|
return c;
|
778
793
|
}
|
779
794
|
|
780
|
-
/*
|
795
|
+
/*
|
781
796
|
Pack 'void *' into a string buffer.
|
782
797
|
*/
|
783
798
|
SWIGRUNTIME char *
|
@@ -837,18 +852,18 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
837
852
|
#endif
|
838
853
|
|
839
854
|
/* Errors in SWIG */
|
840
|
-
#define SWIG_UnknownError -1
|
841
|
-
#define SWIG_IOError -2
|
842
|
-
#define SWIG_RuntimeError -3
|
843
|
-
#define SWIG_IndexError -4
|
844
|
-
#define SWIG_TypeError -5
|
845
|
-
#define SWIG_DivisionByZero -6
|
846
|
-
#define SWIG_OverflowError -7
|
847
|
-
#define SWIG_SyntaxError -8
|
848
|
-
#define SWIG_ValueError -9
|
855
|
+
#define SWIG_UnknownError -1
|
856
|
+
#define SWIG_IOError -2
|
857
|
+
#define SWIG_RuntimeError -3
|
858
|
+
#define SWIG_IndexError -4
|
859
|
+
#define SWIG_TypeError -5
|
860
|
+
#define SWIG_DivisionByZero -6
|
861
|
+
#define SWIG_OverflowError -7
|
862
|
+
#define SWIG_SyntaxError -8
|
863
|
+
#define SWIG_ValueError -9
|
849
864
|
#define SWIG_SystemError -10
|
850
865
|
#define SWIG_AttributeError -11
|
851
|
-
#define SWIG_MemoryError -12
|
866
|
+
#define SWIG_MemoryError -12
|
852
867
|
#define SWIG_NullReferenceError -13
|
853
868
|
|
854
869
|
|
@@ -1514,14 +1529,13 @@ SWIG_Ruby_InitRuntime(void)
|
|
1514
1529
|
SWIGRUNTIME void
|
1515
1530
|
SWIG_Ruby_define_class(swig_type_info *type)
|
1516
1531
|
{
|
1517
|
-
VALUE klass;
|
1518
1532
|
char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
|
1519
1533
|
sprintf(klass_name, "TYPE%s", type->name);
|
1520
1534
|
if (NIL_P(_cSWIG_Pointer)) {
|
1521
1535
|
_cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
|
1522
1536
|
rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
|
1523
1537
|
}
|
1524
|
-
|
1538
|
+
rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
|
1525
1539
|
free((void *) klass_name);
|
1526
1540
|
}
|
1527
1541
|
|
@@ -1774,7 +1788,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
|
|
1774
1788
|
SWIGINTERN
|
1775
1789
|
int SWIG_Ruby_isCallable( VALUE proc )
|
1776
1790
|
{
|
1777
|
-
if ( rb_respond_to( proc, swig_call_id )
|
1791
|
+
if ( rb_respond_to( proc, swig_call_id ) )
|
1778
1792
|
return 1;
|
1779
1793
|
return 0;
|
1780
1794
|
}
|
@@ -1787,7 +1801,7 @@ int SWIG_Ruby_isCallable( VALUE proc )
|
|
1787
1801
|
SWIGINTERN
|
1788
1802
|
int SWIG_Ruby_arity( VALUE proc, int minimal )
|
1789
1803
|
{
|
1790
|
-
if ( rb_respond_to( proc, swig_arity_id )
|
1804
|
+
if ( rb_respond_to( proc, swig_arity_id ) )
|
1791
1805
|
{
|
1792
1806
|
VALUE num = rb_funcall( proc, swig_arity_id, 0 );
|
1793
1807
|
int arity = NUM2INT(num);
|
@@ -1814,18 +1828,20 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
|
|
1814
1828
|
/* -------- TYPES TABLE (BEGIN) -------- */
|
1815
1829
|
|
1816
1830
|
#define SWIGTYPE_p_MapT_TagLib__String_TagLib__StringList_t swig_types[0]
|
1817
|
-
#define
|
1818
|
-
#define
|
1819
|
-
#define
|
1820
|
-
#define
|
1821
|
-
#define
|
1822
|
-
#define
|
1823
|
-
#define
|
1824
|
-
#define
|
1825
|
-
#define
|
1826
|
-
#define
|
1827
|
-
|
1828
|
-
|
1831
|
+
#define SWIGTYPE_p_TagLib__FLAC__Picture swig_types[1]
|
1832
|
+
#define SWIGTYPE_p_TagLib__File swig_types[2]
|
1833
|
+
#define SWIGTYPE_p_TagLib__ListT_TagLib__FLAC__Picture_t swig_types[3]
|
1834
|
+
#define SWIGTYPE_p_TagLib__Ogg__File swig_types[4]
|
1835
|
+
#define SWIGTYPE_p_TagLib__Ogg__PageHeader swig_types[5]
|
1836
|
+
#define SWIGTYPE_p_TagLib__Ogg__XiphComment swig_types[6]
|
1837
|
+
#define SWIGTYPE_p_TagLib__Tag swig_types[7]
|
1838
|
+
#define SWIGTYPE_p_char swig_types[8]
|
1839
|
+
#define SWIGTYPE_p_unsigned_char swig_types[9]
|
1840
|
+
#define SWIGTYPE_p_unsigned_int swig_types[10]
|
1841
|
+
#define SWIGTYPE_p_unsigned_long swig_types[11]
|
1842
|
+
#define SWIGTYPE_p_wchar_t swig_types[12]
|
1843
|
+
static swig_type_info *swig_types[14];
|
1844
|
+
static swig_module_info swig_module = {swig_types, 13, 0, 0, 0, 0};
|
1829
1845
|
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
1830
1846
|
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
1831
1847
|
|
@@ -1840,7 +1856,7 @@ static VALUE mOgg;
|
|
1840
1856
|
#define SWIG_RUBY_THREAD_END_BLOCK
|
1841
1857
|
|
1842
1858
|
|
1843
|
-
#define SWIGVERSION
|
1859
|
+
#define SWIGVERSION 0x030007
|
1844
1860
|
#define SWIG_VERSION SWIGVERSION
|
1845
1861
|
|
1846
1862
|
|
@@ -1853,7 +1869,10 @@ static VALUE mOgg;
|
|
1853
1869
|
|
1854
1870
|
#include <taglib/taglib.h>
|
1855
1871
|
#include <taglib/oggfile.h>
|
1872
|
+
#include <taglib/flacpicture.h>
|
1856
1873
|
#include <taglib/xiphcomment.h>
|
1874
|
+
// Help find FLAC::
|
1875
|
+
using namespace TagLib;
|
1857
1876
|
|
1858
1877
|
|
1859
1878
|
#include <taglib/tstring.h>
|
@@ -1863,9 +1882,11 @@ static VALUE mOgg;
|
|
1863
1882
|
#if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
|
1864
1883
|
# include <ruby/encoding.h>
|
1865
1884
|
# define ASSOCIATE_UTF8_ENCODING(value) rb_enc_associate(value, rb_utf8_encoding());
|
1885
|
+
# define ASSOCIATE_FILESYSTEM_ENCODING(value) rb_enc_associate(value, rb_filesystem_encoding());
|
1866
1886
|
# define CONVERT_TO_UTF8(value) rb_str_export_to_enc(value, rb_utf8_encoding())
|
1867
1887
|
#else
|
1868
1888
|
# define ASSOCIATE_UTF8_ENCODING(value) /* nothing */
|
1889
|
+
# define ASSOCIATE_FILESYSTEM_ENCODING(value)
|
1869
1890
|
# define CONVERT_TO_UTF8(value) value
|
1870
1891
|
#endif
|
1871
1892
|
|
@@ -1873,7 +1894,7 @@ VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) {
|
|
1873
1894
|
if (byteVector.isNull()) {
|
1874
1895
|
return Qnil;
|
1875
1896
|
} else {
|
1876
|
-
return
|
1897
|
+
return rb_str_new(byteVector.data(), byteVector.size());
|
1877
1898
|
}
|
1878
1899
|
}
|
1879
1900
|
|
@@ -1889,7 +1910,7 @@ VALUE taglib_string_to_ruby_string(const TagLib::String & string) {
|
|
1889
1910
|
if (string.isNull()) {
|
1890
1911
|
return Qnil;
|
1891
1912
|
} else {
|
1892
|
-
VALUE result =
|
1913
|
+
VALUE result = rb_str_new2(string.toCString(true));
|
1893
1914
|
ASSOCIATE_UTF8_ENCODING(result);
|
1894
1915
|
return result;
|
1895
1916
|
}
|
@@ -1918,7 +1939,7 @@ TagLib::StringList ruby_array_to_taglib_string_list(VALUE ary) {
|
|
1918
1939
|
return result;
|
1919
1940
|
}
|
1920
1941
|
for (long i = 0; i < RARRAY_LEN(ary); i++) {
|
1921
|
-
VALUE e =
|
1942
|
+
VALUE e = rb_ary_entry(ary, i);
|
1922
1943
|
TagLib::String s = ruby_string_to_taglib_string(e);
|
1923
1944
|
result.append(s);
|
1924
1945
|
}
|
@@ -1926,12 +1947,15 @@ TagLib::StringList ruby_array_to_taglib_string_list(VALUE ary) {
|
|
1926
1947
|
}
|
1927
1948
|
|
1928
1949
|
VALUE taglib_filename_to_ruby_string(TagLib::FileName filename) {
|
1950
|
+
VALUE result;
|
1929
1951
|
#ifdef _WIN32
|
1930
1952
|
const char *s = (const char *) filename;
|
1931
|
-
|
1953
|
+
result = rb_str_new2(s);
|
1932
1954
|
#else
|
1933
|
-
|
1955
|
+
result = rb_str_new2(filename);
|
1934
1956
|
#endif
|
1957
|
+
ASSOCIATE_FILESYSTEM_ENCODING(result);
|
1958
|
+
return result;
|
1935
1959
|
}
|
1936
1960
|
|
1937
1961
|
TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
|
@@ -1963,6 +1987,17 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
|
|
1963
1987
|
|
1964
1988
|
|
1965
1989
|
|
1990
|
+
VALUE taglib_flac_picturelist_to_ruby_array(const TagLib::List<TagLib::FLAC::Picture *> & list) {
|
1991
|
+
VALUE ary = rb_ary_new2(list.size());
|
1992
|
+
for (TagLib::List<TagLib::FLAC::Picture *>::ConstIterator it = list.begin(); it != list.end(); it++) {
|
1993
|
+
TagLib::FLAC::Picture *picture = *it;
|
1994
|
+
VALUE p = SWIG_NewPointerObj(picture, SWIGTYPE_p_TagLib__FLAC__Picture, 0);
|
1995
|
+
rb_ary_push(ary, p);
|
1996
|
+
}
|
1997
|
+
return ary;
|
1998
|
+
}
|
1999
|
+
|
2000
|
+
|
1966
2001
|
#include <limits.h>
|
1967
2002
|
#if !defined(SWIG_NO_LLONG_MAX)
|
1968
2003
|
# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
|
@@ -1980,7 +2015,7 @@ SWIG_ruby_failed(void)
|
|
1980
2015
|
}
|
1981
2016
|
|
1982
2017
|
|
1983
|
-
/*@SWIG:/usr/local/share/swig/
|
2018
|
+
/*@SWIG:/usr/local/share/swig/3.0.7/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
1984
2019
|
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
|
1985
2020
|
{
|
1986
2021
|
VALUE obj = args[0];
|
@@ -2099,7 +2134,7 @@ SWIG_From_unsigned_SS_int (unsigned int value)
|
|
2099
2134
|
}
|
2100
2135
|
|
2101
2136
|
|
2102
|
-
/*@SWIG:/usr/local/share/swig/
|
2137
|
+
/*@SWIG:/usr/local/share/swig/3.0.7/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2103
2138
|
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
|
2104
2139
|
{
|
2105
2140
|
VALUE obj = args[0];
|
@@ -2187,7 +2222,7 @@ free_TagLib_Ogg_File(TagLib::Ogg::File *arg1) {
|
|
2187
2222
|
SWIGINTERN VALUE
|
2188
2223
|
_wrap_File_packet(int argc, VALUE *argv, VALUE self) {
|
2189
2224
|
TagLib::Ogg::File *arg1 = (TagLib::Ogg::File *) 0 ;
|
2190
|
-
|
2225
|
+
unsigned int arg2 ;
|
2191
2226
|
void *argp1 = 0 ;
|
2192
2227
|
int res1 = 0 ;
|
2193
2228
|
unsigned int val2 ;
|
@@ -2205,9 +2240,9 @@ _wrap_File_packet(int argc, VALUE *argv, VALUE self) {
|
|
2205
2240
|
arg1 = reinterpret_cast< TagLib::Ogg::File * >(argp1);
|
2206
2241
|
ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
|
2207
2242
|
if (!SWIG_IsOK(ecode2)) {
|
2208
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "
|
2243
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","packet", 2, argv[0] ));
|
2209
2244
|
}
|
2210
|
-
arg2 = static_cast<
|
2245
|
+
arg2 = static_cast< unsigned int >(val2);
|
2211
2246
|
result = (arg1)->packet(arg2);
|
2212
2247
|
{
|
2213
2248
|
vresult = taglib_bytevector_to_ruby_string(result);
|
@@ -2221,7 +2256,7 @@ fail:
|
|
2221
2256
|
SWIGINTERN VALUE
|
2222
2257
|
_wrap_File_packete___(int argc, VALUE *argv, VALUE self) {
|
2223
2258
|
TagLib::Ogg::File *arg1 = (TagLib::Ogg::File *) 0 ;
|
2224
|
-
|
2259
|
+
unsigned int arg2 ;
|
2225
2260
|
TagLib::ByteVector *arg3 = 0 ;
|
2226
2261
|
void *argp1 = 0 ;
|
2227
2262
|
int res1 = 0 ;
|
@@ -2239,9 +2274,9 @@ _wrap_File_packete___(int argc, VALUE *argv, VALUE self) {
|
|
2239
2274
|
arg1 = reinterpret_cast< TagLib::Ogg::File * >(argp1);
|
2240
2275
|
ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
|
2241
2276
|
if (!SWIG_IsOK(ecode2)) {
|
2242
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "
|
2277
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","setPacket", 2, argv[0] ));
|
2243
2278
|
}
|
2244
|
-
arg2 = static_cast<
|
2279
|
+
arg2 = static_cast< unsigned int >(val2);
|
2245
2280
|
{
|
2246
2281
|
tmp3 = ruby_string_to_taglib_bytevector(argv[1]);
|
2247
2282
|
arg3 = &tmp3;
|
@@ -2554,7 +2589,7 @@ _wrap_XiphComment_year(int argc, VALUE *argv, VALUE self) {
|
|
2554
2589
|
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
2555
2590
|
void *argp1 = 0 ;
|
2556
2591
|
int res1 = 0 ;
|
2557
|
-
|
2592
|
+
unsigned int result;
|
2558
2593
|
VALUE vresult = Qnil;
|
2559
2594
|
|
2560
2595
|
if ((argc < 0) || (argc > 0)) {
|
@@ -2565,7 +2600,7 @@ _wrap_XiphComment_year(int argc, VALUE *argv, VALUE self) {
|
|
2565
2600
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment const *","year", 1, self ));
|
2566
2601
|
}
|
2567
2602
|
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
2568
|
-
result = (
|
2603
|
+
result = (unsigned int)((TagLib::Ogg::XiphComment const *)arg1)->year();
|
2569
2604
|
vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
|
2570
2605
|
return vresult;
|
2571
2606
|
fail:
|
@@ -2578,7 +2613,7 @@ _wrap_XiphComment_track(int argc, VALUE *argv, VALUE self) {
|
|
2578
2613
|
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
2579
2614
|
void *argp1 = 0 ;
|
2580
2615
|
int res1 = 0 ;
|
2581
|
-
|
2616
|
+
unsigned int result;
|
2582
2617
|
VALUE vresult = Qnil;
|
2583
2618
|
|
2584
2619
|
if ((argc < 0) || (argc > 0)) {
|
@@ -2589,7 +2624,7 @@ _wrap_XiphComment_track(int argc, VALUE *argv, VALUE self) {
|
|
2589
2624
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment const *","track", 1, self ));
|
2590
2625
|
}
|
2591
2626
|
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
2592
|
-
result = (
|
2627
|
+
result = (unsigned int)((TagLib::Ogg::XiphComment const *)arg1)->track();
|
2593
2628
|
vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
|
2594
2629
|
return vresult;
|
2595
2630
|
fail:
|
@@ -2735,7 +2770,7 @@ fail:
|
|
2735
2770
|
SWIGINTERN VALUE
|
2736
2771
|
_wrap_XiphComment_yeare___(int argc, VALUE *argv, VALUE self) {
|
2737
2772
|
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
2738
|
-
|
2773
|
+
unsigned int arg2 ;
|
2739
2774
|
void *argp1 = 0 ;
|
2740
2775
|
int res1 = 0 ;
|
2741
2776
|
unsigned int val2 ;
|
@@ -2751,9 +2786,9 @@ _wrap_XiphComment_yeare___(int argc, VALUE *argv, VALUE self) {
|
|
2751
2786
|
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
2752
2787
|
ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
|
2753
2788
|
if (!SWIG_IsOK(ecode2)) {
|
2754
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "
|
2789
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","setYear", 2, argv[0] ));
|
2755
2790
|
}
|
2756
|
-
arg2 = static_cast<
|
2791
|
+
arg2 = static_cast< unsigned int >(val2);
|
2757
2792
|
(arg1)->setYear(arg2);
|
2758
2793
|
return Qnil;
|
2759
2794
|
fail:
|
@@ -2764,7 +2799,7 @@ fail:
|
|
2764
2799
|
SWIGINTERN VALUE
|
2765
2800
|
_wrap_XiphComment_tracke___(int argc, VALUE *argv, VALUE self) {
|
2766
2801
|
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
2767
|
-
|
2802
|
+
unsigned int arg2 ;
|
2768
2803
|
void *argp1 = 0 ;
|
2769
2804
|
int res1 = 0 ;
|
2770
2805
|
unsigned int val2 ;
|
@@ -2780,9 +2815,9 @@ _wrap_XiphComment_tracke___(int argc, VALUE *argv, VALUE self) {
|
|
2780
2815
|
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
2781
2816
|
ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
|
2782
2817
|
if (!SWIG_IsOK(ecode2)) {
|
2783
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "
|
2818
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","setTrack", 2, argv[0] ));
|
2784
2819
|
}
|
2785
|
-
arg2 = static_cast<
|
2820
|
+
arg2 = static_cast< unsigned int >(val2);
|
2786
2821
|
(arg1)->setTrack(arg2);
|
2787
2822
|
return Qnil;
|
2788
2823
|
fail:
|
@@ -2819,7 +2854,7 @@ _wrap_XiphComment_field_count(int argc, VALUE *argv, VALUE self) {
|
|
2819
2854
|
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
2820
2855
|
void *argp1 = 0 ;
|
2821
2856
|
int res1 = 0 ;
|
2822
|
-
|
2857
|
+
unsigned int result;
|
2823
2858
|
VALUE vresult = Qnil;
|
2824
2859
|
|
2825
2860
|
if ((argc < 0) || (argc > 0)) {
|
@@ -2830,7 +2865,7 @@ _wrap_XiphComment_field_count(int argc, VALUE *argv, VALUE self) {
|
|
2830
2865
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment const *","fieldCount", 1, self ));
|
2831
2866
|
}
|
2832
2867
|
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
2833
|
-
result = (
|
2868
|
+
result = (unsigned int)((TagLib::Ogg::XiphComment const *)arg1)->fieldCount();
|
2834
2869
|
vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
|
2835
2870
|
return vresult;
|
2836
2871
|
fail:
|
@@ -2864,6 +2899,28 @@ fail:
|
|
2864
2899
|
}
|
2865
2900
|
|
2866
2901
|
|
2902
|
+
SWIGINTERN VALUE
|
2903
|
+
_wrap_XiphComment_check_key(int argc, VALUE *argv, VALUE self) {
|
2904
|
+
TagLib::String *arg1 = 0 ;
|
2905
|
+
TagLib::String tmp1 ;
|
2906
|
+
bool result;
|
2907
|
+
VALUE vresult = Qnil;
|
2908
|
+
|
2909
|
+
if ((argc < 1) || (argc > 1)) {
|
2910
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2911
|
+
}
|
2912
|
+
{
|
2913
|
+
tmp1 = ruby_string_to_taglib_string(argv[0]);
|
2914
|
+
arg1 = &tmp1;
|
2915
|
+
}
|
2916
|
+
result = (bool)TagLib::Ogg::XiphComment::checkKey((TagLib::String const &)*arg1);
|
2917
|
+
vresult = SWIG_From_bool(static_cast< bool >(result));
|
2918
|
+
return vresult;
|
2919
|
+
fail:
|
2920
|
+
return Qnil;
|
2921
|
+
}
|
2922
|
+
|
2923
|
+
|
2867
2924
|
SWIGINTERN VALUE
|
2868
2925
|
_wrap_XiphComment_vendor_id(int argc, VALUE *argv, VALUE self) {
|
2869
2926
|
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
@@ -3026,32 +3083,26 @@ fail:
|
|
3026
3083
|
|
3027
3084
|
|
3028
3085
|
SWIGINTERN VALUE
|
3029
|
-
|
3086
|
+
_wrap_XiphComment_remove_fields__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
3030
3087
|
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
3031
3088
|
TagLib::String *arg2 = 0 ;
|
3032
|
-
TagLib::String *arg3 = 0 ;
|
3033
3089
|
void *argp1 = 0 ;
|
3034
3090
|
int res1 = 0 ;
|
3035
3091
|
TagLib::String tmp2 ;
|
3036
|
-
TagLib::String tmp3 ;
|
3037
3092
|
|
3038
|
-
if ((argc <
|
3039
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
3093
|
+
if ((argc < 1) || (argc > 1)) {
|
3094
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3040
3095
|
}
|
3041
3096
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Ogg__XiphComment, 0 | 0 );
|
3042
3097
|
if (!SWIG_IsOK(res1)) {
|
3043
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment *","
|
3098
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment *","removeFields", 1, self ));
|
3044
3099
|
}
|
3045
3100
|
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
3046
3101
|
{
|
3047
3102
|
tmp2 = ruby_string_to_taglib_string(argv[0]);
|
3048
3103
|
arg2 = &tmp2;
|
3049
3104
|
}
|
3050
|
-
|
3051
|
-
tmp3 = ruby_string_to_taglib_string(argv[1]);
|
3052
|
-
arg3 = &tmp3;
|
3053
|
-
}
|
3054
|
-
(arg1)->removeField((TagLib::String const &)*arg2,(TagLib::String const &)*arg3);
|
3105
|
+
(arg1)->removeFields((TagLib::String const &)*arg2);
|
3055
3106
|
return Qnil;
|
3056
3107
|
fail:
|
3057
3108
|
return Qnil;
|
@@ -3059,33 +3110,39 @@ fail:
|
|
3059
3110
|
|
3060
3111
|
|
3061
3112
|
SWIGINTERN VALUE
|
3062
|
-
|
3113
|
+
_wrap_XiphComment_remove_fields__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
3063
3114
|
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
3064
3115
|
TagLib::String *arg2 = 0 ;
|
3116
|
+
TagLib::String *arg3 = 0 ;
|
3065
3117
|
void *argp1 = 0 ;
|
3066
3118
|
int res1 = 0 ;
|
3067
3119
|
TagLib::String tmp2 ;
|
3120
|
+
TagLib::String tmp3 ;
|
3068
3121
|
|
3069
|
-
if ((argc <
|
3070
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
3122
|
+
if ((argc < 2) || (argc > 2)) {
|
3123
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
3071
3124
|
}
|
3072
3125
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Ogg__XiphComment, 0 | 0 );
|
3073
3126
|
if (!SWIG_IsOK(res1)) {
|
3074
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment *","
|
3127
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment *","removeFields", 1, self ));
|
3075
3128
|
}
|
3076
3129
|
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
3077
3130
|
{
|
3078
3131
|
tmp2 = ruby_string_to_taglib_string(argv[0]);
|
3079
3132
|
arg2 = &tmp2;
|
3080
3133
|
}
|
3081
|
-
|
3134
|
+
{
|
3135
|
+
tmp3 = ruby_string_to_taglib_string(argv[1]);
|
3136
|
+
arg3 = &tmp3;
|
3137
|
+
}
|
3138
|
+
(arg1)->removeFields((TagLib::String const &)*arg2,(TagLib::String const &)*arg3);
|
3082
3139
|
return Qnil;
|
3083
3140
|
fail:
|
3084
3141
|
return Qnil;
|
3085
3142
|
}
|
3086
3143
|
|
3087
3144
|
|
3088
|
-
SWIGINTERN VALUE
|
3145
|
+
SWIGINTERN VALUE _wrap_XiphComment_remove_fields(int nargs, VALUE *args, VALUE self) {
|
3089
3146
|
int argc;
|
3090
3147
|
VALUE argv[4];
|
3091
3148
|
int ii;
|
@@ -3105,7 +3162,7 @@ SWIGINTERN VALUE _wrap_XiphComment_remove_field(int nargs, VALUE *args, VALUE se
|
|
3105
3162
|
int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
|
3106
3163
|
_v = SWIG_CheckState(res);
|
3107
3164
|
if (_v) {
|
3108
|
-
return
|
3165
|
+
return _wrap_XiphComment_remove_fields__SWIG_0(nargs, args, self);
|
3109
3166
|
}
|
3110
3167
|
}
|
3111
3168
|
}
|
@@ -3121,21 +3178,42 @@ SWIGINTERN VALUE _wrap_XiphComment_remove_field(int nargs, VALUE *args, VALUE se
|
|
3121
3178
|
int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
|
3122
3179
|
_v = SWIG_CheckState(res);
|
3123
3180
|
if (_v) {
|
3124
|
-
return
|
3181
|
+
return _wrap_XiphComment_remove_fields__SWIG_1(nargs, args, self);
|
3125
3182
|
}
|
3126
3183
|
}
|
3127
3184
|
}
|
3128
3185
|
}
|
3129
3186
|
|
3130
3187
|
fail:
|
3131
|
-
Ruby_Format_OverloadedError( argc, 4, "XiphComment.
|
3132
|
-
" void XiphComment.
|
3133
|
-
" void XiphComment.
|
3188
|
+
Ruby_Format_OverloadedError( argc, 4, "XiphComment.remove_fields",
|
3189
|
+
" void XiphComment.remove_fields(TagLib::String const &key)\n"
|
3190
|
+
" void XiphComment.remove_fields(TagLib::String const &key, TagLib::String const &value)\n");
|
3134
3191
|
|
3135
3192
|
return Qnil;
|
3136
3193
|
}
|
3137
3194
|
|
3138
3195
|
|
3196
|
+
SWIGINTERN VALUE
|
3197
|
+
_wrap_XiphComment_remove_all_fields(int argc, VALUE *argv, VALUE self) {
|
3198
|
+
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
3199
|
+
void *argp1 = 0 ;
|
3200
|
+
int res1 = 0 ;
|
3201
|
+
|
3202
|
+
if ((argc < 0) || (argc > 0)) {
|
3203
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3204
|
+
}
|
3205
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Ogg__XiphComment, 0 | 0 );
|
3206
|
+
if (!SWIG_IsOK(res1)) {
|
3207
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment *","removeAllFields", 1, self ));
|
3208
|
+
}
|
3209
|
+
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
3210
|
+
(arg1)->removeAllFields();
|
3211
|
+
return Qnil;
|
3212
|
+
fail:
|
3213
|
+
return Qnil;
|
3214
|
+
}
|
3215
|
+
|
3216
|
+
|
3139
3217
|
SWIGINTERN VALUE
|
3140
3218
|
_wrap_XiphComment_containsq___(int argc, VALUE *argv, VALUE self) {
|
3141
3219
|
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
@@ -3271,6 +3349,203 @@ fail:
|
|
3271
3349
|
}
|
3272
3350
|
|
3273
3351
|
|
3352
|
+
SWIGINTERN VALUE
|
3353
|
+
_wrap_XiphComment_picture_list(int argc, VALUE *argv, VALUE self) {
|
3354
|
+
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
3355
|
+
void *argp1 = 0 ;
|
3356
|
+
int res1 = 0 ;
|
3357
|
+
SwigValueWrapper< TagLib::List< TagLib::FLAC::Picture * > > result;
|
3358
|
+
VALUE vresult = Qnil;
|
3359
|
+
|
3360
|
+
if ((argc < 0) || (argc > 0)) {
|
3361
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3362
|
+
}
|
3363
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Ogg__XiphComment, 0 | 0 );
|
3364
|
+
if (!SWIG_IsOK(res1)) {
|
3365
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment *","pictureList", 1, self ));
|
3366
|
+
}
|
3367
|
+
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
3368
|
+
result = (arg1)->pictureList();
|
3369
|
+
{
|
3370
|
+
vresult = taglib_flac_picturelist_to_ruby_array(result);
|
3371
|
+
}
|
3372
|
+
return vresult;
|
3373
|
+
fail:
|
3374
|
+
return Qnil;
|
3375
|
+
}
|
3376
|
+
|
3377
|
+
|
3378
|
+
SWIGINTERN VALUE
|
3379
|
+
_wrap_XiphComment_remove_picture__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
3380
|
+
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
3381
|
+
TagLib::FLAC::Picture *arg2 = (TagLib::FLAC::Picture *) 0 ;
|
3382
|
+
bool arg3 ;
|
3383
|
+
void *argp1 = 0 ;
|
3384
|
+
int res1 = 0 ;
|
3385
|
+
int res2 = 0 ;
|
3386
|
+
bool val3 ;
|
3387
|
+
int ecode3 = 0 ;
|
3388
|
+
|
3389
|
+
if ((argc < 2) || (argc > 2)) {
|
3390
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
3391
|
+
}
|
3392
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Ogg__XiphComment, 0 | 0 );
|
3393
|
+
if (!SWIG_IsOK(res1)) {
|
3394
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment *","removePicture", 1, self ));
|
3395
|
+
}
|
3396
|
+
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
3397
|
+
res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_TagLib__FLAC__Picture, SWIG_POINTER_DISOWN | 0 );
|
3398
|
+
if (!SWIG_IsOK(res2)) {
|
3399
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture *","removePicture", 2, argv[0] ));
|
3400
|
+
}
|
3401
|
+
SWIG_RubyUnlinkObjects(arg2);
|
3402
|
+
SWIG_RubyRemoveTracking(arg2);
|
3403
|
+
ecode3 = SWIG_AsVal_bool(argv[1], &val3);
|
3404
|
+
if (!SWIG_IsOK(ecode3)) {
|
3405
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","removePicture", 3, argv[1] ));
|
3406
|
+
}
|
3407
|
+
arg3 = static_cast< bool >(val3);
|
3408
|
+
(arg1)->removePicture(arg2,arg3);
|
3409
|
+
return Qnil;
|
3410
|
+
fail:
|
3411
|
+
return Qnil;
|
3412
|
+
}
|
3413
|
+
|
3414
|
+
|
3415
|
+
SWIGINTERN VALUE
|
3416
|
+
_wrap_XiphComment_remove_picture__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
3417
|
+
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
3418
|
+
TagLib::FLAC::Picture *arg2 = (TagLib::FLAC::Picture *) 0 ;
|
3419
|
+
void *argp1 = 0 ;
|
3420
|
+
int res1 = 0 ;
|
3421
|
+
int res2 = 0 ;
|
3422
|
+
|
3423
|
+
if ((argc < 1) || (argc > 1)) {
|
3424
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3425
|
+
}
|
3426
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Ogg__XiphComment, 0 | 0 );
|
3427
|
+
if (!SWIG_IsOK(res1)) {
|
3428
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment *","removePicture", 1, self ));
|
3429
|
+
}
|
3430
|
+
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
3431
|
+
res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_TagLib__FLAC__Picture, SWIG_POINTER_DISOWN | 0 );
|
3432
|
+
if (!SWIG_IsOK(res2)) {
|
3433
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture *","removePicture", 2, argv[0] ));
|
3434
|
+
}
|
3435
|
+
SWIG_RubyUnlinkObjects(arg2);
|
3436
|
+
SWIG_RubyRemoveTracking(arg2);
|
3437
|
+
(arg1)->removePicture(arg2);
|
3438
|
+
return Qnil;
|
3439
|
+
fail:
|
3440
|
+
return Qnil;
|
3441
|
+
}
|
3442
|
+
|
3443
|
+
|
3444
|
+
SWIGINTERN VALUE _wrap_XiphComment_remove_picture(int nargs, VALUE *args, VALUE self) {
|
3445
|
+
int argc;
|
3446
|
+
VALUE argv[4];
|
3447
|
+
int ii;
|
3448
|
+
|
3449
|
+
argc = nargs + 1;
|
3450
|
+
argv[0] = self;
|
3451
|
+
if (argc > 4) SWIG_fail;
|
3452
|
+
for (ii = 1; (ii < argc); ++ii) {
|
3453
|
+
argv[ii] = args[ii-1];
|
3454
|
+
}
|
3455
|
+
if (argc == 2) {
|
3456
|
+
int _v;
|
3457
|
+
void *vptr = 0;
|
3458
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__Ogg__XiphComment, 0);
|
3459
|
+
_v = SWIG_CheckState(res);
|
3460
|
+
if (_v) {
|
3461
|
+
void *vptr = 0;
|
3462
|
+
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_TagLib__FLAC__Picture, 0);
|
3463
|
+
_v = SWIG_CheckState(res);
|
3464
|
+
if (_v) {
|
3465
|
+
return _wrap_XiphComment_remove_picture__SWIG_1(nargs, args, self);
|
3466
|
+
}
|
3467
|
+
}
|
3468
|
+
}
|
3469
|
+
if (argc == 3) {
|
3470
|
+
int _v;
|
3471
|
+
void *vptr = 0;
|
3472
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__Ogg__XiphComment, 0);
|
3473
|
+
_v = SWIG_CheckState(res);
|
3474
|
+
if (_v) {
|
3475
|
+
void *vptr = 0;
|
3476
|
+
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_TagLib__FLAC__Picture, 0);
|
3477
|
+
_v = SWIG_CheckState(res);
|
3478
|
+
if (_v) {
|
3479
|
+
{
|
3480
|
+
int res = SWIG_AsVal_bool(argv[2], NULL);
|
3481
|
+
_v = SWIG_CheckState(res);
|
3482
|
+
}
|
3483
|
+
if (_v) {
|
3484
|
+
return _wrap_XiphComment_remove_picture__SWIG_0(nargs, args, self);
|
3485
|
+
}
|
3486
|
+
}
|
3487
|
+
}
|
3488
|
+
}
|
3489
|
+
|
3490
|
+
fail:
|
3491
|
+
Ruby_Format_OverloadedError( argc, 4, "XiphComment.remove_picture",
|
3492
|
+
" void XiphComment.remove_picture(TagLib::FLAC::Picture *picture, bool del)\n"
|
3493
|
+
" void XiphComment.remove_picture(TagLib::FLAC::Picture *picture)\n");
|
3494
|
+
|
3495
|
+
return Qnil;
|
3496
|
+
}
|
3497
|
+
|
3498
|
+
|
3499
|
+
SWIGINTERN VALUE
|
3500
|
+
_wrap_XiphComment_remove_all_pictures(int argc, VALUE *argv, VALUE self) {
|
3501
|
+
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
3502
|
+
void *argp1 = 0 ;
|
3503
|
+
int res1 = 0 ;
|
3504
|
+
|
3505
|
+
if ((argc < 0) || (argc > 0)) {
|
3506
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3507
|
+
}
|
3508
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Ogg__XiphComment, 0 | 0 );
|
3509
|
+
if (!SWIG_IsOK(res1)) {
|
3510
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment *","removeAllPictures", 1, self ));
|
3511
|
+
}
|
3512
|
+
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
3513
|
+
(arg1)->removeAllPictures();
|
3514
|
+
return Qnil;
|
3515
|
+
fail:
|
3516
|
+
return Qnil;
|
3517
|
+
}
|
3518
|
+
|
3519
|
+
|
3520
|
+
SWIGINTERN VALUE
|
3521
|
+
_wrap_XiphComment_add_picture(int argc, VALUE *argv, VALUE self) {
|
3522
|
+
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
3523
|
+
TagLib::FLAC::Picture *arg2 = (TagLib::FLAC::Picture *) 0 ;
|
3524
|
+
void *argp1 = 0 ;
|
3525
|
+
int res1 = 0 ;
|
3526
|
+
int res2 = 0 ;
|
3527
|
+
|
3528
|
+
if ((argc < 1) || (argc > 1)) {
|
3529
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3530
|
+
}
|
3531
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Ogg__XiphComment, 0 | 0 );
|
3532
|
+
if (!SWIG_IsOK(res1)) {
|
3533
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment *","addPicture", 1, self ));
|
3534
|
+
}
|
3535
|
+
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
3536
|
+
res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_TagLib__FLAC__Picture, SWIG_POINTER_DISOWN | 0 );
|
3537
|
+
if (!SWIG_IsOK(res2)) {
|
3538
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture *","addPicture", 2, argv[0] ));
|
3539
|
+
}
|
3540
|
+
SWIG_RubyUnlinkObjects(arg2);
|
3541
|
+
SWIG_RubyRemoveTracking(arg2);
|
3542
|
+
(arg1)->addPicture(arg2);
|
3543
|
+
return Qnil;
|
3544
|
+
fail:
|
3545
|
+
return Qnil;
|
3546
|
+
}
|
3547
|
+
|
3548
|
+
|
3274
3549
|
|
3275
3550
|
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
|
3276
3551
|
|
@@ -3281,7 +3556,9 @@ static void *_p_TagLib__Ogg__FileTo_p_TagLib__File(void *x, int *SWIGUNUSEDPARM(
|
|
3281
3556
|
return (void *)((TagLib::File *) ((TagLib::Ogg::File *) x));
|
3282
3557
|
}
|
3283
3558
|
static swig_type_info _swigt__p_MapT_TagLib__String_TagLib__StringList_t = {"_p_MapT_TagLib__String_TagLib__StringList_t", "Map< TagLib::String,TagLib::StringList > *|TagLib::Ogg::FieldListMap *", 0, 0, (void*)0, 0};
|
3559
|
+
static swig_type_info _swigt__p_TagLib__FLAC__Picture = {"_p_TagLib__FLAC__Picture", "TagLib::FLAC::Picture *", 0, 0, (void*)0, 0};
|
3284
3560
|
static swig_type_info _swigt__p_TagLib__File = {"_p_TagLib__File", "TagLib::File *", 0, 0, (void*)0, 0};
|
3561
|
+
static swig_type_info _swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t = {"_p_TagLib__ListT_TagLib__FLAC__Picture_t", "TagLib::List< TagLib::FLAC::Picture > *|TagLib::FLAC::PictureList *", 0, 0, (void*)0, 0};
|
3285
3562
|
static swig_type_info _swigt__p_TagLib__Ogg__File = {"_p_TagLib__Ogg__File", "TagLib::Ogg::File *", 0, 0, (void*)0, 0};
|
3286
3563
|
static swig_type_info _swigt__p_TagLib__Ogg__PageHeader = {"_p_TagLib__Ogg__PageHeader", "TagLib::Ogg::PageHeader *", 0, 0, (void*)0, 0};
|
3287
3564
|
static swig_type_info _swigt__p_TagLib__Ogg__XiphComment = {"_p_TagLib__Ogg__XiphComment", "TagLib::Ogg::XiphComment *", 0, 0, (void*)0, 0};
|
@@ -3294,7 +3571,9 @@ static swig_type_info _swigt__p_wchar_t = {"_p_wchar_t", "TagLib::wchar *|wchar_
|
|
3294
3571
|
|
3295
3572
|
static swig_type_info *swig_type_initial[] = {
|
3296
3573
|
&_swigt__p_MapT_TagLib__String_TagLib__StringList_t,
|
3574
|
+
&_swigt__p_TagLib__FLAC__Picture,
|
3297
3575
|
&_swigt__p_TagLib__File,
|
3576
|
+
&_swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t,
|
3298
3577
|
&_swigt__p_TagLib__Ogg__File,
|
3299
3578
|
&_swigt__p_TagLib__Ogg__PageHeader,
|
3300
3579
|
&_swigt__p_TagLib__Ogg__XiphComment,
|
@@ -3307,7 +3586,9 @@ static swig_type_info *swig_type_initial[] = {
|
|
3307
3586
|
};
|
3308
3587
|
|
3309
3588
|
static swig_cast_info _swigc__p_MapT_TagLib__String_TagLib__StringList_t[] = { {&_swigt__p_MapT_TagLib__String_TagLib__StringList_t, 0, 0, 0},{0, 0, 0, 0}};
|
3589
|
+
static swig_cast_info _swigc__p_TagLib__FLAC__Picture[] = { {&_swigt__p_TagLib__FLAC__Picture, 0, 0, 0},{0, 0, 0, 0}};
|
3310
3590
|
static swig_cast_info _swigc__p_TagLib__File[] = { {&_swigt__p_TagLib__Ogg__File, _p_TagLib__Ogg__FileTo_p_TagLib__File, 0, 0}, {&_swigt__p_TagLib__File, 0, 0, 0},{0, 0, 0, 0}};
|
3591
|
+
static swig_cast_info _swigc__p_TagLib__ListT_TagLib__FLAC__Picture_t[] = { {&_swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t, 0, 0, 0},{0, 0, 0, 0}};
|
3311
3592
|
static swig_cast_info _swigc__p_TagLib__Ogg__File[] = { {&_swigt__p_TagLib__Ogg__File, 0, 0, 0},{0, 0, 0, 0}};
|
3312
3593
|
static swig_cast_info _swigc__p_TagLib__Ogg__PageHeader[] = { {&_swigt__p_TagLib__Ogg__PageHeader, 0, 0, 0},{0, 0, 0, 0}};
|
3313
3594
|
static swig_cast_info _swigc__p_TagLib__Ogg__XiphComment[] = { {&_swigt__p_TagLib__Ogg__XiphComment, 0, 0, 0},{0, 0, 0, 0}};
|
@@ -3320,7 +3601,9 @@ static swig_cast_info _swigc__p_wchar_t[] = { {&_swigt__p_wchar_t, 0, 0, 0},{0,
|
|
3320
3601
|
|
3321
3602
|
static swig_cast_info *swig_cast_initial[] = {
|
3322
3603
|
_swigc__p_MapT_TagLib__String_TagLib__StringList_t,
|
3604
|
+
_swigc__p_TagLib__FLAC__Picture,
|
3323
3605
|
_swigc__p_TagLib__File,
|
3606
|
+
_swigc__p_TagLib__ListT_TagLib__FLAC__Picture_t,
|
3324
3607
|
_swigc__p_TagLib__Ogg__File,
|
3325
3608
|
_swigc__p_TagLib__Ogg__PageHeader,
|
3326
3609
|
_swigc__p_TagLib__Ogg__XiphComment,
|
@@ -3337,18 +3620,18 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
3337
3620
|
|
3338
3621
|
/* -----------------------------------------------------------------------------
|
3339
3622
|
* Type initialization:
|
3340
|
-
* This problem is tough by the requirement that no dynamic
|
3341
|
-
* memory is used. Also, since swig_type_info structures store pointers to
|
3623
|
+
* This problem is tough by the requirement that no dynamic
|
3624
|
+
* memory is used. Also, since swig_type_info structures store pointers to
|
3342
3625
|
* swig_cast_info structures and swig_cast_info structures store pointers back
|
3343
|
-
* to swig_type_info structures, we need some lookup code at initialization.
|
3344
|
-
* The idea is that swig generates all the structures that are needed.
|
3345
|
-
* The runtime then collects these partially filled structures.
|
3346
|
-
* The SWIG_InitializeModule function takes these initial arrays out of
|
3626
|
+
* to swig_type_info structures, we need some lookup code at initialization.
|
3627
|
+
* The idea is that swig generates all the structures that are needed.
|
3628
|
+
* The runtime then collects these partially filled structures.
|
3629
|
+
* The SWIG_InitializeModule function takes these initial arrays out of
|
3347
3630
|
* swig_module, and does all the lookup, filling in the swig_module.types
|
3348
3631
|
* array with the correct data and linking the correct swig_cast_info
|
3349
3632
|
* structures together.
|
3350
3633
|
*
|
3351
|
-
* The generated swig_type_info structures are assigned
|
3634
|
+
* The generated swig_type_info structures are assigned statically to an initial
|
3352
3635
|
* array. We just loop through that array, and handle each type individually.
|
3353
3636
|
* First we lookup if this type has been already loaded, and if so, use the
|
3354
3637
|
* loaded structure instead of the generated one. Then we have to fill in the
|
@@ -3358,17 +3641,17 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
3358
3641
|
* a column is one of the swig_cast_info structures for that type.
|
3359
3642
|
* The cast_initial array is actually an array of arrays, because each row has
|
3360
3643
|
* a variable number of columns. So to actually build the cast linked list,
|
3361
|
-
* we find the array of casts associated with the type, and loop through it
|
3644
|
+
* we find the array of casts associated with the type, and loop through it
|
3362
3645
|
* adding the casts to the list. The one last trick we need to do is making
|
3363
3646
|
* sure the type pointer in the swig_cast_info struct is correct.
|
3364
3647
|
*
|
3365
|
-
* First off, we lookup the cast->type name to see if it is already loaded.
|
3648
|
+
* First off, we lookup the cast->type name to see if it is already loaded.
|
3366
3649
|
* There are three cases to handle:
|
3367
3650
|
* 1) If the cast->type has already been loaded AND the type we are adding
|
3368
3651
|
* casting info to has not been loaded (it is in this module), THEN we
|
3369
3652
|
* replace the cast->type pointer with the type pointer that has already
|
3370
3653
|
* been loaded.
|
3371
|
-
* 2) If BOTH types (the one we are adding casting info to, and the
|
3654
|
+
* 2) If BOTH types (the one we are adding casting info to, and the
|
3372
3655
|
* cast->type) are loaded, THEN the cast info has already been loaded by
|
3373
3656
|
* the previous module so we just ignore it.
|
3374
3657
|
* 3) Finally, if cast->type has not already been loaded, then we add that
|
@@ -3392,7 +3675,7 @@ SWIGRUNTIME void
|
|
3392
3675
|
SWIG_InitializeModule(void *clientdata) {
|
3393
3676
|
size_t i;
|
3394
3677
|
swig_module_info *module_head, *iter;
|
3395
|
-
int
|
3678
|
+
int init;
|
3396
3679
|
|
3397
3680
|
/* check to see if the circular list has been setup, if not, set it up */
|
3398
3681
|
if (swig_module.next==0) {
|
@@ -3411,27 +3694,23 @@ SWIG_InitializeModule(void *clientdata) {
|
|
3411
3694
|
/* This is the first module loaded for this interpreter */
|
3412
3695
|
/* so set the swig module into the interpreter */
|
3413
3696
|
SWIG_SetModule(clientdata, &swig_module);
|
3414
|
-
module_head = &swig_module;
|
3415
3697
|
} else {
|
3416
3698
|
/* the interpreter has loaded a SWIG module, but has it loaded this one? */
|
3417
|
-
found=0;
|
3418
3699
|
iter=module_head;
|
3419
3700
|
do {
|
3420
3701
|
if (iter==&swig_module) {
|
3421
|
-
|
3422
|
-
|
3702
|
+
/* Our module is already in the list, so there's nothing more to do. */
|
3703
|
+
return;
|
3423
3704
|
}
|
3424
3705
|
iter=iter->next;
|
3425
3706
|
} while (iter!= module_head);
|
3426
3707
|
|
3427
|
-
/*
|
3428
|
-
if (found) return;
|
3429
|
-
/* otherwise we must add out module into the list */
|
3708
|
+
/* otherwise we must add our module into the list */
|
3430
3709
|
swig_module.next = module_head->next;
|
3431
3710
|
module_head->next = &swig_module;
|
3432
3711
|
}
|
3433
3712
|
|
3434
|
-
/* When multiple
|
3713
|
+
/* When multiple interpreters are used, a module could have already been initialized in
|
3435
3714
|
a different interpreter, but not yet have a pointer in this interpreter.
|
3436
3715
|
In this case, we do not want to continue adding types... everything should be
|
3437
3716
|
set up already */
|
@@ -3445,7 +3724,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
3445
3724
|
swig_type_info *type = 0;
|
3446
3725
|
swig_type_info *ret;
|
3447
3726
|
swig_cast_info *cast;
|
3448
|
-
|
3727
|
+
|
3449
3728
|
#ifdef SWIGRUNTIME_DEBUG
|
3450
3729
|
printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
|
3451
3730
|
#endif
|
@@ -3472,7 +3751,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
3472
3751
|
/* Insert casting types */
|
3473
3752
|
cast = swig_module.cast_initial[i];
|
3474
3753
|
while (cast->type) {
|
3475
|
-
|
3754
|
+
|
3476
3755
|
/* Don't need to add information already in the list */
|
3477
3756
|
ret = 0;
|
3478
3757
|
#ifdef SWIGRUNTIME_DEBUG
|
@@ -3590,6 +3869,7 @@ SWIGEXPORT void Init_taglib_ogg(void) {
|
|
3590
3869
|
|
3591
3870
|
SWIG_RubyInitializeTrackings();
|
3592
3871
|
rb_require("taglib_base");
|
3872
|
+
rb_require("taglib_flac_picture");
|
3593
3873
|
|
3594
3874
|
SwigClassFile.klass = rb_define_class_under(mOgg, "File", ((swig_class *) SWIGTYPE_p_TagLib__File->clientdata)->klass);
|
3595
3875
|
SWIG_TypeClientData(SWIGTYPE_p_TagLib__Ogg__File, (void *) &SwigClassFile);
|
@@ -3624,11 +3904,17 @@ SWIGEXPORT void Init_taglib_ogg(void) {
|
|
3624
3904
|
rb_define_method(SwigClassXiphComment.klass, "empty?", VALUEFUNC(_wrap_XiphComment_emptyq___), -1);
|
3625
3905
|
rb_define_method(SwigClassXiphComment.klass, "field_count", VALUEFUNC(_wrap_XiphComment_field_count), -1);
|
3626
3906
|
rb_define_method(SwigClassXiphComment.klass, "field_list_map", VALUEFUNC(_wrap_XiphComment_field_list_map), -1);
|
3907
|
+
rb_define_singleton_method(SwigClassXiphComment.klass, "check_key", VALUEFUNC(_wrap_XiphComment_check_key), -1);
|
3627
3908
|
rb_define_method(SwigClassXiphComment.klass, "vendor_id", VALUEFUNC(_wrap_XiphComment_vendor_id), -1);
|
3628
3909
|
rb_define_method(SwigClassXiphComment.klass, "add_field", VALUEFUNC(_wrap_XiphComment_add_field), -1);
|
3629
|
-
rb_define_method(SwigClassXiphComment.klass, "
|
3910
|
+
rb_define_method(SwigClassXiphComment.klass, "remove_fields", VALUEFUNC(_wrap_XiphComment_remove_fields), -1);
|
3911
|
+
rb_define_method(SwigClassXiphComment.klass, "remove_all_fields", VALUEFUNC(_wrap_XiphComment_remove_all_fields), -1);
|
3630
3912
|
rb_define_method(SwigClassXiphComment.klass, "contains?", VALUEFUNC(_wrap_XiphComment_containsq___), -1);
|
3631
3913
|
rb_define_method(SwigClassXiphComment.klass, "render", VALUEFUNC(_wrap_XiphComment_render), -1);
|
3914
|
+
rb_define_method(SwigClassXiphComment.klass, "picture_list", VALUEFUNC(_wrap_XiphComment_picture_list), -1);
|
3915
|
+
rb_define_method(SwigClassXiphComment.klass, "remove_picture", VALUEFUNC(_wrap_XiphComment_remove_picture), -1);
|
3916
|
+
rb_define_method(SwigClassXiphComment.klass, "remove_all_pictures", VALUEFUNC(_wrap_XiphComment_remove_all_pictures), -1);
|
3917
|
+
rb_define_method(SwigClassXiphComment.klass, "add_picture", VALUEFUNC(_wrap_XiphComment_add_picture), -1);
|
3632
3918
|
SwigClassXiphComment.mark = 0;
|
3633
3919
|
SwigClassXiphComment.destroy = (void (*)(void *)) free_TagLib_Ogg_XiphComment;
|
3634
3920
|
SwigClassXiphComment.trackObjects = 1;
|