rtaglib 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. data/History.txt +4 -0
  2. data/Manifest.txt +84 -9
  3. data/README.txt +0 -0
  4. data/Rakefile +30 -27
  5. data/{test/data → data}/440Hz-5sec.flac +0 -0
  6. data/{test/data → data}/440Hz-5sec.mp3 +0 -0
  7. data/{test/data → data}/440Hz-5sec.mpc +0 -0
  8. data/{test/data → data}/440Hz-5sec.ogg +0 -0
  9. data/{test/data → data}/440Hz-5sec.wv +0 -0
  10. data/data/test_jason.mp3 +0 -0
  11. data/data/test_jason.ogg +0 -0
  12. data/ext/Rakefile +10 -0
  13. data/ext/tagfile/Rakefile.rb +42 -0
  14. data/ext/tagfile/rake_ext_conf.rb +29 -0
  15. data/ext/tagfile/tagfile.c +11 -7
  16. data/ext/taglib/Rakefile.rb +48 -0
  17. data/ext/taglib/rake_ext_conf.rb +33 -0
  18. data/ext/taglib/taglib-mswin32/bin/tag.dll +0 -0
  19. data/ext/taglib/taglib-mswin32/bin/tag_c.dll +0 -0
  20. data/ext/taglib/taglib-mswin32/bin/tag_cd.dll +0 -0
  21. data/ext/taglib/taglib-mswin32/bin/tagd.dll +0 -0
  22. data/ext/taglib/taglib-mswin32/bin/taglib-config +55 -0
  23. data/ext/taglib/taglib-mswin32/include/taglib/apefooter.h +173 -0
  24. data/ext/taglib/taglib-mswin32/include/taglib/apeitem.h +204 -0
  25. data/ext/taglib/taglib-mswin32/include/taglib/apetag.h +162 -0
  26. data/ext/taglib/taglib-mswin32/include/taglib/attachedpictureframe.h +220 -0
  27. data/ext/taglib/taglib-mswin32/include/taglib/audioproperties.h +110 -0
  28. data/ext/taglib/taglib-mswin32/include/taglib/commentsframe.h +168 -0
  29. data/ext/taglib/taglib-mswin32/include/taglib/fileref.h +262 -0
  30. data/ext/taglib/taglib-mswin32/include/taglib/flacfile.h +201 -0
  31. data/ext/taglib/taglib-mswin32/include/taglib/flacproperties.h +92 -0
  32. data/ext/taglib/taglib-mswin32/include/taglib/generalencapsulatedobjectframe.h +174 -0
  33. data/ext/taglib/taglib-mswin32/include/taglib/id3v1genres.h +66 -0
  34. data/ext/taglib/taglib-mswin32/include/taglib/id3v1tag.h +180 -0
  35. data/ext/taglib/taglib-mswin32/include/taglib/id3v2extendedheader.h +93 -0
  36. data/ext/taglib/taglib-mswin32/include/taglib/id3v2footer.h +82 -0
  37. data/ext/taglib/taglib-mswin32/include/taglib/id3v2frame.h +414 -0
  38. data/ext/taglib/taglib-mswin32/include/taglib/id3v2framefactory.h +167 -0
  39. data/ext/taglib/taglib-mswin32/include/taglib/id3v2header.h +175 -0
  40. data/ext/taglib/taglib-mswin32/include/taglib/id3v2synchdata.h +70 -0
  41. data/ext/taglib/taglib-mswin32/include/taglib/id3v2tag.h +300 -0
  42. data/ext/taglib/taglib-mswin32/include/taglib/mpcfile.h +175 -0
  43. data/ext/taglib/taglib-mswin32/include/taglib/mpcproperties.h +85 -0
  44. data/ext/taglib/taglib-mswin32/include/taglib/mpegfile.h +277 -0
  45. data/ext/taglib/taglib-mswin32/include/taglib/mpegheader.h +166 -0
  46. data/ext/taglib/taglib-mswin32/include/taglib/mpegproperties.h +118 -0
  47. data/ext/taglib/taglib-mswin32/include/taglib/oggfile.h +112 -0
  48. data/ext/taglib/taglib-mswin32/include/taglib/oggflacfile.h +118 -0
  49. data/ext/taglib/taglib-mswin32/include/taglib/oggpage.h +203 -0
  50. data/ext/taglib/taglib-mswin32/include/taglib/oggpageheader.h +232 -0
  51. data/ext/taglib/taglib-mswin32/include/taglib/relativevolumeframe.h +274 -0
  52. data/ext/taglib/taglib-mswin32/include/taglib/speexfile.h +99 -0
  53. data/ext/taglib/taglib-mswin32/include/taglib/speexproperties.h +89 -0
  54. data/ext/taglib/taglib-mswin32/include/taglib/tag.h +173 -0
  55. data/ext/taglib/taglib-mswin32/include/taglib/tag_c.h +288 -0
  56. data/ext/taglib/taglib-mswin32/include/taglib/taglib.h +177 -0
  57. data/ext/taglib/taglib-mswin32/include/taglib/taglib_export.h +39 -0
  58. data/ext/taglib/taglib-mswin32/include/taglib/tbytevector.h +409 -0
  59. data/ext/taglib/taglib-mswin32/include/taglib/tbytevectorlist.h +91 -0
  60. data/ext/taglib/taglib-mswin32/include/taglib/textidentificationframe.h +258 -0
  61. data/ext/taglib/taglib-mswin32/include/taglib/tfile.h +271 -0
  62. data/ext/taglib/taglib-mswin32/include/taglib/tlist.h +252 -0
  63. data/ext/taglib/taglib-mswin32/include/taglib/tlist.tcc +316 -0
  64. data/ext/taglib/taglib-mswin32/include/taglib/tmap.h +200 -0
  65. data/ext/taglib/taglib-mswin32/include/taglib/tmap.tcc +196 -0
  66. data/ext/taglib/taglib-mswin32/include/taglib/trueaudiofile.h +180 -0
  67. data/ext/taglib/taglib-mswin32/include/taglib/trueaudioproperties.h +93 -0
  68. data/ext/taglib/taglib-mswin32/include/taglib/tstring.h +456 -0
  69. data/ext/taglib/taglib-mswin32/include/taglib/tstringlist.h +115 -0
  70. data/ext/taglib/taglib-mswin32/include/taglib/uniquefileidentifierframe.h +113 -0
  71. data/ext/taglib/taglib-mswin32/include/taglib/unknownframe.h +79 -0
  72. data/ext/taglib/taglib-mswin32/include/taglib/unsynchronizedlyricsframe.h +157 -0
  73. data/ext/taglib/taglib-mswin32/include/taglib/urllinkframe.h +172 -0
  74. data/ext/taglib/taglib-mswin32/include/taglib/vorbisfile.h +118 -0
  75. data/ext/taglib/taglib-mswin32/include/taglib/vorbisproperties.h +125 -0
  76. data/ext/taglib/taglib-mswin32/include/taglib/wavpackfile.h +164 -0
  77. data/ext/taglib/taglib-mswin32/include/taglib/wavpackproperties.h +94 -0
  78. data/ext/taglib/taglib-mswin32/include/taglib/xingheader.h +100 -0
  79. data/ext/taglib/taglib-mswin32/include/taglib/xiphcomment.h +202 -0
  80. data/ext/taglib/taglib-mswin32/lib/pkgconfig/taglib_c.pc +12 -0
  81. data/ext/taglib/taglib-mswin32/lib/tag.lib +0 -0
  82. data/ext/taglib/taglib-mswin32/lib/tag_c.lib +0 -0
  83. data/ext/taglib/taglib_i386-mingw32.source +22645 -0
  84. data/ext/taglib/taglib_i386-mswin32.source +22645 -0
  85. data/ext/taglib/{taglib.cxx → taglib_x86_64-linux.source} +508 -75
  86. data/lib/TagLib.rb +3 -2
  87. data/lib/TagLib_doc.rb +1532 -1526
  88. data/lib/rtaglib_mswin32.rb +4 -0
  89. data/lib/tagfile.rb +6 -0
  90. data/swig/Doxyfile +0 -0
  91. data/swig/Rakefile +44 -19
  92. data/swig/TagLib_doc.rb +2755 -0
  93. data/swig/make_doc.rb +5 -4
  94. data/swig/process_cxx.rb +2 -2
  95. data/swig/rake_ext_conf.rb +33 -0
  96. data/swig/taglib.i +8 -5
  97. data/swig/test.rb +47 -39
  98. data/test/test_read.rb +4 -3
  99. data/test/test_taglib.rb +47 -39
  100. data/test/test_write.rb +4 -3
  101. metadata +96 -20
  102. data/ext/tagfile/extconf.rb +0 -14
  103. data/ext/taglib/extconf.rb +0 -22
  104. data/swig/extconf.rb +0 -22
