taglib-ruby 1.1.2 → 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/.github/FUNDING.yml +1 -0
- data/CHANGELOG.md +22 -0
- data/README.md +16 -12
- data/docs/taglib/mpeg.rb +1 -9
- data/ext/extconf_common.rb +21 -12
- data/ext/taglib_aiff/taglib_aiff.i +5 -0
- data/ext/taglib_aiff/taglib_aiff_wrap.cxx +327 -111
- data/ext/taglib_base/includes.i +14 -14
- data/ext/taglib_base/taglib_base.i +37 -4
- data/ext/taglib_base/taglib_base_wrap.cxx +414 -422
- data/ext/taglib_flac/taglib_flac.i +8 -3
- data/ext/taglib_flac/taglib_flac_wrap.cxx +356 -406
- data/ext/taglib_flac_picture/taglib_flac_picture.i +4 -0
- data/ext/taglib_flac_picture/taglib_flac_picture_wrap.cxx +229 -122
- data/ext/taglib_id3v1/taglib_id3v1_wrap.cxx +196 -102
- data/ext/taglib_id3v2/taglib_id3v2.i +5 -0
- data/ext/taglib_id3v2/taglib_id3v2_wrap.cxx +727 -568
- data/ext/taglib_mp4/taglib_mp4.i +22 -18
- data/ext/taglib_mp4/taglib_mp4_wrap.cxx +2141 -1493
- data/ext/taglib_mpeg/taglib_mpeg.i +6 -0
- data/ext/taglib_mpeg/taglib_mpeg_wrap.cxx +546 -379
- data/ext/taglib_ogg/taglib_ogg.i +0 -2
- data/ext/taglib_ogg/taglib_ogg_wrap.cxx +162 -107
- data/ext/taglib_vorbis/taglib_vorbis.i +1 -0
- data/ext/taglib_vorbis/taglib_vorbis_wrap.cxx +141 -109
- data/ext/taglib_wav/taglib_wav.i +6 -2
- data/ext/taglib_wav/taglib_wav_wrap.cxx +290 -147
- data/lib/taglib/version.rb +3 -3
- data/taglib-ruby.gemspec +1 -0
- 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 +4 -3
@@ -1,42 +1,14 @@
|
|
1
1
|
/* ----------------------------------------------------------------------------
|
2
|
-
* This file was automatically generated by SWIG (
|
3
|
-
* Version 4.
|
2
|
+
* This file was automatically generated by SWIG (https://www.swig.org).
|
3
|
+
* Version 4.1.1
|
4
4
|
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* changes to this file unless you know what you are doing--modify the SWIG
|
8
|
-
* interface file instead.
|
5
|
+
* Do not make changes to this file unless you know what you are doing - modify
|
6
|
+
* the SWIG interface file instead.
|
9
7
|
* ----------------------------------------------------------------------------- */
|
10
8
|
|
11
9
|
|
12
|
-
#
|
10
|
+
#define SWIG_VERSION 0x040101
|
13
11
|
#define SWIGRUBY
|
14
|
-
#endif
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
#ifdef __cplusplus
|
19
|
-
/* SwigValueWrapper is described in swig.swg */
|
20
|
-
template<typename T> class SwigValueWrapper {
|
21
|
-
struct SwigMovePointer {
|
22
|
-
T *ptr;
|
23
|
-
SwigMovePointer(T *p) : ptr(p) { }
|
24
|
-
~SwigMovePointer() { delete ptr; }
|
25
|
-
SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
|
26
|
-
} pointer;
|
27
|
-
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
|
28
|
-
SwigValueWrapper(const SwigValueWrapper<T>& rhs);
|
29
|
-
public:
|
30
|
-
SwigValueWrapper() : pointer(0) { }
|
31
|
-
SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
|
32
|
-
operator T&() const { return *pointer.ptr; }
|
33
|
-
T *operator&() { return pointer.ptr; }
|
34
|
-
};
|
35
|
-
|
36
|
-
template <typename T> T SwigValueInit() {
|
37
|
-
return T();
|
38
|
-
}
|
39
|
-
#endif
|
40
12
|
|
41
13
|
/* -----------------------------------------------------------------------------
|
42
14
|
* This section contains generic SWIG labels for method/variable
|
@@ -332,6 +304,8 @@ template <typename T> T SwigValueInit() {
|
|
332
304
|
#define SWIG_POINTER_DISOWN 0x1
|
333
305
|
#define SWIG_CAST_NEW_MEMORY 0x2
|
334
306
|
#define SWIG_POINTER_NO_NULL 0x4
|
307
|
+
#define SWIG_POINTER_CLEAR 0x8
|
308
|
+
#define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)
|
335
309
|
|
336
310
|
/* Flags for new pointer objects */
|
337
311
|
#define SWIG_POINTER_OWN 0x1
|
@@ -403,7 +377,7 @@ template <typename T> T SwigValueInit() {
|
|
403
377
|
SWIG errors code.
|
404
378
|
|
405
379
|
Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
|
406
|
-
allows
|
380
|
+
allows returning the 'cast rank', for example, if you have this
|
407
381
|
|
408
382
|
int food(double)
|
409
383
|
int fooi(int);
|
@@ -417,7 +391,13 @@ template <typename T> T SwigValueInit() {
|
|
417
391
|
*/
|
418
392
|
|
419
393
|
#define SWIG_OK (0)
|
394
|
+
/* Runtime errors are < 0 */
|
420
395
|
#define SWIG_ERROR (-1)
|
396
|
+
/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
|
397
|
+
/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
|
398
|
+
/* Errors < -200 are generic runtime specific errors */
|
399
|
+
#define SWIG_ERROR_RELEASE_NOT_OWNED (-200)
|
400
|
+
|
421
401
|
#define SWIG_IsOK(r) (r >= 0)
|
422
402
|
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
423
403
|
|
@@ -432,7 +412,7 @@ template <typename T> T SwigValueInit() {
|
|
432
412
|
#define SWIG_OLDOBJ (SWIG_OK)
|
433
413
|
#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
|
434
414
|
#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
|
435
|
-
/* Check, add and del mask methods */
|
415
|
+
/* Check, add and del object mask methods */
|
436
416
|
#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
|
437
417
|
#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
|
438
418
|
#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
|
@@ -578,7 +558,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
|
|
578
558
|
Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
|
579
559
|
*/
|
580
560
|
SWIGRUNTIME swig_cast_info *
|
581
|
-
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
|
561
|
+
SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty) {
|
582
562
|
if (ty) {
|
583
563
|
swig_cast_info *iter = ty->cast;
|
584
564
|
while (iter) {
|
@@ -638,9 +618,9 @@ SWIG_TypeName(const swig_type_info *ty) {
|
|
638
618
|
SWIGRUNTIME const char *
|
639
619
|
SWIG_TypePrettyName(const swig_type_info *type) {
|
640
620
|
/* The "str" field contains the equivalent pretty names of the
|
641
|
-
type, separated by vertical-bar characters.
|
642
|
-
|
643
|
-
|
621
|
+
type, separated by vertical-bar characters. Choose the last
|
622
|
+
name. It should be the most specific; a fully resolved name
|
623
|
+
but not necessarily with default template parameters expanded. */
|
644
624
|
if (!type) return NULL;
|
645
625
|
if (type->str != NULL) {
|
646
626
|
const char *last_name = type->str;
|
@@ -860,7 +840,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
860
840
|
}
|
861
841
|
#endif
|
862
842
|
|
863
|
-
/*
|
843
|
+
/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
|
864
844
|
#define SWIG_UnknownError -1
|
865
845
|
#define SWIG_IOError -2
|
866
846
|
#define SWIG_RuntimeError -3
|
@@ -876,9 +856,25 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
876
856
|
#define SWIG_NullReferenceError -13
|
877
857
|
|
878
858
|
|
859
|
+
#if __GNUC__ >= 7
|
860
|
+
#pragma GCC diagnostic push
|
861
|
+
#if defined(__cplusplus)
|
862
|
+
#pragma GCC diagnostic ignored "-Wregister"
|
863
|
+
#if __GNUC__ >= 10
|
864
|
+
#pragma GCC diagnostic ignored "-Wvolatile"
|
865
|
+
#if __GNUC__ >= 11
|
866
|
+
#pragma GCC diagnostic ignored "-Wdeprecated-enum-enum-conversion"
|
867
|
+
#endif
|
868
|
+
#endif
|
869
|
+
#endif
|
870
|
+
#endif
|
879
871
|
|
880
872
|
#include <ruby.h>
|
881
873
|
|
874
|
+
#if __GNUC__ >= 7
|
875
|
+
#pragma GCC diagnostic pop
|
876
|
+
#endif
|
877
|
+
|
882
878
|
/* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
|
883
879
|
* breaks using rb_intern as an lvalue, as SWIG does. We work around this
|
884
880
|
* issue for now by disabling this.
|
@@ -1658,6 +1654,11 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
|
1658
1654
|
own->own = 0;
|
1659
1655
|
}
|
1660
1656
|
|
1657
|
+
if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE)) {
|
1658
|
+
if (!RDATA(obj)->dfree)
|
1659
|
+
return SWIG_ERROR_RELEASE_NOT_OWNED;
|
1660
|
+
}
|
1661
|
+
|
1661
1662
|
/* Check to see if the input object is giving up ownership
|
1662
1663
|
of the underlying C struct or C++ object. If so then we
|
1663
1664
|
need to reset the destructor since the Ruby object no
|
@@ -1669,7 +1670,7 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
|
1669
1670
|
swig_class *sklass = (swig_class *) ty->clientdata;
|
1670
1671
|
track = sklass->trackObjects;
|
1671
1672
|
}
|
1672
|
-
|
1673
|
+
|
1673
1674
|
if (track) {
|
1674
1675
|
/* We are tracking objects for this class. Thus we change the destructor
|
1675
1676
|
* to SWIG_RubyRemoveTracking. This allows us to
|
@@ -1683,6 +1684,10 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
|
1683
1684
|
}
|
1684
1685
|
}
|
1685
1686
|
|
1687
|
+
if (flags & SWIG_POINTER_CLEAR) {
|
1688
|
+
DATA_PTR(obj) = 0;
|
1689
|
+
}
|
1690
|
+
|
1686
1691
|
/* Do type-checking if type info was provided */
|
1687
1692
|
if (ty) {
|
1688
1693
|
if (ty->clientdata) {
|
@@ -1790,6 +1795,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
|
|
1790
1795
|
{
|
1791
1796
|
/* register a new class */
|
1792
1797
|
VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
|
1798
|
+
rb_undef_alloc_func(cl);
|
1793
1799
|
/* create and store the structure pointer to a global variable */
|
1794
1800
|
swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
|
1795
1801
|
rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
|
@@ -1820,7 +1826,7 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
|
|
1820
1826
|
{
|
1821
1827
|
if ( rb_respond_to( proc, swig_arity_id ) )
|
1822
1828
|
{
|
1823
|
-
VALUE num =
|
1829
|
+
VALUE num = rb_funcall2( proc, swig_arity_id, 0, 0 );
|
1824
1830
|
int arity = NUM2INT(num);
|
1825
1831
|
if ( arity < 0 && (arity+1) < -minimal ) return 1;
|
1826
1832
|
if ( arity == minimal ) return 1;
|
@@ -1838,7 +1844,7 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
|
|
1838
1844
|
|
1839
1845
|
#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
|
1840
1846
|
|
1841
|
-
#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; }
|
1847
|
+
#define SWIG_contract_assert(expr, msg) do { if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } } while (0)
|
1842
1848
|
|
1843
1849
|
|
1844
1850
|
|
@@ -1850,12 +1856,13 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
|
|
1850
1856
|
#define SWIGTYPE_p_TagLib__ID3v1__Tag swig_types[3]
|
1851
1857
|
#define SWIGTYPE_p_TagLib__Tag swig_types[4]
|
1852
1858
|
#define SWIGTYPE_p_char swig_types[5]
|
1853
|
-
#define
|
1854
|
-
#define
|
1855
|
-
#define
|
1856
|
-
#define
|
1857
|
-
|
1858
|
-
static
|
1859
|
+
#define SWIGTYPE_p_long_long swig_types[6]
|
1860
|
+
#define SWIGTYPE_p_unsigned_char swig_types[7]
|
1861
|
+
#define SWIGTYPE_p_unsigned_int swig_types[8]
|
1862
|
+
#define SWIGTYPE_p_unsigned_long swig_types[9]
|
1863
|
+
#define SWIGTYPE_p_wchar_t swig_types[10]
|
1864
|
+
static swig_type_info *swig_types[12];
|
1865
|
+
static swig_module_info swig_module = {swig_types, 11, 0, 0, 0, 0};
|
1859
1866
|
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
1860
1867
|
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
1861
1868
|
|
@@ -1866,12 +1873,56 @@ static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0};
|
|
1866
1873
|
|
1867
1874
|
static VALUE mID3v1;
|
1868
1875
|
|
1869
|
-
#
|
1870
|
-
#
|
1876
|
+
#ifdef __cplusplus
|
1877
|
+
#include <utility>
|
1878
|
+
/* SwigValueWrapper is described in swig.swg */
|
1879
|
+
template<typename T> class SwigValueWrapper {
|
1880
|
+
struct SwigSmartPointer {
|
1881
|
+
T *ptr;
|
1882
|
+
SwigSmartPointer(T *p) : ptr(p) { }
|
1883
|
+
~SwigSmartPointer() { delete ptr; }
|
1884
|
+
SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
|
1885
|
+
void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; }
|
1886
|
+
} pointer;
|
1887
|
+
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
|
1888
|
+
SwigValueWrapper(const SwigValueWrapper<T>& rhs);
|
1889
|
+
public:
|
1890
|
+
SwigValueWrapper() : pointer(0) { }
|
1891
|
+
SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; }
|
1892
|
+
#if __cplusplus >=201103L
|
1893
|
+
SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; }
|
1894
|
+
operator T&&() const { return std::move(*pointer.ptr); }
|
1895
|
+
#else
|
1896
|
+
operator T&() const { return *pointer.ptr; }
|
1897
|
+
#endif
|
1898
|
+
T *operator&() const { return pointer.ptr; }
|
1899
|
+
static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); }
|
1900
|
+
};
|
1901
|
+
|
1902
|
+
/*
|
1903
|
+
* SwigValueInit() is a generic initialisation solution as the following approach:
|
1904
|
+
*
|
1905
|
+
* T c_result = T();
|
1906
|
+
*
|
1907
|
+
* doesn't compile for all types for example:
|
1908
|
+
*
|
1909
|
+
* unsigned int c_result = unsigned int();
|
1910
|
+
*/
|
1911
|
+
template <typename T> T SwigValueInit() {
|
1912
|
+
return T();
|
1913
|
+
}
|
1914
|
+
|
1915
|
+
#if __cplusplus >=201103L
|
1916
|
+
# define SWIG_STD_MOVE(OBJ) std::move(OBJ)
|
1917
|
+
#else
|
1918
|
+
# define SWIG_STD_MOVE(OBJ) OBJ
|
1919
|
+
#endif
|
1871
1920
|
|
1921
|
+
#endif
|
1872
1922
|
|
1873
|
-
|
1874
|
-
#define
|
1923
|
+
|
1924
|
+
#define SWIG_RUBY_THREAD_BEGIN_BLOCK
|
1925
|
+
#define SWIG_RUBY_THREAD_END_BLOCK
|
1875
1926
|
|
1876
1927
|
|
1877
1928
|
#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
|
@@ -1903,34 +1954,26 @@ static VALUE mID3v1;
|
|
1903
1954
|
#endif
|
1904
1955
|
|
1905
1956
|
VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) {
|
1906
|
-
|
1907
|
-
return Qnil;
|
1908
|
-
} else {
|
1909
|
-
return rb_str_new(byteVector.data(), byteVector.size());
|
1910
|
-
}
|
1957
|
+
return rb_str_new(byteVector.data(), byteVector.size());
|
1911
1958
|
}
|
1912
1959
|
|
1913
1960
|
TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) {
|
1914
1961
|
if (NIL_P(s)) {
|
1915
|
-
return TagLib::ByteVector
|
1962
|
+
return TagLib::ByteVector();
|
1916
1963
|
} else {
|
1917
1964
|
return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s));
|
1918
1965
|
}
|
1919
1966
|
}
|
1920
1967
|
|
1921
1968
|
VALUE taglib_string_to_ruby_string(const TagLib::String & string) {
|
1922
|
-
|
1923
|
-
|
1924
|
-
|
1925
|
-
VALUE result = rb_str_new2(string.toCString(true));
|
1926
|
-
ASSOCIATE_UTF8_ENCODING(result);
|
1927
|
-
return result;
|
1928
|
-
}
|
1969
|
+
VALUE result = rb_str_new2(string.toCString(true));
|
1970
|
+
ASSOCIATE_UTF8_ENCODING(result);
|
1971
|
+
return result;
|
1929
1972
|
}
|
1930
1973
|
|
1931
1974
|
TagLib::String ruby_string_to_taglib_string(VALUE s) {
|
1932
1975
|
if (NIL_P(s)) {
|
1933
|
-
return TagLib::String
|
1976
|
+
return TagLib::String();
|
1934
1977
|
} else {
|
1935
1978
|
return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8);
|
1936
1979
|
}
|
@@ -2019,6 +2062,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
|
|
2019
2062
|
#endif
|
2020
2063
|
}
|
2021
2064
|
|
2065
|
+
VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) {
|
2066
|
+
#ifdef _WIN32
|
2067
|
+
return LL2NUM(off);
|
2068
|
+
#else
|
2069
|
+
return OFFT2NUM(off);
|
2070
|
+
#endif
|
2071
|
+
}
|
2022
2072
|
|
2023
2073
|
|
2024
2074
|
SWIGINTERN swig_type_info*
|
@@ -2078,43 +2128,50 @@ SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2))
|
|
2078
2128
|
}
|
2079
2129
|
|
2080
2130
|
|
2081
|
-
|
2082
|
-
|
2131
|
+
#include <limits.h>
|
2132
|
+
#if !defined(SWIG_NO_LLONG_MAX)
|
2133
|
+
# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
|
2134
|
+
# define LLONG_MAX __LONG_LONG_MAX__
|
2135
|
+
# define LLONG_MIN (-LLONG_MAX - 1LL)
|
2136
|
+
# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
|
2137
|
+
# endif
|
2138
|
+
#endif
|
2139
|
+
|
2140
|
+
|
2141
|
+
#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
|
2142
|
+
# define SWIG_LONG_LONG_AVAILABLE
|
2143
|
+
#endif
|
2144
|
+
|
2145
|
+
|
2146
|
+
#ifdef SWIG_LONG_LONG_AVAILABLE
|
2147
|
+
/*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2148
|
+
SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE arg)
|
2083
2149
|
{
|
2084
2150
|
VALUE *args = (VALUE *)arg;
|
2085
2151
|
VALUE obj = args[0];
|
2086
2152
|
VALUE type = TYPE(obj);
|
2087
|
-
long *res = (long *)(args[1]);
|
2088
|
-
*res = type == T_FIXNUM ?
|
2153
|
+
long long *res = (long long *)(args[1]);
|
2154
|
+
*res = type == T_FIXNUM ? NUM2LL(obj) : rb_big2ll(obj);
|
2089
2155
|
return obj;
|
2090
2156
|
}
|
2091
2157
|
/*@SWIG@*/
|
2092
2158
|
|
2093
2159
|
SWIGINTERN int
|
2094
|
-
|
2160
|
+
SWIG_AsVal_long_SS_long (VALUE obj, long long *val)
|
2095
2161
|
{
|
2096
2162
|
VALUE type = TYPE(obj);
|
2097
2163
|
if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
|
2098
|
-
long v;
|
2164
|
+
long long v;
|
2099
2165
|
VALUE a[2];
|
2100
2166
|
a[0] = obj;
|
2101
2167
|
a[1] = (VALUE)(&v);
|
2102
|
-
if (rb_rescue(VALUEFUNC(
|
2168
|
+
if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
|
2103
2169
|
if (val) *val = v;
|
2104
2170
|
return SWIG_OK;
|
2105
2171
|
}
|
2106
2172
|
}
|
2107
2173
|
return SWIG_TypeError;
|
2108
2174
|
}
|
2109
|
-
|
2110
|
-
|
2111
|
-
#include <limits.h>
|
2112
|
-
#if !defined(SWIG_NO_LLONG_MAX)
|
2113
|
-
# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
|
2114
|
-
# define LLONG_MAX __LONG_LONG_MAX__
|
2115
|
-
# define LLONG_MIN (-LLONG_MAX - 1LL)
|
2116
|
-
# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
|
2117
|
-
# endif
|
2118
2175
|
#endif
|
2119
2176
|
|
2120
2177
|
|
@@ -2135,7 +2192,7 @@ SWIG_From_unsigned_SS_int (unsigned int value)
|
|
2135
2192
|
}
|
2136
2193
|
|
2137
2194
|
|
2138
|
-
/*@SWIG:/
|
2195
|
+
/*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2139
2196
|
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE arg)
|
2140
2197
|
{
|
2141
2198
|
VALUE *args = (VALUE *)arg;
|
@@ -2181,6 +2238,36 @@ SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val)
|
|
2181
2238
|
}
|
2182
2239
|
|
2183
2240
|
|
2241
|
+
/*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2242
|
+
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg)
|
2243
|
+
{
|
2244
|
+
VALUE *args = (VALUE *)arg;
|
2245
|
+
VALUE obj = args[0];
|
2246
|
+
VALUE type = TYPE(obj);
|
2247
|
+
long *res = (long *)(args[1]);
|
2248
|
+
*res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj);
|
2249
|
+
return obj;
|
2250
|
+
}
|
2251
|
+
/*@SWIG@*/
|
2252
|
+
|
2253
|
+
SWIGINTERN int
|
2254
|
+
SWIG_AsVal_long (VALUE obj, long* val)
|
2255
|
+
{
|
2256
|
+
VALUE type = TYPE(obj);
|
2257
|
+
if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
|
2258
|
+
long v;
|
2259
|
+
VALUE a[2];
|
2260
|
+
a[0] = obj;
|
2261
|
+
a[1] = (VALUE)(&v);
|
2262
|
+
if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
|
2263
|
+
if (val) *val = v;
|
2264
|
+
return SWIG_OK;
|
2265
|
+
}
|
2266
|
+
}
|
2267
|
+
return SWIG_TypeError;
|
2268
|
+
}
|
2269
|
+
|
2270
|
+
|
2184
2271
|
SWIGINTERN int
|
2185
2272
|
SWIG_AsVal_int (VALUE obj, int *val)
|
2186
2273
|
{
|
@@ -2247,6 +2334,13 @@ fail:
|
|
2247
2334
|
}
|
2248
2335
|
|
2249
2336
|
|
2337
|
+
SWIGINTERN void
|
2338
|
+
free_TagLib_ID3v1_StringHandler(void *self) {
|
2339
|
+
TagLib::ID3v1::StringHandler *arg1 = (TagLib::ID3v1::StringHandler *)self;
|
2340
|
+
SWIG_RubyRemoveTracking(arg1);
|
2341
|
+
delete arg1;
|
2342
|
+
}
|
2343
|
+
|
2250
2344
|
SWIGINTERN VALUE
|
2251
2345
|
_wrap_StringHandler_parse(int argc, VALUE *argv, VALUE self) {
|
2252
2346
|
TagLib::ID3v1::StringHandler *arg1 = (TagLib::ID3v1::StringHandler *) 0 ;
|
@@ -2311,13 +2405,6 @@ fail:
|
|
2311
2405
|
}
|
2312
2406
|
|
2313
2407
|
|
2314
|
-
SWIGINTERN void
|
2315
|
-
free_TagLib_ID3v1_StringHandler(void *self) {
|
2316
|
-
TagLib::ID3v1::StringHandler *arg1 = (TagLib::ID3v1::StringHandler *)self;
|
2317
|
-
SWIG_RubyRemoveTracking(arg1);
|
2318
|
-
delete arg1;
|
2319
|
-
}
|
2320
|
-
|
2321
2408
|
static swig_class SwigClassTag;
|
2322
2409
|
|
2323
2410
|
SWIGINTERN VALUE
|
@@ -2354,10 +2441,10 @@ _wrap_Tag_allocate(int argc, VALUE *argv, VALUE self)
|
|
2354
2441
|
SWIGINTERN VALUE
|
2355
2442
|
_wrap_new_Tag__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
2356
2443
|
TagLib::File *arg1 = (TagLib::File *) 0 ;
|
2357
|
-
|
2444
|
+
TagLib::offset_t arg2 ;
|
2358
2445
|
void *argp1 = 0 ;
|
2359
2446
|
int res1 = 0 ;
|
2360
|
-
long val2 ;
|
2447
|
+
long long val2 ;
|
2361
2448
|
int ecode2 = 0 ;
|
2362
2449
|
TagLib::ID3v1::Tag *result = 0 ;
|
2363
2450
|
|
@@ -2369,11 +2456,11 @@ _wrap_new_Tag__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
|
2369
2456
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","Tag", 1, argv[0] ));
|
2370
2457
|
}
|
2371
2458
|
arg1 = reinterpret_cast< TagLib::File * >(argp1);
|
2372
|
-
ecode2 =
|
2459
|
+
ecode2 = SWIG_AsVal_long_SS_long(argv[1], &val2);
|
2373
2460
|
if (!SWIG_IsOK(ecode2)) {
|
2374
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "
|
2461
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","Tag", 2, argv[1] ));
|
2375
2462
|
}
|
2376
|
-
arg2 = static_cast<
|
2463
|
+
arg2 = static_cast< TagLib::offset_t >(val2);
|
2377
2464
|
result = (TagLib::ID3v1::Tag *)new TagLib::ID3v1::Tag(arg1,arg2);
|
2378
2465
|
DATA_PTR(self) = result;
|
2379
2466
|
SWIG_RubyAddTracking(result, self);
|
@@ -2397,13 +2484,13 @@ SWIGINTERN VALUE _wrap_new_Tag(int nargs, VALUE *args, VALUE self) {
|
|
2397
2484
|
return _wrap_new_Tag__SWIG_0(nargs, args, self);
|
2398
2485
|
}
|
2399
2486
|
if (argc == 2) {
|
2400
|
-
int _v;
|
2487
|
+
int _v = 0;
|
2401
2488
|
void *vptr = 0;
|
2402
2489
|
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__File, 0);
|
2403
2490
|
_v = SWIG_CheckState(res);
|
2404
2491
|
if (_v) {
|
2405
2492
|
{
|
2406
|
-
int res =
|
2493
|
+
int res = SWIG_AsVal_long_SS_long(argv[1], NULL);
|
2407
2494
|
_v = SWIG_CheckState(res);
|
2408
2495
|
}
|
2409
2496
|
if (_v) {
|
@@ -2415,7 +2502,7 @@ SWIGINTERN VALUE _wrap_new_Tag(int nargs, VALUE *args, VALUE self) {
|
|
2415
2502
|
fail:
|
2416
2503
|
Ruby_Format_OverloadedError( argc, 2, "Tag.new",
|
2417
2504
|
" Tag.new()\n"
|
2418
|
-
" Tag.new(TagLib::File *file,
|
2505
|
+
" Tag.new(TagLib::File *file, TagLib::offset_t tagOffset)\n");
|
2419
2506
|
|
2420
2507
|
return Qnil;
|
2421
2508
|
}
|
@@ -3013,8 +3100,9 @@ static swig_type_info _swigt__p_TagLib__ID3v1__StringHandler = {"_p_TagLib__ID3v
|
|
3013
3100
|
static swig_type_info _swigt__p_TagLib__ID3v1__Tag = {"_p_TagLib__ID3v1__Tag", "TagLib::ID3v1::Tag *", 0, 0, (void*)0, 0};
|
3014
3101
|
static swig_type_info _swigt__p_TagLib__Tag = {"_p_TagLib__Tag", "TagLib::Tag *", 0, 0, (void*)0, 0};
|
3015
3102
|
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
|
3103
|
+
static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0};
|
3016
3104
|
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0};
|
3017
|
-
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int
|
3105
|
+
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0};
|
3018
3106
|
static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0};
|
3019
3107
|
static swig_type_info _swigt__p_wchar_t = {"_p_wchar_t", "TagLib::wchar *|wchar_t *", 0, 0, (void*)0, 0};
|
3020
3108
|
|
@@ -3025,6 +3113,7 @@ static swig_type_info *swig_type_initial[] = {
|
|
3025
3113
|
&_swigt__p_TagLib__ID3v1__Tag,
|
3026
3114
|
&_swigt__p_TagLib__Tag,
|
3027
3115
|
&_swigt__p_char,
|
3116
|
+
&_swigt__p_long_long,
|
3028
3117
|
&_swigt__p_unsigned_char,
|
3029
3118
|
&_swigt__p_unsigned_int,
|
3030
3119
|
&_swigt__p_unsigned_long,
|
@@ -3035,8 +3124,9 @@ static swig_cast_info _swigc__p_MapT_TagLib__String_int_t[] = { {&_swigt__p_Map
|
|
3035
3124
|
static swig_cast_info _swigc__p_TagLib__File[] = { {&_swigt__p_TagLib__File, 0, 0, 0},{0, 0, 0, 0}};
|
3036
3125
|
static swig_cast_info _swigc__p_TagLib__ID3v1__StringHandler[] = { {&_swigt__p_TagLib__ID3v1__StringHandler, 0, 0, 0},{0, 0, 0, 0}};
|
3037
3126
|
static swig_cast_info _swigc__p_TagLib__ID3v1__Tag[] = { {&_swigt__p_TagLib__ID3v1__Tag, 0, 0, 0},{0, 0, 0, 0}};
|
3038
|
-
static swig_cast_info _swigc__p_TagLib__Tag[] = { {&
|
3127
|
+
static swig_cast_info _swigc__p_TagLib__Tag[] = { {&_swigt__p_TagLib__Tag, 0, 0, 0}, {&_swigt__p_TagLib__ID3v1__Tag, _p_TagLib__ID3v1__TagTo_p_TagLib__Tag, 0, 0},{0, 0, 0, 0}};
|
3039
3128
|
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
|
3129
|
+
static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
|
3040
3130
|
static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
|
3041
3131
|
static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
|
3042
3132
|
static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
|
@@ -3049,6 +3139,7 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
3049
3139
|
_swigc__p_TagLib__ID3v1__Tag,
|
3050
3140
|
_swigc__p_TagLib__Tag,
|
3051
3141
|
_swigc__p_char,
|
3142
|
+
_swigc__p_long_long,
|
3052
3143
|
_swigc__p_unsigned_char,
|
3053
3144
|
_swigc__p_unsigned_int,
|
3054
3145
|
_swigc__p_unsigned_long,
|
@@ -3110,9 +3201,12 @@ extern "C" {
|
|
3110
3201
|
#define SWIGRUNTIME_DEBUG
|
3111
3202
|
#endif
|
3112
3203
|
|
3204
|
+
#ifndef SWIG_INIT_CLIENT_DATA_TYPE
|
3205
|
+
#define SWIG_INIT_CLIENT_DATA_TYPE void *
|
3206
|
+
#endif
|
3113
3207
|
|
3114
3208
|
SWIGRUNTIME void
|
3115
|
-
SWIG_InitializeModule(
|
3209
|
+
SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata) {
|
3116
3210
|
size_t i;
|
3117
3211
|
swig_module_info *module_head, *iter;
|
3118
3212
|
int init;
|
@@ -81,6 +81,7 @@ VALUE taglib_id3v2_framelist_to_ruby_array(TagLib::ID3v2::FrameList *list) {
|
|
81
81
|
}
|
82
82
|
%}
|
83
83
|
|
84
|
+
%include <taglib/id3v2.h>
|
84
85
|
%include <taglib/id3v2header.h>
|
85
86
|
|
86
87
|
// Only useful internally.
|
@@ -131,6 +132,10 @@ VALUE taglib_id3v2_framelist_to_ruby_array(TagLib::ID3v2::FrameList *list) {
|
|
131
132
|
|
132
133
|
%include "relativevolumeframe.i"
|
133
134
|
|
135
|
+
%ignore TagLib::Utils::pictureTypeToString;
|
136
|
+
%ignore TagLib::Utils::pictureTypeFromString;
|
137
|
+
%include <taglib/tpicturetype.h>
|
138
|
+
|
134
139
|
%include <taglib/attachedpictureframe.h>
|
135
140
|
|
136
141
|
// Ignore the unified property interface.
|