• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

palfrey / tagpy / 24637809887

19 Apr 2026 07:57PM UTC coverage: 66.317% (-25.4%) from 91.742%
24637809887

Pull #62

github

web-flow
Merge b066b766b into 5ad7a2213
Pull Request #62: Remove ignore-errors from lcov

448 of 945 branches covered (47.41%)

Branch coverage included in aggregate %.

690 of 771 relevant lines covered (89.49%)

46.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.19
/src/wrapper/id3.cpp
1
// Copyright (c) 2006-2008 Andreas Kloeckner
2
//
3
// Permission is hereby granted, free of charge, to any person obtaining a copy
4
// of this software and associated documentation files (the "Software"), to
5
// deal in the Software without restriction, including without limitation the
6
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
// sell copies of the Software, and to permit persons to whom the Software is
8
// furnished to do so, subject to the following conditions:
9
//
10
// The above copyright notice and this permission notice shall be included in
11
// all copies or substantial portions of the Software.
12
//
13
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
// IN THE SOFTWARE.
20

21

22

23

24
#include <taglib/id3v1genres.h>
25
#include <taglib/id3v1tag.h>
26
#include <taglib/id3v2tag.h>
27
#include <taglib/id3v2header.h>
28
#include <taglib/id3v2extendedheader.h>
29
#include <taglib/id3v2footer.h>
30
#include <taglib/mpegfile.h>
31
#include <taglib/attachedpictureframe.h>
32
#include <taglib/commentsframe.h>
33
#include <taglib/relativevolumeframe.h>
34
#include <taglib/textidentificationframe.h>
35
#include <taglib/uniquefileidentifierframe.h>
36
#include <taglib/unknownframe.h>
37
#include <taglib/unsynchronizedlyricsframe.h>
38
#include <taglib/apetag.h>
39

40
#include "common.hpp"
41

42

43

44

45
namespace
46
{
47
  // -------------------------------------------------------------
48
  // ID3v2
49
  // -------------------------------------------------------------
50
  struct id3v2_FrameWrap : ID3v2::Frame, wrapper<ID3v2::Frame>
51
  {
52
      String toString() const { return this->get_override("toString")(); }
53
    protected: // maintain constructability
54
      id3v2_FrameWrap(const ByteVector &data) : ID3v2::Frame(data) { }
55
      // In docs, but not in code:
56
      /* id3v2_FrameWrap(ID3v2::Header *h) : ID3v2::Frame(h) { } */
57
  };
58

59
  void id3v2_Tag_addFrame(ID3v2::Tag &t, ID3v2::Frame *f)
30✔
60
  {
61
 #if TAGLIB_HEX_VERSION < CHECK_VERSION(1,12,0)
62
    ID3v2::Frame *f_clone = ID3v2::FrameFactory::instance()->createFrame(f->render());
15!
63
 #else
64
    ID3v2::Frame *f_clone = ID3v2::FrameFactory::instance()->createFrame(f->render(), t.header());
15!
65
 #endif
66
    t.addFrame(f_clone);
30✔
67
  }
30✔
68

69
  object id3v2_rvf_channels(const ID3v2::RelativeVolumeFrame &rvf)
×
70
  {
71
    List<ID3v2::RelativeVolumeFrame::ChannelType> l = rvf.channels();
×
72
    return make_list(l.begin(), l.end());
×
73
  }
×
74

75
  #define MF_OL(MF, MIN, MAX) \
76
  BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(MF##_overloads, MF, MIN, MAX);
77

78
 #if TAGLIB_HEX_VERSION < CHECK_VERSION(1,12,0)
79
  MF_OL(createFrame, 1, 2);
80
 #else
81
  MF_OL(createFrame, 2, 2);
15!
82
 #endif
83
  MF_OL(volumeAdjustmentIndex, 0, 1);
×
84
  MF_OL(volumeAdjustment, 0, 1);
×
85
  MF_OL(peakVolume, 0, 1);
×
86
  MF_OL(setVolumeAdjustmentIndex, 1, 2);
×
87
  MF_OL(setVolumeAdjustment, 1, 2);
×
88
  MF_OL(setPeakVolume, 1, 2);
×
89

90
  #if (TAGPY_TAGLIB_HEX_VERSION >= 0x10800)
91
    MF_OL(render, 0, 1)
92
  #endif
93

94
  // -------------------------------------------------------------
95
  // MPEG
96
  // -------------------------------------------------------------
97
  #if (TAGPY_TAGLIB_HEX_VERSION >= 0x10800)
98
    MF_OL(save, 0, 3)
99
  #else
100
    MF_OL(save, 0, 2)
30✔
101
  #endif
102
  MF_OL(ID3v1Tag, 0, 1)
×
103
  MF_OL(ID3v2Tag, 0, 1)
140✔
104
  MF_OL(APETag, 0, 1)
×
105
  MF_OL(strip, 0, 1)
×
106
}
107

108

109

110

111
void exposeID3()
30✔
112
{
113
  // -------------------------------------------------------------
114
  // ID3v1
115
  // -------------------------------------------------------------
116
  def("id3v1_genre", ID3v1::genre);
30✔
117

118
  class_<ID3v1::Tag, boost::noncopyable, bases<Tag> >
30✔
119
    ("id3v1_Tag")
120
    .def("render", &ID3v1::Tag::render)
30!
121
    ;
122

123
  // -------------------------------------------------------------
124
  // ID3v2
125
  // -------------------------------------------------------------
126
  exposeMap<ByteVector, ID3v2::FrameList>("id3v2_FrameListMap");
30✔
127
  exposePointerList<ID3v2::Frame>("id3v2_FrameList");
30✔
128

129
  {
30✔
130
    typedef ID3v2::FrameFactory cl;
30✔
131

132
 #if TAGLIB_HEX_VERSION < CHECK_VERSION(1,12,0)
133
    ID3v2::Frame *(ID3v2::FrameFactory::*cf1)(const ByteVector &, bool) const
15✔
134
      = &cl::createFrame;
135
    ID3v2::Frame *(ID3v2::FrameFactory::*cf2)(const ByteVector &, TagLib::uint) const
15✔
136
 #else
137
    ID3v2::Frame *(ID3v2::FrameFactory::*cf)(const ByteVector &, const ID3v2::Header *) const
15✔
138
 #endif
139
      = &cl::createFrame;
140

141
    class_<ID3v2::FrameFactory, boost::noncopyable>
30✔
142
      ("id3v2_FrameFactory", no_init)
143
 #if TAGLIB_HEX_VERSION < CHECK_VERSION(1,12,0)
144
      .def("createFrame", cf1, return_value_policy<manage_new_object>())
15!
145
      .def("createFrame", cf2, createFrame_overloads()[return_value_policy<manage_new_object>()])
15!
146
 #else
147
      .def("createFrame", cf, createFrame_overloads()[return_value_policy<manage_new_object>()])
15!
148
 #endif
149
      .def("instance", &cl::instance,
30!
150
          return_value_policy<reference_existing_object>())
30!
151
      .staticmethod("instance")
30✔
152

153
      .DEF_SIMPLE_METHOD(defaultTextEncoding)
30!
154
      .DEF_SIMPLE_METHOD(setDefaultTextEncoding)
30!
155
      ;
156
  }
157

158
  {
30✔
159
    typedef ID3v2::Frame cl;
30✔
160
    class_<id3v2_FrameWrap, boost::noncopyable>("id3v2_Frame", no_init)
30✔
161
      .DEF_SIMPLE_METHOD(frameID)
30!
162
      .DEF_SIMPLE_METHOD(size)
30!
163
      .DEF_SIMPLE_METHOD(setData)
30!
164
      .DEF_SIMPLE_METHOD(setText)
30!
165
      .def("toString", pure_virtual(&ID3v2::Frame::toString))
30!
166
      .DEF_SIMPLE_METHOD(render)
30!
167

168
      .def("headerSize",
30!
169
           #if (TAGLIB_MAJOR_VERSION == 1)
170
           (TagLib::uint (*)())
171
           #else
172
           (unsigned int (TagLib::ID3v2::Frame::*)() const)
173
           #endif
174
           &ID3v2::Frame::headerSize)
175
      .def("headerSize",
30!
176
           #if (TAGLIB_MAJOR_VERSION == 1)
177
           (TagLib::uint (*)())
178
           #else
179
           (unsigned int (TagLib::ID3v2::Frame::*)() const)
180
           #endif
181
           &ID3v2::Frame::headerSize)
182
      // MISSING: textDelimiter
183
      ;
184
  }
185

186
  {
30✔
187
    typedef ID3v2::Header cl;
30✔
188
    class_<cl, boost::noncopyable>
30✔
189
      ("id3v2_Header")
190
    // MISSING: second constructor
191
      .DEF_SIMPLE_METHOD(majorVersion)
30!
192
      .DEF_SIMPLE_METHOD(revisionNumber)
30!
193
      .DEF_SIMPLE_METHOD(extendedHeader)
30!
194
      .DEF_SIMPLE_METHOD(experimentalIndicator)
30!
195
      .DEF_SIMPLE_METHOD(footerPresent)
30!
196
      .DEF_SIMPLE_METHOD(tagSize)
30!
197
      .DEF_SIMPLE_METHOD(completeTagSize)
30!
198
      .DEF_SIMPLE_METHOD(setTagSize)
30!
199
      .DEF_SIMPLE_METHOD(setData)
30!
200
      .DEF_SIMPLE_METHOD(render)
30!
201
      .DEF_SIMPLE_METHOD(size)
30!
202
      .staticmethod("size")
30✔
203
      .DEF_SIMPLE_METHOD(fileIdentifier)
30!
204
      .staticmethod("fileIdentifier")
30!
205
      ;
206
  }
207

208
  {
30✔
209
    typedef ID3v2::ExtendedHeader cl;
30✔
210
    class_<cl, boost::noncopyable>
30✔
211
      ("id3v2_ExtendedHeader", no_init)
212
      .DEF_SIMPLE_METHOD(size)
30!
213
      .DEF_SIMPLE_METHOD(setData)
30!
214
      ;
215
  }
216

217
  {
30✔
218
    typedef ID3v2::Footer cl;
30✔
219
    class_<cl, boost::noncopyable>
30✔
220
      ("id3v2_Footer", no_init)
221
      .DEF_SIMPLE_METHOD(render)
30!
222
      .DEF_SIMPLE_METHOD(size)
30!
223
      .staticmethod("size")
30!
224
      ;
225
  }
226

227
  {
30✔
228
    typedef ID3v2::Tag cl;
30✔
229
    const ID3v2::FrameList &(cl::*fl1)(const ByteVector &) const =
30✔
230
      &cl::frameList;
231
    const ID3v2::FrameList &(cl::*fl2)() const =
30✔
232
      &cl::frameList;
233

234
    class_<cl, boost::noncopyable, bases<Tag> >("id3v2_Tag")
30✔
235
      .def("header", &ID3v2::Tag::header, return_internal_reference<>())
30!
236
      .def("extendedHeader", &ID3v2::Tag::extendedHeader, return_internal_reference<>())
30!
237
      #if (TAGLIB_MAJOR_VERSION == 1)
238
      .def("footer", &ID3v2::Tag::footer, return_internal_reference<>())
25!
239
      #endif
240

241
      .def("frameListMap", &ID3v2::Tag::frameListMap, return_internal_reference<>())
30!
242
      .def("frameList", fl1, return_internal_reference<>())
30!
243
      .def("frameList", fl2, return_internal_reference<>())
30!
244

245
      .def("addFrame", id3v2_Tag_addFrame)
30!
246
      .DEF_SIMPLE_METHOD(removeFrame)
30!
247
      .DEF_SIMPLE_METHOD(removeFrames)
30!
248

249
      #if (TAGPY_TAGLIB_HEX_VERSION >= 0x10800)
250
        // Commented out following comment at:
251
        // https://github.com/inducer/tagpy/commit/fb6d9a95f8ed1b0f347a82569a13e60a75c7e6d6
252
        // .DEF_OVERLOADED_METHOD(render, ByteVector (cl::*)() const)
253
 #if TAGLIB_HEX_VERSION < CHECK_VERSION(1,12,0)
254
        .DEF_OVERLOADED_METHOD(render, ByteVector (cl::*)(int) const)
255
 #else
256
        .DEF_OVERLOADED_METHOD(render, ByteVector (cl::*)(ID3v2::Version) const)
257
 #endif
258
      #else
259
        .def("render", (ByteVector (cl::*)() const) &cl::render)
30!
260
      #endif
261
      ;
262
  }
263

264

265
  // -------------------------------------------------------------
266
  // ID3v2 frame types
267
  // -------------------------------------------------------------
268
  {
30✔
269
    typedef TagLib::ID3v2::AttachedPictureFrame scope;
30✔
270
    enum_<ID3v2::AttachedPictureFrame::Type>("id3v2_AttachedPictureFrame_Type")
30!
271
      .ENUM_VALUE(Other)
30!
272
      .ENUM_VALUE(FileIcon)
30!
273
      .ENUM_VALUE(OtherFileIcon)
30!
274
      .ENUM_VALUE(FrontCover)
30!
275
      .ENUM_VALUE(BackCover)
30!
276
      .ENUM_VALUE(LeafletPage)
30!
277
      .ENUM_VALUE(Media)
30!
278
      .ENUM_VALUE(LeadArtist)
30!
279
      .ENUM_VALUE(Artist)
30!
280
      .ENUM_VALUE(Conductor)
30!
281
      .ENUM_VALUE(Band)
30!
282
      .ENUM_VALUE(Composer)
30!
283
      .ENUM_VALUE(Lyricist)
30!
284
      .ENUM_VALUE(RecordingLocation)
30!
285
      .ENUM_VALUE(DuringRecording)
30!
286
      .ENUM_VALUE(DuringPerformance)
30!
287
      .ENUM_VALUE(MovieScreenCapture)
30!
288
      .ENUM_VALUE(ColouredFish)
30!
289
      .ENUM_VALUE(Illustration)
30!
290
      .ENUM_VALUE(BandLogo)
30!
291
      .ENUM_VALUE(PublisherLogo)
30!
292
      ;
293
  }
294

295
  {
30✔
296
    typedef ID3v2::AttachedPictureFrame cl;
30✔
297
    class_<cl, bases<ID3v2::Frame>, boost::noncopyable>
30✔
298
      ("id3v2_AttachedPictureFrame", init<boost::python::optional<const ByteVector &> >())
30✔
299
      .DEF_SIMPLE_METHOD(textEncoding)
30!
300
      .DEF_SIMPLE_METHOD(setTextEncoding)
30!
301
      .DEF_SIMPLE_METHOD(mimeType)
30!
302
      .DEF_SIMPLE_METHOD(setMimeType)
30!
303
      .DEF_SIMPLE_METHOD(type)
30!
304
      .DEF_SIMPLE_METHOD(setType)
30!
305
      .DEF_SIMPLE_METHOD(description)
30!
306
      .DEF_SIMPLE_METHOD(setDescription)
30!
307
      .DEF_SIMPLE_METHOD(picture)
30!
308
      .DEF_SIMPLE_METHOD(setPicture)
30!
309
      ;
310
  }
311

312
  {
30✔
313
    typedef ID3v2::CommentsFrame cl;
30✔
314
    class_<cl, bases<ID3v2::Frame>, boost::noncopyable>
30✔
315
      ("id3v2_CommentsFrame", init<boost::python::optional<const ByteVector &> >())
30✔
316
      .def(init<String::Type>())
60!
317
      .DEF_SIMPLE_METHOD(language)
30!
318
      .DEF_SIMPLE_METHOD(setLanguage)
30!
319
      .DEF_SIMPLE_METHOD(description)
30!
320
      .DEF_SIMPLE_METHOD(setDescription)
30!
321
      .DEF_SIMPLE_METHOD(textEncoding)
30!
322
      .DEF_SIMPLE_METHOD(setTextEncoding)
30!
323
      ;
324
  }
325

326
  {
30✔
327
    typedef ID3v2::RelativeVolumeFrame::PeakVolume cl;
30✔
328
    class_<cl>
30✔
329
      ("id3v2_PeakVolume")
330
      .def_readwrite("bitsRepresentingPeak", &cl::bitsRepresentingPeak)
30!
331
      .def_readwrite("peakVolume", &cl::peakVolume)
60!
332
      ;
333
  }
334

335
  {
30✔
336
    typedef TagLib::ID3v2::RelativeVolumeFrame scope;
30✔
337
    enum_<ID3v2::RelativeVolumeFrame::ChannelType>("id3v2_RelativeVolumeFrame_ChannelType")
30!
338
      .ENUM_VALUE(Other)
30!
339
      .ENUM_VALUE(MasterVolume)
30!
340
      .ENUM_VALUE(FrontRight)
30!
341
      .ENUM_VALUE(FrontLeft)
30!
342
      .ENUM_VALUE(BackRight)
30!
343
      .ENUM_VALUE(BackLeft)
30!
344
      .ENUM_VALUE(FrontCentre)
30!
345
      .ENUM_VALUE(BackCentre)
30!
346
      .ENUM_VALUE(Subwoofer)
30!
347
      ;
348
  }
349

350
  {
30✔
351
    typedef ID3v2::RelativeVolumeFrame cl;
30✔
352
    class_<cl, bases<ID3v2::Frame>, boost::noncopyable>
30✔
353
      ("id3v2_RelativeVolumeFrame", init<const ByteVector &>())
30✔
354
      // MISSING: Empty constructor, gives symbol errors
355
      .def("channels", id3v2_rvf_channels)
30!
356
      #if (TAGLIB_MAJOR_VERSION == 1)
357
      .DEF_SIMPLE_METHOD(setChannelType)
25!
358
      #endif
359
      .DEF_OVERLOADED_METHOD(volumeAdjustmentIndex, short (cl::*)(cl::ChannelType) const)
30!
360
      .DEF_OVERLOADED_METHOD(setVolumeAdjustmentIndex, void (cl::*)(short, cl::ChannelType))
30!
361
      .DEF_OVERLOADED_METHOD(volumeAdjustment, float (cl::*)(cl::ChannelType) const)
30!
362
      .DEF_OVERLOADED_METHOD(setVolumeAdjustment, void (cl::*)(float, cl::ChannelType))
30!
363
      .DEF_OVERLOADED_METHOD(peakVolume, cl::PeakVolume (cl::*)(cl::ChannelType) const)
30!
364
      .DEF_OVERLOADED_METHOD(setPeakVolume, void (cl::*)(const cl::PeakVolume &, cl::ChannelType))
30!
365
      ;
366
  }
367

368
  {
30✔
369
    typedef ID3v2::TextIdentificationFrame cl;
30✔
370
    class_<cl, bases<ID3v2::Frame>, boost::noncopyable>
30✔
371
      ("id3v2_TextIdentificationFrame", init<const ByteVector &, boost::python::optional<String::Type> >())
30✔
372
      .def("setText", (void (cl::*)(const String &)) &cl::setText)
30!
373
      .def("setText", (void (cl::*)(const StringList &)) &cl::setText)
30!
374
      .DEF_SIMPLE_METHOD(textEncoding)
30!
375
      .DEF_SIMPLE_METHOD(setTextEncoding)
30!
376
      .DEF_SIMPLE_METHOD(fieldList)
30!
377
      ;
378
  }
379

380
  {
30✔
381
    typedef ID3v2::UnsynchronizedLyricsFrame cl;
30✔
382
    class_<cl, bases<ID3v2::Frame>, boost::noncopyable>
30✔
383
      ("id3v2_UnsynchronizedLyricsFrame", init<boost::python::optional<const ByteVector &> >())
30✔
384
      .def(init<String::Type>())
60!
385
      .DEF_SIMPLE_METHOD(language)
30!
386
      .DEF_SIMPLE_METHOD(setLanguage)
30!
387
      .DEF_SIMPLE_METHOD(description)
30!
388
      .DEF_SIMPLE_METHOD(setDescription)
30!
389
      .DEF_SIMPLE_METHOD(textEncoding)
30!
390
      .DEF_SIMPLE_METHOD(setTextEncoding)
30!
391
      ;
392
  }
393

394
  {
30✔
395
    typedef ID3v2::UserTextIdentificationFrame cl;
30✔
396
    class_<cl, bases<ID3v2::TextIdentificationFrame>, boost::noncopyable>
30✔
397
      ("id3v2_UserTextIdentificationFrame", init<const ByteVector &>())
30✔
398
      .def(init<boost::python::optional<String::Type> >())
60!
399
      .DEF_SIMPLE_METHOD(description)
30!
400
      .DEF_SIMPLE_METHOD(setDescription)
30!
401
      .DEF_SIMPLE_METHOD(fieldList)
30!
402
      ;
403
  }
404

405
  {
30✔
406
    typedef ID3v2::UniqueFileIdentifierFrame cl;
30✔
407
    class_<cl, bases<ID3v2::Frame>, boost::noncopyable>
30✔
408
      ("id3v2_UniqueFileIdentifierFrame", init<const ByteVector &>())
30✔
409
      .def(init<const String &, const ByteVector &>())
60!
410
      .DEF_SIMPLE_METHOD(owner)
30!
411
      .DEF_SIMPLE_METHOD(setOwner)
30!
412
      .DEF_SIMPLE_METHOD(identifier)
30!
413
      .DEF_SIMPLE_METHOD(setIdentifier)
30!
414
      ;
415
  }
416

417
  {
30✔
418
    typedef ID3v2::UnknownFrame cl;
30✔
419
    class_<cl, bases<ID3v2::Frame>, boost::noncopyable>
30✔
420
      ("id3v2_UnknownFrame", init<const ByteVector &>())
30✔
421
      .DEF_SIMPLE_METHOD(data)
30!
422
      ;
423
  }
424

425
  // -------------------------------------------------------------
426
  // MPEG
427
  // -------------------------------------------------------------
428
  enum_<MPEG::File::TagTypes>("mpeg_TagTypes")
30!
429
    .value("NoTags", MPEG::File::NoTags)
30!
430
    .value("ID3v1", MPEG::File::ID3v1)
30!
431
    .value("ID3v2", MPEG::File::ID3v2)
30!
432
    .value("APE", MPEG::File::APE)
30!
433
    .value("AllTags", MPEG::File::AllTags)
30!
434
    ;
435

436
  {
30✔
437
    typedef MPEG::Properties cl;
30✔
438
    class_<cl, bases<AudioProperties>, boost::noncopyable>
30✔
439
      ("mpeg_Properties",
440
       //init<File *, AudioProperties::ReadStyle>()
441
       no_init
442
       )
443
      .ADD_RO_PROPERTY(layer)
30!
444
      // .ADD_RO_PROPERTY(protectionEnabled) (not implemented in TagLib 1.4)
445
      // .ADD_RO_PROPERTY(channelMode) (depends on ChannelMode type)
446
      .ADD_RO_PROPERTY(isCopyrighted)
30!
447
      .ADD_RO_PROPERTY(isOriginal)
30!
448
      ;
449
  }
450

451
  {
30✔
452
    typedef MPEG::File cl;
30✔
453
    class_<MPEG::File, bases<File>, boost::noncopyable>
30✔
454
      ("mpeg_File",
455
       init<const char *, boost::python::optional<bool, AudioProperties::ReadStyle> >())
30✔
456
      .def(init<const char *, ID3v2::FrameFactory *, boost::python::optional<bool, AudioProperties::ReadStyle> >())
30!
457
      .def("save",
30!
458
           #if TAGLIB_HEX_VERSION < CHECK_VERSION(1,12,0)
459
             (bool (MPEG::File::*)(int, bool, int))
460
           #else
461
             (bool (MPEG::File::*)(int, TagLib::File::StripTags, TagLib::ID3v2::Version, TagLib::File::DuplicateTags))
462
           #endif
463
           &cl::save,
464
           save_overloads())
45!
465
      .def("ID3v1Tag",
30!
466
           (ID3v1::Tag *(MPEG::File::*)(bool))
467
           &cl::ID3v1Tag,
468
           ID3v1Tag_overloads()[return_internal_reference<>()])
30!
469
      .def("ID3v2Tag",
30!
470
           (ID3v2::Tag *(MPEG::File::*)(bool))
471
           &cl::ID3v2Tag,
472
           ID3v2Tag_overloads()[return_internal_reference<>()])
30!
473
      .def("APETag",
30!
474
           (APE::Tag *(cl::*)(bool)) &cl::APETag,
475
           APETag_overloads()[return_internal_reference<>()])
30!
476
      .def("strip",
60✔
477
           (bool (cl::*)(int)) &cl::strip,
478
           strip_overloads())
60!
479
      #if (TAGLIB_MAJOR_VERSION == 1)
480
      .DEF_SIMPLE_METHOD(setID3v2FrameFactory)
25!
481
      #endif
482
      .DEF_SIMPLE_METHOD(firstFrameOffset)
30!
483
      .DEF_SIMPLE_METHOD(nextFrameOffset)
30!
484
      .DEF_SIMPLE_METHOD(previousFrameOffset)
30!
485
      .DEF_SIMPLE_METHOD(lastFrameOffset)
30!
486
      ;
487
  }
488

489
  // MISSING: Header, XingHeader
490
}
30✔
491

492

493

494

495
// EMACS-FORMAT-TAG
496
//
497
// Local Variables:
498
// mode: C++
499
// eval: (c-set-style "stroustrup")
500
// eval: (c-set-offset 'access-label -2)
501
// eval: (c-set-offset 'inclass '++)
502
// c-basic-offset: 2
503
// tab-width: 8
504
// End:
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc