taglib-ruby 1.1.3 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +15 -11
- data/docs/taglib/mpeg.rb +1 -9
- data/ext/extconf_common.rb +21 -12
- data/ext/taglib_aiff/taglib_aiff.i +4 -0
- data/ext/taglib_aiff/taglib_aiff_wrap.cxx +222 -59
- data/ext/taglib_base/includes.i +14 -14
- data/ext/taglib_base/taglib_base.i +21 -0
- data/ext/taglib_base/taglib_base_wrap.cxx +289 -350
- data/ext/taglib_flac/taglib_flac.i +7 -3
- data/ext/taglib_flac/taglib_flac_wrap.cxx +233 -336
- data/ext/taglib_flac_picture/taglib_flac_picture.i +4 -0
- data/ext/taglib_flac_picture/taglib_flac_picture_wrap.cxx +125 -71
- data/ext/taglib_id3v1/taglib_id3v1_wrap.cxx +92 -51
- data/ext/taglib_id3v2/taglib_id3v2.i +5 -0
- data/ext/taglib_id3v2/taglib_id3v2_wrap.cxx +524 -414
- data/ext/taglib_mp4/taglib_mp4.i +21 -18
- data/ext/taglib_mp4/taglib_mp4_wrap.cxx +2062 -1467
- data/ext/taglib_mpeg/taglib_mpeg.i +5 -0
- data/ext/taglib_mpeg/taglib_mpeg_wrap.cxx +414 -300
- data/ext/taglib_ogg/taglib_ogg.i +0 -2
- data/ext/taglib_ogg/taglib_ogg_wrap.cxx +44 -42
- data/ext/taglib_vorbis/taglib_vorbis_wrap.cxx +27 -48
- data/ext/taglib_wav/taglib_wav.i +5 -2
- data/ext/taglib_wav/taglib_wav_wrap.cxx +179 -89
- data/lib/taglib/version.rb +3 -3
- data/tasks/ext.rake +23 -39
- data/tasks/swig.rake +14 -4
- data/test/id3v2_write_test.rb +1 -1
- data/test/wav_examples_test.rb +1 -1
- data/test/wav_file_test.rb +1 -1
- data/test/wav_file_write_test.rb +6 -6
- metadata +3 -3
data/ext/taglib_base/includes.i
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
#define TAGLIB_EXPORT
|
5
5
|
#define TAGLIB_IGNORE_MISSING_DESTRUCTOR
|
6
6
|
#define TAGLIB_DEPRECATED
|
7
|
+
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
7
8
|
|
8
9
|
// Replaces the typemap from swigtype.swg and just adds the line
|
9
10
|
// SWIG_RubyUnlinkObjects. This is done to be safe in the case when a
|
@@ -36,34 +37,26 @@
|
|
36
37
|
#endif
|
37
38
|
|
38
39
|
VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) {
|
39
|
-
|
40
|
-
return Qnil;
|
41
|
-
} else {
|
42
|
-
return rb_str_new(byteVector.data(), byteVector.size());
|
43
|
-
}
|
40
|
+
return rb_str_new(byteVector.data(), byteVector.size());
|
44
41
|
}
|
45
42
|
|
46
43
|
TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) {
|
47
44
|
if (NIL_P(s)) {
|
48
|
-
return TagLib::ByteVector
|
45
|
+
return TagLib::ByteVector();
|
49
46
|
} else {
|
50
47
|
return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s));
|
51
48
|
}
|
52
49
|
}
|
53
50
|
|
54
51
|
VALUE taglib_string_to_ruby_string(const TagLib::String & string) {
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
VALUE result = rb_str_new2(string.toCString(true));
|
59
|
-
ASSOCIATE_UTF8_ENCODING(result);
|
60
|
-
return result;
|
61
|
-
}
|
52
|
+
VALUE result = rb_str_new2(string.toCString(true));
|
53
|
+
ASSOCIATE_UTF8_ENCODING(result);
|
54
|
+
return result;
|
62
55
|
}
|
63
56
|
|
64
57
|
TagLib::String ruby_string_to_taglib_string(VALUE s) {
|
65
58
|
if (NIL_P(s)) {
|
66
|
-
return TagLib::String
|
59
|
+
return TagLib::String();
|
67
60
|
} else {
|
68
61
|
return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8);
|
69
62
|
}
|
@@ -152,6 +145,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
|
|
152
145
|
#endif
|
153
146
|
}
|
154
147
|
|
148
|
+
VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) {
|
149
|
+
#ifdef _WIN32
|
150
|
+
return LL2NUM(off);
|
151
|
+
#else
|
152
|
+
return OFFT2NUM(off);
|
153
|
+
#endif
|
154
|
+
}
|
155
155
|
%}
|
156
156
|
|
157
157
|
// vim: set filetype=cpp sw=2 ts=2 expandtab:
|
@@ -26,6 +26,7 @@ namespace TagLib {
|
|
26
26
|
typedef unsigned char uchar;
|
27
27
|
typedef unsigned int uint;
|
28
28
|
typedef unsigned long ulong;
|
29
|
+
using offset_t = long long;
|
29
30
|
}
|
30
31
|
|
31
32
|
%constant int TAGLIB_MAJOR_VERSION = TAGLIB_MAJOR_VERSION;
|
@@ -125,6 +126,10 @@ namespace TagLib {
|
|
125
126
|
%typemap(typecheck) TagLib::FileName = char *;
|
126
127
|
%feature("valuewrapper") TagLib::FileName;
|
127
128
|
|
129
|
+
%typemap(out) TagLib::offset_t {
|
130
|
+
$result = taglib_offset_t_to_ruby_int($1);
|
131
|
+
}
|
132
|
+
|
128
133
|
%ignore TagLib::List::operator[];
|
129
134
|
%ignore TagLib::List::operator=;
|
130
135
|
%ignore TagLib::List::operator!=;
|
@@ -135,6 +140,10 @@ namespace TagLib {
|
|
135
140
|
%ignore TagLib::Tag::setProperties;
|
136
141
|
%ignore TagLib::Tag::removeUnsupportedProperties;
|
137
142
|
|
143
|
+
%ignore TagLib::Tag::complexProperties;
|
144
|
+
%ignore TagLib::Tag::setComplexProperties;
|
145
|
+
%ignore TagLib::Tag::complexPropertyKeys;
|
146
|
+
|
138
147
|
%include <taglib/tag.h>
|
139
148
|
|
140
149
|
%ignore TagLib::AudioProperties::length; // Deprecated.
|
@@ -147,8 +156,20 @@ namespace TagLib {
|
|
147
156
|
%ignore TagLib::File::setProperties;
|
148
157
|
%ignore TagLib::File::removeUnsupportedProperties;
|
149
158
|
|
159
|
+
%ignore TagLib::File::complexProperties;
|
160
|
+
%ignore TagLib::File::setComplexProperties;
|
161
|
+
%ignore TagLib::File::complexPropertyKeys;
|
162
|
+
|
150
163
|
%include <taglib/tfile.h>
|
151
164
|
|
165
|
+
%ignore TagLib::FileRef::properties;
|
166
|
+
%ignore TagLib::FileRef::setProperties;
|
167
|
+
%ignore TagLib::FileRef::removeUnsupportedProperties;
|
168
|
+
|
169
|
+
%ignore TagLib::FileRef::complexProperties;
|
170
|
+
%ignore TagLib::FileRef::setComplexProperties;
|
171
|
+
%ignore TagLib::FileRef::complexPropertyKeys;
|
172
|
+
|
152
173
|
// Ignore IOStream and all the constructors using it.
|
153
174
|
%ignore IOStream;
|
154
175
|
%ignore TagLib::FileRef::FileRef(IOStream*, bool, AudioProperties::ReadStyle);
|