]> granicus.if.org Git - taglib/commitdiff
Restore public API from last commit
authorAllan Sandfeld Jensen <kde@carewolf.com>
Wed, 7 Apr 2004 14:07:53 +0000 (14:07 +0000)
committerAllan Sandfeld Jensen <kde@carewolf.com>
Wed, 7 Apr 2004 14:07:53 +0000 (14:07 +0000)
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@301962 283d02a7-25f6-0310-bc7c-ecb5cbfe19da

flac/flacfile.h
flac/flacproperties.cpp
flac/flacproperties.h

index 71a12f0b1c2fc1c6749dac4efcb3b555cd9421c7..56e506e0f86375ccbe129f3aac7fe9401407babb 100644 (file)
@@ -97,11 +97,17 @@ namespace TagLib {
        */
       void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
 
+      /*!
+       * Returns the block of data used by FLAC::Properties for parsing the
+       * stream properties.
+       */
+      ByteVector streamInfoData(); // BIC: remove
+
       /*!
        * Returns the length of the audio-stream, used by FLAC::Properties for
        * calculating the bitrate.
        */
-      long streamLength();
+      long streamLength();  // BIC: remove
 
     private:
       File(const File &);
@@ -111,7 +117,6 @@ namespace TagLib {
       void scan();
       long findID3v2();
       long findID3v1();
-      ByteVector streamInfoData();
       ByteVector xiphCommentData();
 
       class FilePrivate;
index b4dfb3f33041b0c22a864b63e9d061275d53e902..81d82a34d7f5bf0747fca654f76374d3205c43fd 100644 (file)
@@ -60,6 +60,12 @@ FLAC::Properties::Properties(ByteVector data, long streamLength, ReadStyle style
   read();
 }
 
+FLAC::Properties::Properties(File *file, ReadStyle style) : AudioProperties(style)
+{
+  d = new PropertiesPrivate(file->streamInfoData(), file->streamLength(), style);
+  read();
+}      
+
 FLAC::Properties::~Properties()
 {
   delete d;
index 1a8ec7a1d1ef212af6a3540c61cf70e35ae8629d..5eaefc2553c4e89f67a95b58d2636931f813a571 100644 (file)
@@ -43,10 +43,15 @@ namespace TagLib {
       /*!
        * Create an instance of FLAC::Properties with the data read from the
        * ByteVector \a data.
-       * BIC: API changed since last stable release
        */
       Properties(ByteVector data, long streamLength, ReadStyle style = Average);
 
+      /*!
+       * Create an instance of FLAC::Properties with the data read from the
+       * FLAC::File \a file.
+       */
+      Properties(File *file, ReadStyle style = Average); // BIC: remove
+
       /*!
        * Destroys this FLAC::Properties instance.
        */