[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesupport/taglib
From: Scott Wheeler <wheeler () kde ! org>
Date: 2004-04-10 15:50:17
Message-ID: 20040410155017.5D24990F4 () office ! kde ! org
[Download RAW message or body]
CVS commit by wheeler:
Fix the same bug that I fixed in MPEG last week -- allow the lib user to
specify the ID3v2FrameFactory in the FLAC::File construstor.
M +11 -1 flac/flacfile.cpp 1.8
M +14 -1 flac/flacfile.h 1.8
M +1 -1 mpeg/mpegfile.cpp 1.41
--- kdesupport/taglib/flac/flacfile.cpp #1.7:1.8
@@ -89,7 +89,17 @@ public:
FLAC::File::File(const char *file, bool readProperties,
- Properties::ReadStyle propertiesStyle) : TagLib::File(file)
+ Properties::ReadStyle propertiesStyle) :
+ TagLib::File(file)
+{
+ d = new FilePrivate;
+ read(readProperties, propertiesStyle);
+}
+
+FLAC::File::File(const char *file, ID3v2::FrameFactory *frameFactory,
+ bool readProperties, Properties::ReadStyle propertiesStyle) :
+ TagLib::File(file)
{
d = new FilePrivate;
+ d->ID3v2FrameFactory = frameFactory;
read(readProperties, propertiesStyle);
}
--- kdesupport/taglib/flac/flacfile.h #1.7:1.8
@@ -58,5 +58,5 @@ namespace TagLib {
public:
/*!
- * Contructs an FLAC file from \a file. If \a readProperties is true the
+ * Contructs a FLAC file from \a file. If \a readProperties is true the
* file's audio properties will also be read using \a propertiesStyle. If
* false, \a propertiesStyle is ignored.
@@ -66,4 +66,17 @@ namespace TagLib {
/*!
+ * Contructs a FLAC file from \a file. If \a readProperties is true the
+ * file's audio properties will also be read using \a propertiesStyle. If
+ * false, \a propertiesStyle is ignored.
+ *
+ * If this file contains and ID3v2 tag the frames will be created using
+ * \a frameFactory.
+ */
+ // BIC: merge with the above constructor
+ File(const char *file, ID3v2::FrameFactory *frameFactory,
+ bool readProperties = true,
+ Properties::ReadStyle propertiesStyle = Properties::Average);
+
+ /*!
* Destroys this instance of the File.
*/
--- kdesupport/taglib/mpeg/mpegfile.cpp #1.40:1.41
@@ -316,5 +316,5 @@ ID3v2::Tag *MPEG::File::ID3v2Tag(bool cr
// no ID3v2 tag exists and we've been asked to create one
- d->ID3v2Tag = new ID3v2::Tag();
+ d->ID3v2Tag = new ID3v2::Tag;
return d->ID3v2Tag;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic