mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Merge branch 'master' of https://github.com/taglib/taglib
This commit is contained in:
commit
a50886c3c7
@ -79,7 +79,7 @@ namespace TagLib {
|
||||
|
||||
/*!
|
||||
* Returns the MD5 signature of the uncompressed audio stream as read
|
||||
* from the stream info header header.
|
||||
* from the stream info header header.
|
||||
*/
|
||||
ByteVector signature() const;
|
||||
|
||||
|
@ -136,7 +136,7 @@ void AttachedPictureFrame::parseFields(const ByteVector &data)
|
||||
int pos = 1;
|
||||
|
||||
d->mimeType = readStringField(data, String::Latin1, &pos);
|
||||
/* Now we need at least two more bytes available */
|
||||
/* Now we need at least two more bytes available */
|
||||
if (uint(pos) + 1 >= data.size()) {
|
||||
debug("Truncated picture frame.");
|
||||
return;
|
||||
|
@ -185,13 +185,13 @@ Frame *FrameFactory::createFrame(const ByteVector &origData, Header *tagHeader)
|
||||
|
||||
// ID3v2.2 Attached Picture
|
||||
|
||||
if(frameID == "PIC") {
|
||||
if(frameID == "PIC") {
|
||||
AttachedPictureFrame *f = new AttachedPictureFrameV22(data, header);
|
||||
d->setTextEncoding(f);
|
||||
return f;
|
||||
}
|
||||
|
||||
// Relative Volume Adjustment (frames 4.11)
|
||||
// Relative Volume Adjustment (frames 4.11)
|
||||
|
||||
if(frameID == "RVA2")
|
||||
return new RelativeVolumeFrame(data, header);
|
||||
|
@ -201,7 +201,7 @@ bool MPEG::File::save(int tags, bool stripOthers, int id3v2Version)
|
||||
// APE tag location has changed, update if it exists
|
||||
|
||||
if(APETag())
|
||||
findAPE();
|
||||
findAPE();
|
||||
}
|
||||
else if(stripOthers)
|
||||
success = strip(ID3v2, false) && success;
|
||||
@ -239,9 +239,10 @@ bool MPEG::File::save(int tags, bool stripOthers, int id3v2Version)
|
||||
else {
|
||||
seek(0, End);
|
||||
d->APELocation = tell();
|
||||
d->APEFooterLocation = d->APELocation
|
||||
+ d->tag.access<APE::Tag>(APEIndex, false)->footer()->completeTagSize()
|
||||
- APE::Footer::size();
|
||||
APE::Tag *apeTag = d->tag.access<APE::Tag>(APEIndex, false);
|
||||
d->APEFooterLocation = d->APELocation
|
||||
+ apeTag->footer()->completeTagSize()
|
||||
- APE::Footer::size();
|
||||
writeBlock(APETag()->render());
|
||||
d->APEOriginalSize = APETag()->footer()->completeTagSize();
|
||||
d->hasAPE = true;
|
||||
@ -587,7 +588,7 @@ void MPEG::File::findAPE()
|
||||
seek(d->APEFooterLocation);
|
||||
APE::Footer footer(readBlock(APE::Footer::size()));
|
||||
d->APELocation = d->APEFooterLocation - footer.completeTagSize()
|
||||
+ APE::Footer::size();
|
||||
+ APE::Footer::size();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ void Ogg::XiphComment::parse(const ByteVector &data)
|
||||
// The first thing in the comment data is the vendor ID length, followed by a
|
||||
// UTF8 string with the vendor ID.
|
||||
|
||||
int pos = 0;
|
||||
uint pos = 0;
|
||||
|
||||
int vendorLength = data.mid(0, 4).toUInt(false);
|
||||
pos += 4;
|
||||
|
@ -44,7 +44,7 @@ static double ConvertFromIeeeExtended(unsigned char *bytes)
|
||||
double f;
|
||||
int expon;
|
||||
unsigned long hiMant, loMant;
|
||||
|
||||
|
||||
expon = ((bytes[0] & 0x7F) << 8) | (bytes[1] & 0xFF);
|
||||
|
||||
hiMant = ((unsigned long)(bytes[2] & 0xFF) << 24) |
|
||||
@ -141,7 +141,7 @@ int RIFF::AIFF::Properties::sampleWidth() const
|
||||
|
||||
uint RIFF::AIFF::Properties::sampleFrames() const
|
||||
{
|
||||
return d->sampleFrames;
|
||||
return d->sampleFrames;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -46,35 +46,35 @@ namespace TagLib {
|
||||
class TAGLIB_EXPORT Properties : public AudioProperties
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Create an instance of AIFF::Properties with the data read from the
|
||||
* ByteVector \a data.
|
||||
*/
|
||||
Properties(const ByteVector &data, ReadStyle style);
|
||||
/*!
|
||||
* Create an instance of AIFF::Properties with the data read from the
|
||||
* ByteVector \a data.
|
||||
*/
|
||||
Properties(const ByteVector &data, ReadStyle style);
|
||||
|
||||
/*!
|
||||
* Destroys this AIFF::Properties instance.
|
||||
*/
|
||||
virtual ~Properties();
|
||||
/*!
|
||||
* Destroys this AIFF::Properties instance.
|
||||
*/
|
||||
virtual ~Properties();
|
||||
|
||||
// Reimplementations.
|
||||
// Reimplementations.
|
||||
|
||||
virtual int length() const;
|
||||
virtual int bitrate() const;
|
||||
virtual int sampleRate() const;
|
||||
virtual int channels() const;
|
||||
virtual int length() const;
|
||||
virtual int bitrate() const;
|
||||
virtual int sampleRate() const;
|
||||
virtual int channels() const;
|
||||
|
||||
int sampleWidth() const;
|
||||
uint sampleFrames() const;
|
||||
int sampleWidth() const;
|
||||
uint sampleFrames() const;
|
||||
|
||||
private:
|
||||
Properties(const Properties &);
|
||||
Properties &operator=(const Properties &);
|
||||
Properties(const Properties &);
|
||||
Properties &operator=(const Properties &);
|
||||
|
||||
void read(const ByteVector &data);
|
||||
void read(const ByteVector &data);
|
||||
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ int RIFF::WAV::Properties::sampleWidth() const
|
||||
|
||||
uint RIFF::WAV::Properties::sampleFrames() const
|
||||
{
|
||||
return d->sampleFrames;
|
||||
return d->sampleFrames;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -49,41 +49,41 @@ namespace TagLib {
|
||||
class TAGLIB_EXPORT Properties : public AudioProperties
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Create an instance of WAV::Properties with the data read from the
|
||||
* ByteVector \a data.
|
||||
*/
|
||||
Properties(const ByteVector &data, ReadStyle style);
|
||||
/*!
|
||||
* Create an instance of WAV::Properties with the data read from the
|
||||
* ByteVector \a data.
|
||||
*/
|
||||
Properties(const ByteVector &data, ReadStyle style);
|
||||
|
||||
/*!
|
||||
* Create an instance of WAV::Properties with the data read from the
|
||||
* ByteVector \a data and the length calculated using \a streamLength.
|
||||
*/
|
||||
Properties(const ByteVector &data, uint streamLength, ReadStyle style);
|
||||
/*!
|
||||
* Create an instance of WAV::Properties with the data read from the
|
||||
* ByteVector \a data and the length calculated using \a streamLength.
|
||||
*/
|
||||
Properties(const ByteVector &data, uint streamLength, ReadStyle style);
|
||||
|
||||
/*!
|
||||
* Destroys this WAV::Properties instance.
|
||||
*/
|
||||
virtual ~Properties();
|
||||
/*!
|
||||
* Destroys this WAV::Properties instance.
|
||||
*/
|
||||
virtual ~Properties();
|
||||
|
||||
// Reimplementations.
|
||||
// Reimplementations.
|
||||
|
||||
virtual int length() const;
|
||||
virtual int bitrate() const;
|
||||
virtual int sampleRate() const;
|
||||
virtual int channels() const;
|
||||
virtual int length() const;
|
||||
virtual int bitrate() const;
|
||||
virtual int sampleRate() const;
|
||||
virtual int channels() const;
|
||||
|
||||
int sampleWidth() const;
|
||||
uint sampleFrames() const;
|
||||
int sampleWidth() const;
|
||||
uint sampleFrames() const;
|
||||
|
||||
private:
|
||||
Properties(const Properties &);
|
||||
Properties &operator=(const Properties &);
|
||||
Properties(const Properties &);
|
||||
Properties &operator=(const Properties &);
|
||||
|
||||
void read(const ByteVector &data);
|
||||
void read(const ByteVector &data);
|
||||
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -397,8 +397,8 @@ namespace TagLib {
|
||||
static ByteVector null;
|
||||
|
||||
/*!
|
||||
* Returns a hex-encoded copy of the byte vector.
|
||||
*/
|
||||
* Returns a hex-encoded copy of the byte vector.
|
||||
*/
|
||||
ByteVector toHex() const;
|
||||
|
||||
protected:
|
||||
|
@ -100,7 +100,7 @@ FileStream::FileStreamPrivate::FileStreamPrivate(FileName fileName, bool openRea
|
||||
readOnly = false;
|
||||
else
|
||||
file = _wfopen(name, L"rb");
|
||||
}
|
||||
}
|
||||
|
||||
if(file)
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user