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
data/ext/taglib_ogg/taglib_ogg.i
CHANGED
@@ -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
|
|
@@ -1853,12 +1859,13 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
|
|
1853
1859
|
#define SWIGTYPE_p_TagLib__Ogg__XiphComment swig_types[6]
|
1854
1860
|
#define SWIGTYPE_p_TagLib__Tag swig_types[7]
|
1855
1861
|
#define SWIGTYPE_p_char swig_types[8]
|
1856
|
-
#define
|
1857
|
-
#define
|
1858
|
-
#define
|
1859
|
-
#define
|
1860
|
-
|
1861
|
-
static
|
1862
|
+
#define SWIGTYPE_p_long_long swig_types[9]
|
1863
|
+
#define SWIGTYPE_p_unsigned_char swig_types[10]
|
1864
|
+
#define SWIGTYPE_p_unsigned_int swig_types[11]
|
1865
|
+
#define SWIGTYPE_p_unsigned_long swig_types[12]
|
1866
|
+
#define SWIGTYPE_p_wchar_t swig_types[13]
|
1867
|
+
static swig_type_info *swig_types[15];
|
1868
|
+
static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0};
|
1862
1869
|
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
1863
1870
|
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
1864
1871
|
|
@@ -1869,12 +1876,56 @@ static swig_module_info swig_module = {swig_types, 13, 0, 0, 0, 0};
|
|
1869
1876
|
|
1870
1877
|
static VALUE mOgg;
|
1871
1878
|
|
1872
|
-
#
|
1873
|
-
#
|
1879
|
+
#ifdef __cplusplus
|
1880
|
+
#include <utility>
|
1881
|
+
/* SwigValueWrapper is described in swig.swg */
|
1882
|
+
template<typename T> class SwigValueWrapper {
|
1883
|
+
struct SwigSmartPointer {
|
1884
|
+
T *ptr;
|
1885
|
+
SwigSmartPointer(T *p) : ptr(p) { }
|
1886
|
+
~SwigSmartPointer() { delete ptr; }
|
1887
|
+
SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
|
1888
|
+
void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; }
|
1889
|
+
} pointer;
|
1890
|
+
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
|
1891
|
+
SwigValueWrapper(const SwigValueWrapper<T>& rhs);
|
1892
|
+
public:
|
1893
|
+
SwigValueWrapper() : pointer(0) { }
|
1894
|
+
SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; }
|
1895
|
+
#if __cplusplus >=201103L
|
1896
|
+
SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; }
|
1897
|
+
operator T&&() const { return std::move(*pointer.ptr); }
|
1898
|
+
#else
|
1899
|
+
operator T&() const { return *pointer.ptr; }
|
1900
|
+
#endif
|
1901
|
+
T *operator&() const { return pointer.ptr; }
|
1902
|
+
static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); }
|
1903
|
+
};
|
1904
|
+
|
1905
|
+
/*
|
1906
|
+
* SwigValueInit() is a generic initialisation solution as the following approach:
|
1907
|
+
*
|
1908
|
+
* T c_result = T();
|
1909
|
+
*
|
1910
|
+
* doesn't compile for all types for example:
|
1911
|
+
*
|
1912
|
+
* unsigned int c_result = unsigned int();
|
1913
|
+
*/
|
1914
|
+
template <typename T> T SwigValueInit() {
|
1915
|
+
return T();
|
1916
|
+
}
|
1874
1917
|
|
1918
|
+
#if __cplusplus >=201103L
|
1919
|
+
# define SWIG_STD_MOVE(OBJ) std::move(OBJ)
|
1920
|
+
#else
|
1921
|
+
# define SWIG_STD_MOVE(OBJ) OBJ
|
1922
|
+
#endif
|
1923
|
+
|
1924
|
+
#endif
|
1875
1925
|
|
1876
|
-
|
1877
|
-
#define
|
1926
|
+
|
1927
|
+
#define SWIG_RUBY_THREAD_BEGIN_BLOCK
|
1928
|
+
#define SWIG_RUBY_THREAD_END_BLOCK
|
1878
1929
|
|
1879
1930
|
|
1880
1931
|
#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
|
@@ -1888,8 +1939,6 @@ static VALUE mOgg;
|
|
1888
1939
|
#include <taglib/oggfile.h>
|
1889
1940
|
#include <taglib/flacpicture.h>
|
1890
1941
|
#include <taglib/xiphcomment.h>
|
1891
|
-
// Help find FLAC::
|
1892
|
-
using namespace TagLib;
|
1893
1942
|
|
1894
1943
|
|
1895
1944
|
#include <taglib/tstring.h>
|
@@ -1910,34 +1959,26 @@ using namespace TagLib;
|
|
1910
1959
|
#endif
|
1911
1960
|
|
1912
1961
|
VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) {
|
1913
|
-
|
1914
|
-
return Qnil;
|
1915
|
-
} else {
|
1916
|
-
return rb_str_new(byteVector.data(), byteVector.size());
|
1917
|
-
}
|
1962
|
+
return rb_str_new(byteVector.data(), byteVector.size());
|
1918
1963
|
}
|
1919
1964
|
|
1920
1965
|
TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) {
|
1921
1966
|
if (NIL_P(s)) {
|
1922
|
-
return TagLib::ByteVector
|
1967
|
+
return TagLib::ByteVector();
|
1923
1968
|
} else {
|
1924
1969
|
return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s));
|
1925
1970
|
}
|
1926
1971
|
}
|
1927
1972
|
|
1928
1973
|
VALUE taglib_string_to_ruby_string(const TagLib::String & string) {
|
1929
|
-
|
1930
|
-
|
1931
|
-
|
1932
|
-
VALUE result = rb_str_new2(string.toCString(true));
|
1933
|
-
ASSOCIATE_UTF8_ENCODING(result);
|
1934
|
-
return result;
|
1935
|
-
}
|
1974
|
+
VALUE result = rb_str_new2(string.toCString(true));
|
1975
|
+
ASSOCIATE_UTF8_ENCODING(result);
|
1976
|
+
return result;
|
1936
1977
|
}
|
1937
1978
|
|
1938
1979
|
TagLib::String ruby_string_to_taglib_string(VALUE s) {
|
1939
1980
|
if (NIL_P(s)) {
|
1940
|
-
return TagLib::String
|
1981
|
+
return TagLib::String();
|
1941
1982
|
} else {
|
1942
1983
|
return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8);
|
1943
1984
|
}
|
@@ -2026,6 +2067,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
|
|
2026
2067
|
#endif
|
2027
2068
|
}
|
2028
2069
|
|
2070
|
+
VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) {
|
2071
|
+
#ifdef _WIN32
|
2072
|
+
return LL2NUM(off);
|
2073
|
+
#else
|
2074
|
+
return OFFT2NUM(off);
|
2075
|
+
#endif
|
2076
|
+
}
|
2029
2077
|
|
2030
2078
|
|
2031
2079
|
VALUE taglib_flac_picturelist_to_ruby_array(const TagLib::List<TagLib::FLAC::Picture *> & list) {
|
@@ -2056,7 +2104,7 @@ SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2))
|
|
2056
2104
|
}
|
2057
2105
|
|
2058
2106
|
|
2059
|
-
/*@SWIG:/
|
2107
|
+
/*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2060
2108
|
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE arg)
|
2061
2109
|
{
|
2062
2110
|
VALUE *args = (VALUE *)arg;
|
@@ -2176,7 +2224,7 @@ SWIG_From_unsigned_SS_int (unsigned int value)
|
|
2176
2224
|
}
|
2177
2225
|
|
2178
2226
|
|
2179
|
-
/*@SWIG:/
|
2227
|
+
/*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2180
2228
|
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg)
|
2181
2229
|
{
|
2182
2230
|
VALUE *args = (VALUE *)arg;
|
@@ -2473,7 +2521,7 @@ SWIGINTERN VALUE _wrap_new_XiphComment(int nargs, VALUE *args, VALUE self) {
|
|
2473
2521
|
return _wrap_new_XiphComment__SWIG_0(nargs, args, self);
|
2474
2522
|
}
|
2475
2523
|
if (argc == 1) {
|
2476
|
-
int _v;
|
2524
|
+
int _v = 0;
|
2477
2525
|
int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
|
2478
2526
|
_v = SWIG_CheckState(res);
|
2479
2527
|
if (_v) {
|
@@ -3076,7 +3124,7 @@ SWIGINTERN VALUE _wrap_XiphComment_add_field(int nargs, VALUE *args, VALUE self)
|
|
3076
3124
|
argv[ii] = args[ii-1];
|
3077
3125
|
}
|
3078
3126
|
if (argc == 3) {
|
3079
|
-
int _v;
|
3127
|
+
int _v = 0;
|
3080
3128
|
void *vptr = 0;
|
3081
3129
|
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__Ogg__XiphComment, 0);
|
3082
3130
|
_v = SWIG_CheckState(res);
|
@@ -3093,7 +3141,7 @@ SWIGINTERN VALUE _wrap_XiphComment_add_field(int nargs, VALUE *args, VALUE self)
|
|
3093
3141
|
}
|
3094
3142
|
}
|
3095
3143
|
if (argc == 4) {
|
3096
|
-
int _v;
|
3144
|
+
int _v = 0;
|
3097
3145
|
void *vptr = 0;
|
3098
3146
|
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__Ogg__XiphComment, 0);
|
3099
3147
|
_v = SWIG_CheckState(res);
|
@@ -3197,7 +3245,7 @@ SWIGINTERN VALUE _wrap_XiphComment_remove_fields(int nargs, VALUE *args, VALUE s
|
|
3197
3245
|
argv[ii] = args[ii-1];
|
3198
3246
|
}
|
3199
3247
|
if (argc == 2) {
|
3200
|
-
int _v;
|
3248
|
+
int _v = 0;
|
3201
3249
|
void *vptr = 0;
|
3202
3250
|
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__Ogg__XiphComment, 0);
|
3203
3251
|
_v = SWIG_CheckState(res);
|
@@ -3210,7 +3258,7 @@ SWIGINTERN VALUE _wrap_XiphComment_remove_fields(int nargs, VALUE *args, VALUE s
|
|
3210
3258
|
}
|
3211
3259
|
}
|
3212
3260
|
if (argc == 3) {
|
3213
|
-
int _v;
|
3261
|
+
int _v = 0;
|
3214
3262
|
void *vptr = 0;
|
3215
3263
|
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__Ogg__XiphComment, 0);
|
3216
3264
|
_v = SWIG_CheckState(res);
|
@@ -3290,20 +3338,28 @@ fail:
|
|
3290
3338
|
SWIGINTERN VALUE
|
3291
3339
|
_wrap_XiphComment_render__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
3292
3340
|
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
3341
|
+
bool arg2 ;
|
3293
3342
|
void *argp1 = 0 ;
|
3294
3343
|
int res1 = 0 ;
|
3344
|
+
bool val2 ;
|
3345
|
+
int ecode2 = 0 ;
|
3295
3346
|
TagLib::ByteVector result;
|
3296
3347
|
VALUE vresult = Qnil;
|
3297
3348
|
|
3298
|
-
if ((argc <
|
3299
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
3349
|
+
if ((argc < 1) || (argc > 1)) {
|
3350
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3300
3351
|
}
|
3301
3352
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Ogg__XiphComment, 0 | 0 );
|
3302
3353
|
if (!SWIG_IsOK(res1)) {
|
3303
3354
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment const *","render", 1, self ));
|
3304
3355
|
}
|
3305
3356
|
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
3306
|
-
|
3357
|
+
ecode2 = SWIG_AsVal_bool(argv[0], &val2);
|
3358
|
+
if (!SWIG_IsOK(ecode2)) {
|
3359
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","render", 2, argv[0] ));
|
3360
|
+
}
|
3361
|
+
arg2 = static_cast< bool >(val2);
|
3362
|
+
result = ((TagLib::Ogg::XiphComment const *)arg1)->render(arg2);
|
3307
3363
|
{
|
3308
3364
|
vresult = taglib_bytevector_to_ruby_string(result);
|
3309
3365
|
}
|
@@ -3316,28 +3372,20 @@ fail:
|
|
3316
3372
|
SWIGINTERN VALUE
|
3317
3373
|
_wrap_XiphComment_render__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
3318
3374
|
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
3319
|
-
bool arg2 ;
|
3320
3375
|
void *argp1 = 0 ;
|
3321
3376
|
int res1 = 0 ;
|
3322
|
-
bool val2 ;
|
3323
|
-
int ecode2 = 0 ;
|
3324
3377
|
TagLib::ByteVector result;
|
3325
3378
|
VALUE vresult = Qnil;
|
3326
3379
|
|
3327
|
-
if ((argc <
|
3328
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
3380
|
+
if ((argc < 0) || (argc > 0)) {
|
3381
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3329
3382
|
}
|
3330
3383
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Ogg__XiphComment, 0 | 0 );
|
3331
3384
|
if (!SWIG_IsOK(res1)) {
|
3332
3385
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment const *","render", 1, self ));
|
3333
3386
|
}
|
3334
3387
|
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
3335
|
-
|
3336
|
-
if (!SWIG_IsOK(ecode2)) {
|
3337
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","render", 2, argv[0] ));
|
3338
|
-
}
|
3339
|
-
arg2 = static_cast< bool >(val2);
|
3340
|
-
result = ((TagLib::Ogg::XiphComment const *)arg1)->render(arg2);
|
3388
|
+
result = ((TagLib::Ogg::XiphComment const *)arg1)->render();
|
3341
3389
|
{
|
3342
3390
|
vresult = taglib_bytevector_to_ruby_string(result);
|
3343
3391
|
}
|
@@ -3359,16 +3407,16 @@ SWIGINTERN VALUE _wrap_XiphComment_render(int nargs, VALUE *args, VALUE self) {
|
|
3359
3407
|
argv[ii] = args[ii-1];
|
3360
3408
|
}
|
3361
3409
|
if (argc == 1) {
|
3362
|
-
int _v;
|
3410
|
+
int _v = 0;
|
3363
3411
|
void *vptr = 0;
|
3364
3412
|
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__Ogg__XiphComment, 0);
|
3365
3413
|
_v = SWIG_CheckState(res);
|
3366
3414
|
if (_v) {
|
3367
|
-
return
|
3415
|
+
return _wrap_XiphComment_render__SWIG_1(nargs, args, self);
|
3368
3416
|
}
|
3369
3417
|
}
|
3370
3418
|
if (argc == 2) {
|
3371
|
-
int _v;
|
3419
|
+
int _v = 0;
|
3372
3420
|
void *vptr = 0;
|
3373
3421
|
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__Ogg__XiphComment, 0);
|
3374
3422
|
_v = SWIG_CheckState(res);
|
@@ -3378,15 +3426,15 @@ SWIGINTERN VALUE _wrap_XiphComment_render(int nargs, VALUE *args, VALUE self) {
|
|
3378
3426
|
_v = SWIG_CheckState(res);
|
3379
3427
|
}
|
3380
3428
|
if (_v) {
|
3381
|
-
return
|
3429
|
+
return _wrap_XiphComment_render__SWIG_0(nargs, args, self);
|
3382
3430
|
}
|
3383
3431
|
}
|
3384
3432
|
}
|
3385
3433
|
|
3386
3434
|
fail:
|
3387
3435
|
Ruby_Format_OverloadedError( argc, 3, "XiphComment.render",
|
3388
|
-
" TagLib::ByteVector XiphComment.render()\n"
|
3389
|
-
" TagLib::ByteVector XiphComment.render(
|
3436
|
+
" TagLib::ByteVector XiphComment.render(bool addFramingBit)\n"
|
3437
|
+
" TagLib::ByteVector XiphComment.render()\n");
|
3390
3438
|
|
3391
3439
|
return Qnil;
|
3392
3440
|
}
|
@@ -3496,7 +3544,7 @@ SWIGINTERN VALUE _wrap_XiphComment_remove_picture(int nargs, VALUE *args, VALUE
|
|
3496
3544
|
argv[ii] = args[ii-1];
|
3497
3545
|
}
|
3498
3546
|
if (argc == 2) {
|
3499
|
-
int _v;
|
3547
|
+
int _v = 0;
|
3500
3548
|
void *vptr = 0;
|
3501
3549
|
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__Ogg__XiphComment, 0);
|
3502
3550
|
_v = SWIG_CheckState(res);
|
@@ -3510,7 +3558,7 @@ SWIGINTERN VALUE _wrap_XiphComment_remove_picture(int nargs, VALUE *args, VALUE
|
|
3510
3558
|
}
|
3511
3559
|
}
|
3512
3560
|
if (argc == 3) {
|
3513
|
-
int _v;
|
3561
|
+
int _v = 0;
|
3514
3562
|
void *vptr = 0;
|
3515
3563
|
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__Ogg__XiphComment, 0);
|
3516
3564
|
_v = SWIG_CheckState(res);
|
@@ -3592,23 +3640,24 @@ fail:
|
|
3592
3640
|
|
3593
3641
|
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
|
3594
3642
|
|
3595
|
-
static void *_p_TagLib__Ogg__XiphCommentTo_p_TagLib__Tag(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
3596
|
-
return (void *)((TagLib::Tag *) ((TagLib::Ogg::XiphComment *) x));
|
3597
|
-
}
|
3598
3643
|
static void *_p_TagLib__Ogg__FileTo_p_TagLib__File(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
3599
3644
|
return (void *)((TagLib::File *) ((TagLib::Ogg::File *) x));
|
3600
3645
|
}
|
3601
|
-
static
|
3646
|
+
static void *_p_TagLib__Ogg__XiphCommentTo_p_TagLib__Tag(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
3647
|
+
return (void *)((TagLib::Tag *) ((TagLib::Ogg::XiphComment *) x));
|
3648
|
+
}
|
3649
|
+
static swig_type_info _swigt__p_MapT_TagLib__String_TagLib__StringList_t = {"_p_MapT_TagLib__String_TagLib__StringList_t", "TagLib::Ogg::FieldListMap *|Map< TagLib::String,TagLib::StringList > *", 0, 0, (void*)0, 0};
|
3602
3650
|
static swig_type_info _swigt__p_TagLib__FLAC__Picture = {"_p_TagLib__FLAC__Picture", "TagLib::FLAC::Picture *", 0, 0, (void*)0, 0};
|
3603
3651
|
static swig_type_info _swigt__p_TagLib__File = {"_p_TagLib__File", "TagLib::File *", 0, 0, (void*)0, 0};
|
3604
|
-
static swig_type_info _swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t = {"_p_TagLib__ListT_TagLib__FLAC__Picture_t", "TagLib::List< TagLib::FLAC::Picture >
|
3652
|
+
static swig_type_info _swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t = {"_p_TagLib__ListT_TagLib__FLAC__Picture_t", "TagLib::FLAC::PictureList *|TagLib::List< TagLib::FLAC::Picture > *", 0, 0, (void*)0, 0};
|
3605
3653
|
static swig_type_info _swigt__p_TagLib__Ogg__File = {"_p_TagLib__Ogg__File", "TagLib::Ogg::File *", 0, 0, (void*)0, 0};
|
3606
3654
|
static swig_type_info _swigt__p_TagLib__Ogg__PageHeader = {"_p_TagLib__Ogg__PageHeader", "TagLib::Ogg::PageHeader *", 0, 0, (void*)0, 0};
|
3607
3655
|
static swig_type_info _swigt__p_TagLib__Ogg__XiphComment = {"_p_TagLib__Ogg__XiphComment", "TagLib::Ogg::XiphComment *", 0, 0, (void*)0, 0};
|
3608
3656
|
static swig_type_info _swigt__p_TagLib__Tag = {"_p_TagLib__Tag", "TagLib::Tag *", 0, 0, (void*)0, 0};
|
3609
3657
|
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
|
3658
|
+
static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0};
|
3610
3659
|
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0};
|
3611
|
-
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int
|
3660
|
+
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0};
|
3612
3661
|
static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0};
|
3613
3662
|
static swig_type_info _swigt__p_wchar_t = {"_p_wchar_t", "TagLib::wchar *|wchar_t *", 0, 0, (void*)0, 0};
|
3614
3663
|
|
@@ -3622,6 +3671,7 @@ static swig_type_info *swig_type_initial[] = {
|
|
3622
3671
|
&_swigt__p_TagLib__Ogg__XiphComment,
|
3623
3672
|
&_swigt__p_TagLib__Tag,
|
3624
3673
|
&_swigt__p_char,
|
3674
|
+
&_swigt__p_long_long,
|
3625
3675
|
&_swigt__p_unsigned_char,
|
3626
3676
|
&_swigt__p_unsigned_int,
|
3627
3677
|
&_swigt__p_unsigned_long,
|
@@ -3630,13 +3680,14 @@ static swig_type_info *swig_type_initial[] = {
|
|
3630
3680
|
|
3631
3681
|
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}};
|
3632
3682
|
static swig_cast_info _swigc__p_TagLib__FLAC__Picture[] = { {&_swigt__p_TagLib__FLAC__Picture, 0, 0, 0},{0, 0, 0, 0}};
|
3633
|
-
static swig_cast_info _swigc__p_TagLib__File[] = { {&
|
3683
|
+
static swig_cast_info _swigc__p_TagLib__File[] = { {&_swigt__p_TagLib__File, 0, 0, 0}, {&_swigt__p_TagLib__Ogg__File, _p_TagLib__Ogg__FileTo_p_TagLib__File, 0, 0},{0, 0, 0, 0}};
|
3634
3684
|
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}};
|
3635
3685
|
static swig_cast_info _swigc__p_TagLib__Ogg__File[] = { {&_swigt__p_TagLib__Ogg__File, 0, 0, 0},{0, 0, 0, 0}};
|
3636
3686
|
static swig_cast_info _swigc__p_TagLib__Ogg__PageHeader[] = { {&_swigt__p_TagLib__Ogg__PageHeader, 0, 0, 0},{0, 0, 0, 0}};
|
3637
3687
|
static swig_cast_info _swigc__p_TagLib__Ogg__XiphComment[] = { {&_swigt__p_TagLib__Ogg__XiphComment, 0, 0, 0},{0, 0, 0, 0}};
|
3638
|
-
static swig_cast_info _swigc__p_TagLib__Tag[] = { {&
|
3688
|
+
static swig_cast_info _swigc__p_TagLib__Tag[] = { {&_swigt__p_TagLib__Tag, 0, 0, 0}, {&_swigt__p_TagLib__Ogg__XiphComment, _p_TagLib__Ogg__XiphCommentTo_p_TagLib__Tag, 0, 0},{0, 0, 0, 0}};
|
3639
3689
|
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
|
3690
|
+
static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
|
3640
3691
|
static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
|
3641
3692
|
static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
|
3642
3693
|
static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
|
@@ -3652,6 +3703,7 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
3652
3703
|
_swigc__p_TagLib__Ogg__XiphComment,
|
3653
3704
|
_swigc__p_TagLib__Tag,
|
3654
3705
|
_swigc__p_char,
|
3706
|
+
_swigc__p_long_long,
|
3655
3707
|
_swigc__p_unsigned_char,
|
3656
3708
|
_swigc__p_unsigned_int,
|
3657
3709
|
_swigc__p_unsigned_long,
|
@@ -3713,9 +3765,12 @@ extern "C" {
|
|
3713
3765
|
#define SWIGRUNTIME_DEBUG
|
3714
3766
|
#endif
|
3715
3767
|
|
3768
|
+
#ifndef SWIG_INIT_CLIENT_DATA_TYPE
|
3769
|
+
#define SWIG_INIT_CLIENT_DATA_TYPE void *
|
3770
|
+
#endif
|
3716
3771
|
|
3717
3772
|
SWIGRUNTIME void
|
3718
|
-
SWIG_InitializeModule(
|
3773
|
+
SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata) {
|
3719
3774
|
size_t i;
|
3720
3775
|
swig_module_info *module_head, *iter;
|
3721
3776
|
int init;
|
@@ -15,6 +15,7 @@
|
|
15
15
|
%ignore TagLib::Vorbis::File::File(IOStream *, bool, Properties::ReadStyle);
|
16
16
|
%ignore TagLib::Vorbis::File::File(IOStream *, bool);
|
17
17
|
%ignore TagLib::Vorbis::File::File(IOStream *);
|
18
|
+
%ignore TagLib::Vorbis::File::isSupported(IOStream *);
|
18
19
|
|
19
20
|
%ignore TagLib::Vorbis::Properties::length; // Deprecated.
|
20
21
|
%include <taglib/vorbisproperties.h>
|