@@ -0,0 +1,166 @@
1
+ /***************************************************************************
2
+ copyright : (C) 2002 - 2008 by Scott Wheeler
3
+ email : wheeler@kde.org
4
+ ***************************************************************************/
5
+
6
+ /***************************************************************************
7
+ * This library is free software; you can redistribute it and/or modify *
8
+ * it under the terms of the GNU Lesser General Public License version *
9
+ * 2.1 as published by the Free Software Foundation. *
10
+ * *
11
+ * This library is distributed in the hope that it will be useful, but *
12
+ * WITHOUT ANY WARRANTY; without even the implied warranty of *
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14
+ * Lesser General Public License for more details. *
15
+ * *
16
+ * You should have received a copy of the GNU Lesser General Public *
17
+ * License along with this library; if not, write to the Free Software *
18
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
19
+ * USA *
20
+ * *
21
+ * Alternatively, this file is available under the Mozilla Public *
22
+ * License Version 1.1. You may obtain a copy of the License at *
23
+ * http://www.mozilla.org/MPL/ *
24
+ ***************************************************************************/
25
+
26
+ #ifndef TAGLIB_MPEGHEADER_H
27
+ #define TAGLIB_MPEGHEADER_H
28
+
29
+ #include "taglib_export.h"
30
+
31
+ namespace TagLib {
32
+
33
+ class ByteVector;
34
+
35
+ namespace MPEG {
36
+
37
+ //! An implementation of MP3 frame headers
38
+
39
+ /*!
40
+ * This is an implementation of MPEG Layer III headers. The API follows more
41
+ * or less the binary format of these headers. I've used
42
+ * <a href="http://www.mp3-tech.org/programmer/frame_header.html">this</a>
43
+ * document as a reference.
44
+ */
45
+
46
+ class TAGLIB_EXPORT Header
47
+ {
48
+ public:
49
+ /*!
50
+ * Parses an MPEG header based on \a data.
51
+ */
52
+ Header(const ByteVector &data);
53
+
54
+ /*!
55
+ * Does a shallow copy of \a h.
56
+ */
57
+ Header(const Header &h);
58
+
59
+ /*!
60
+ * Destroys this Header instance.
61
+ */
62
+ virtual ~Header();
63
+
64
+ /*!
65
+ * Returns true if the frame is at least an appropriate size and has
66
+ * legal values.
67
+ */
68
+ bool isValid() const;
69
+
70
+ /*!
71
+ * The MPEG Version.
72
+ */
73
+ enum Version {
74
+ //! MPEG Version 1
75
+ Version1 = 0,
76
+ //! MPEG Version 2
77
+ Version2 = 1,
78
+ //! MPEG Version 2.5
79
+ Version2_5 = 2
80
+ };
81
+
82
+ /*!
83
+ * Returns the MPEG Version of the header.
84
+ */
85
+ Version version() const;
86
+
87
+ /*!
88
+ * Returns the layer version. This will be between the values 1-3.
89
+ */
90
+ int layer() const;
91
+
92
+ /*!
93
+ * Returns true if the MPEG protection bit is enabled.
94
+ */
95
+ bool protectionEnabled() const;
96
+
97
+ /*!
98
+ * Returns the bitrate encoded in the header.
99
+ */
100
+ int bitrate() const;
101
+
102
+ /*!
103
+ * Returns the sample rate in Hz.
104
+ */
105
+ int sampleRate() const;
106
+
107
+ /*!
108
+ * Returns true if the frame is padded.
109
+ */
110
+ bool isPadded() const;
111
+
112
+ /*!
113
+ * There are a few combinations or one or two channel audio that are
114
+ * possible:
115
+ */
116
+ enum ChannelMode {
117
+ //! Stereo
118
+ Stereo = 0,
119
+ //! Stereo
120
+ JointStereo = 1,
121
+ //! Dual Mono
122
+ DualChannel = 2,
123
+ //! Mono
124
+ SingleChannel = 3
125
+ };
126
+
127
+ /*!
128
+ * Returns the channel mode for this frame.
129
+ */
130
+ ChannelMode channelMode() const;
131
+
132
+ /*!
133
+ * Returns true if the copyrighted bit is set.
134
+ */
135
+ bool isCopyrighted() const;
136
+
137
+ /*!
138
+ * Returns true if the "original" bit is set.
139
+ */
140
+ bool isOriginal() const;
141
+
142
+ /*!
143
+ * Returns the frame length.
144
+ */
145
+ int frameLength() const;
146
+
147
+ /*!
148
+ * Returns the number of frames per sample.
149
+ */
150
+ int samplesPerFrame() const;
151
+
152
+ /*!
153
+ * Makes a shallow copy of the header.
154
+ */
155
+ Header &operator=(const Header &h);
156
+
157
+ private:
158
+ void parse(const ByteVector &data);
159
+
160
+ class HeaderPrivate;
161
+ HeaderPrivate *d;
162
+ };
163
+ }
164
+ }
165
+
166
+ #endif
@@ -0,0 +1,118 @@
1
+ /***************************************************************************
2
+ copyright : (C) 2002 - 2008 by Scott Wheeler
3
+ email : wheeler@kde.org
4
+ ***************************************************************************/
5
+
6
+ /***************************************************************************
7
+ * This library is free software; you can redistribute it and/or modify *
8
+ * it under the terms of the GNU Lesser General Public License version *
9
+ * 2.1 as published by the Free Software Foundation. *
10
+ * *
11
+ * This library is distributed in the hope that it will be useful, but *
12
+ * WITHOUT ANY WARRANTY; without even the implied warranty of *
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14
+ * Lesser General Public License for more details. *
15
+ * *
16
+ * You should have received a copy of the GNU Lesser General Public *
17
+ * License along with this library; if not, write to the Free Software *
18
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
19
+ * USA *
20
+ * *
21
+ * Alternatively, this file is available under the Mozilla Public *
22
+ * License Version 1.1. You may obtain a copy of the License at *
23
+ * http://www.mozilla.org/MPL/ *
24
+ ***************************************************************************/
25
+
26
+ #ifndef TAGLIB_MPEGPROPERTIES_H
27
+ #define TAGLIB_MPEGPROPERTIES_H
28
+
29
+ #include "taglib_export.h"
30
+ #include "audioproperties.h"
31
+
32
+ #include "mpegheader.h"
33
+
34
+ namespace TagLib {
35
+
36
+ namespace MPEG {
37
+
38
+ class File;
39
+ class XingHeader;
40
+
41
+ //! An implementation of audio property reading for MP3
42
+
43
+ /*!
44
+ * This reads the data from an MPEG Layer III stream found in the
45
+ * AudioProperties API.
46
+ */
47
+
48
+ class TAGLIB_EXPORT Properties : public AudioProperties
49
+ {
50
+ public:
51
+ /*!
52
+ * Create an instance of MPEG::Properties with the data read from the
53
+ * MPEG::File \a file.
54
+ */
55
+ Properties(File *file, ReadStyle style = Average);
56
+
57
+ /*!
58
+ * Destroys this MPEG Properties instance.
59
+ */
60
+ virtual ~Properties();
61
+
62
+ // Reimplementations.
63
+
64
+ virtual int length() const;
65
+ virtual int bitrate() const;
66
+ virtual int sampleRate() const;
67
+ virtual int channels() const;
68
+
69
+ /*!
70
+ * Returns a pointer to the XingHeader if one exists or null if no
71
+ * XingHeader was found.
72
+ */
73
+
74
+ const XingHeader *xingHeader() const;
75
+
76
+ /*!
77
+ * Returns the MPEG Version of the file.
78
+ */
79
+ Header::Version version() const;
80
+
81
+ /*!
82
+ * Returns the layer version. This will be between the values 1-3.
83
+ */
84
+ int layer() const;
85
+
86
+ /*!
87
+ * Returns true if the MPEG protection bit is enabled.
88
+ */
89
+ bool protectionEnabled() const;
90
+
91
+ /*!
92
+ * Returns the channel mode for this frame.
93
+ */
94
+ Header::ChannelMode channelMode() const;
95
+
96
+ /*!
97
+ * Returns true if the copyrighted bit is set.
98
+ */
99
+ bool isCopyrighted() const;
100
+
101
+ /*!
102
+ * Returns true if the "original" bit is set.
103
+ */
104
+ bool isOriginal() const;
105
+
106
+ private:
107
+ Properties(const Properties &);
108
+ Properties &operator=(const Properties &);
109
+
110
+ void read();
111
+
112
+ class PropertiesPrivate;
113
+ PropertiesPrivate *d;
114
+ };
115
+ }
116
+ }
117
+
118
+ #endif
@@ -0,0 +1,112 @@
1
+ /***************************************************************************
2
+ copyright : (C) 2002 - 2008 by Scott Wheeler
3
+ email : wheeler@kde.org
4
+ ***************************************************************************/
5
+
6
+ /***************************************************************************
7
+ * This library is free software; you can redistribute it and/or modify *
8
+ * it under the terms of the GNU Lesser General Public License version *
9
+ * 2.1 as published by the Free Software Foundation. *
10
+ * *
11
+ * This library is distributed in the hope that it will be useful, but *
12
+ * WITHOUT ANY WARRANTY; without even the implied warranty of *
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14
+ * Lesser General Public License for more details. *
15
+ * *
16
+ * You should have received a copy of the GNU Lesser General Public *
17
+ * License along with this library; if not, write to the Free Software *
18
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
19
+ * USA *
20
+ * *
21
+ * Alternatively, this file is available under the Mozilla Public *
22
+ * License Version 1.1. You may obtain a copy of the License at *
23
+ * http://www.mozilla.org/MPL/ *
24
+ ***************************************************************************/
25
+
26
+ #include "taglib_export.h"
27
+ #include "tfile.h"
28
+ #include "tbytevectorlist.h"
29
+
30
+ #ifndef TAGLIB_OGGFILE_H
31
+ #define TAGLIB_OGGFILE_H
32
+
33
+ namespace TagLib {
34
+
35
+ //! A namespace for the classes used by Ogg-based metadata files
36
+
37
+ namespace Ogg {
38
+
39
+ class PageHeader;
40
+
41
+ //! An implementation of TagLib::File with some helpers for Ogg based formats
42
+
43
+ /*!
44
+ * This is an implementation of Ogg file page and packet rendering and is of
45
+ * use to Ogg based formats. While the API is small this handles the
46
+ * non-trivial details of breaking up an Ogg stream into packets and makes
47
+ * these available (via subclassing) to the codec meta data implementations.
48
+ */
49
+
50
+ class TAGLIB_EXPORT File : public TagLib::File
51
+ {
52
+ public:
53
+ virtual ~File();
54
+
55
+ /*!
56
+ * Returns the packet contents for the i-th packet (starting from zero)
57
+ * in the Ogg bitstream.
58
+ *
59
+ * \warning The requires reading at least the packet header for every page
60
+ * up to the requested page.
61
+ */
62
+ ByteVector packet(uint i);
63
+
64
+ /*!
65
+ * Sets the packet with index \a i to the value \a p.
66
+ */
67
+ void setPacket(uint i, const ByteVector &p);
68
+
69
+ /*!
70
+ * Returns a pointer to the PageHeader for the first page in the stream or
71
+ * null if the page could not be found.
72
+ */
73
+ const PageHeader *firstPageHeader();
74
+
75
+ /*!
76
+ * Returns a pointer to the PageHeader for the last page in the stream or
77
+ * null if the page could not be found.
78
+ */
79
+ const PageHeader *lastPageHeader();
80
+
81
+ virtual bool save();
82
+
83
+ protected:
84
+ /*!
85
+ * Contructs an Ogg file from \a file. If \a readProperties is true the
86
+ * file's audio properties will also be read using \a propertiesStyle. If
87
+ * false, \a propertiesStyle is ignored.
88
+ *
89
+ * \note This constructor is protected since Ogg::File shouldn't be
90
+ * instantiated directly but rather should be used through the codec
91
+ * specific subclasses.
92
+ */
93
+ File(FileName file);
94
+
95
+ private:
96
+ File(const File &);
97
+ File &operator=(const File &);
98
+
99
+ /*!
100
+ * Reads the next page and updates the internal "current page" pointer.
101
+ */
102
+ bool nextPage();
103
+ void writePageGroup(const List<int> &group);
104
+
105
+ class FilePrivate;
106
+ FilePrivate *d;
107
+ };
108
+
109
+ }
110
+ }
111
+
112
+ #endif
@@ -0,0 +1,118 @@
1
+ /***************************************************************************
2
+ copyright : (C) 2004 by Allan Sandfeld Jensen
3
+ email : kde@carewolf.org
4
+ ***************************************************************************/
5
+
6
+ /***************************************************************************
7
+ * This library is free software; you can redistribute it and/or modify *
8
+ * it under the terms of the GNU Lesser General Public License version *
9
+ * 2.1 as published by the Free Software Foundation. *
10
+ * *
11
+ * This library is distributed in the hope that it will be useful, but *
12
+ * WITHOUT ANY WARRANTY; without even the implied warranty of *
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14
+ * Lesser General Public License for more details. *
15
+ * *
16
+ * You should have received a copy of the GNU Lesser General Public *
17
+ * License along with this library; if not, write to the Free Software *
18
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
19
+ * USA *
20
+ * *
21
+ * Alternatively, this file is available under the Mozilla Public *
22
+ * License Version 1.1. You may obtain a copy of the License at *
23
+ * http://www.mozilla.org/MPL/ *
24
+ ***************************************************************************/
25
+
26
+ #ifndef TAGLIB_OGGFLACFILE_H
27
+ #define TAGLIB_OGGFLACFILE_H
28
+
29
+ #include "taglib_export.h"
30
+ #include "oggfile.h"
31
+ #include "xiphcomment.h"
32
+
33
+ #include "flacproperties.h"
34
+
35
+ namespace TagLib {
36
+
37
+ class Tag;
38
+
39
+ namespace Ogg {
40
+
41
+ //! An implementation of Ogg FLAC metadata
42
+
43
+ /*!
44
+ * This is implementation of FLAC metadata for Ogg FLAC files. For "pure"
45
+ * FLAC files look under the FLAC hiearchy.
46
+ *
47
+ * Unlike "pure" FLAC-files, Ogg FLAC only supports Xiph-comments,
48
+ * while the audio-properties are the same.
49
+ */
50
+ namespace FLAC {
51
+
52
+ using TagLib::FLAC::Properties;
53
+
54
+ //! An implementation of TagLib::File with Ogg/FLAC specific methods
55
+
56
+ /*!
57
+ * This implements and provides an interface for Ogg/FLAC files to the
58
+ * TagLib::Tag and TagLib::AudioProperties interfaces by way of implementing
59
+ * the abstract TagLib::File API as well as providing some additional
60
+ * information specific to Ogg FLAC files.
61
+ */
62
+
63
+ class TAGLIB_EXPORT File : public Ogg::File
64
+ {
65
+ public:
66
+ /*!
67
+ * Contructs an Ogg/FLAC file from \a file. If \a readProperties is true
68
+ * the file's audio properties will also be read using \a propertiesStyle.
69
+ * If false, \a propertiesStyle is ignored.
70
+ */
71
+ File(FileName file, bool readProperties = true,
72
+ Properties::ReadStyle propertiesStyle = Properties::Average);
73
+
74
+ /*!
75
+ * Destroys this instance of the File.
76
+ */
77
+ virtual ~File();
78
+
79
+ /*!
80
+ * Returns the Tag for this file. This will always be a XiphComment.
81
+ */
82
+ virtual XiphComment *tag() const;
83
+
84
+ /*!
85
+ * Returns the FLAC::Properties for this file. If no audio properties
86
+ * were read then this will return a null pointer.
87
+ */
88
+ virtual Properties *audioProperties() const;
89
+
90
+ /*!
91
+ * Save the file. This will primarily save and update the XiphComment.
92
+ * Returns true if the save is successful.
93
+ */
94
+ virtual bool save();
95
+
96
+ /*!
97
+ * Returns the length of the audio-stream, used by FLAC::Properties for
98
+ * calculating the bitrate.
99
+ */
100
+ long streamLength();
101
+
102
+ private:
103
+ File(const File &);
104
+ File &operator=(const File &);
105
+
106
+ void read(bool readProperties, Properties::ReadStyle propertiesStyle);
107
+ void scan();
108
+ ByteVector streamInfoData();
109
+ ByteVector xiphCommentData();
110
+
111
+ class FilePrivate;
112
+ FilePrivate *d;
113
+ };
114
+ } // namespace FLAC
115
+ } // namespace Ogg
116
+ } // namespace TagLib
117
+
118
+ #endif