From 6f3480a1b3ff34c6ec478f4ef42cb43dbb2f42a9 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 7 Apr 2004 14:07:53 +0000 Subject: [PATCH] Restore public API from last commit git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@301962 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- flac/flacfile.h | 9 +++++++-- flac/flacproperties.cpp | 6 ++++++ flac/flacproperties.h | 7 ++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/flac/flacfile.h b/flac/flacfile.h index 71a12f0b..56e506e0 100644 --- a/flac/flacfile.h +++ b/flac/flacfile.h @@ -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; diff --git a/flac/flacproperties.cpp b/flac/flacproperties.cpp index b4dfb3f3..81d82a34 100644 --- a/flac/flacproperties.cpp +++ b/flac/flacproperties.cpp @@ -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; diff --git a/flac/flacproperties.h b/flac/flacproperties.h index 1a8ec7a1..5eaefc25 100644 --- a/flac/flacproperties.h +++ b/flac/flacproperties.h @@ -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. */