Restore public API from last commit

git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@301962 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
Allan Sandfeld Jensen 2004-04-07 14:07:53 +00:00
parent 1bbbfc2c6b
commit 6f3480a1b3
3 changed files with 19 additions and 3 deletions

View 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;

View 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;

View 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.
*/