Add support for taglib 2

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 2eda7f08c6)
r14.1.x r14.1.2
Michele Calgaro 7 months ago
parent 18bdfb200c
commit f2bd39a3d6
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -23,9 +23,11 @@
#include "asfattribute.h" #include "asfattribute.h"
#include "asffile.h" #include "asffile.h"
#include "tqshared.h"
using namespace TagLib; using namespace TagLib;
class ASF::Attribute::AttributePrivate : public RefCounter class ASF::Attribute::AttributePrivate : public TQShared
{ {
public: public:
AttributePrivate() AttributePrivate()

@ -252,7 +252,7 @@ ASF::File::ExtendedContentDescriptionObject::render(ASF::File *file)
{ {
data.clear(); data.clear();
data.append(ByteVector::fromShort(attributeData.size(), false)); data.append(ByteVector::fromShort(attributeData.size(), false));
data.append(attributeData.toByteVector(ByteVector::null)); data.append(attributeData.toByteVector(ByteVector()));
return BaseObject::render(file); return BaseObject::render(file);
} }
@ -279,7 +279,7 @@ ASF::File::MetadataObject::render(ASF::File *file)
{ {
data.clear(); data.clear();
data.append(ByteVector::fromShort(attributeData.size(), false)); data.append(ByteVector::fromShort(attributeData.size(), false));
data.append(attributeData.toByteVector(ByteVector::null)); data.append(attributeData.toByteVector(ByteVector()));
return BaseObject::render(file); return BaseObject::render(file);
} }
@ -306,7 +306,7 @@ ASF::File::MetadataLibraryObject::render(ASF::File *file)
{ {
data.clear(); data.clear();
data.append(ByteVector::fromShort(attributeData.size(), false)); data.append(ByteVector::fromShort(attributeData.size(), false));
data.append(attributeData.toByteVector(ByteVector::null)); data.append(attributeData.toByteVector(ByteVector()));
return BaseObject::render(file); return BaseObject::render(file);
} }

@ -63,7 +63,7 @@ ASF::Tag::album() const
{ {
if(d->attributeListMap.contains("WM/AlbumTitle")) if(d->attributeListMap.contains("WM/AlbumTitle"))
return d->attributeListMap["WM/AlbumTitle"][0].toString(); return d->attributeListMap["WM/AlbumTitle"][0].toString();
return String::null; return String();
} }
String String
@ -107,7 +107,7 @@ ASF::Tag::genre() const
{ {
if(d->attributeListMap.contains("WM/Genre")) if(d->attributeListMap.contains("WM/Genre"))
return d->attributeListMap["WM/Genre"][0].toString(); return d->attributeListMap["WM/Genre"][0].toString();
return String::null; return String();
} }
void void

@ -56,7 +56,7 @@ namespace TagLib {
/*! /*!
* Returns the album name; if no album name is present in the tag * Returns the album name; if no album name is present in the tag
* String::null will be returned. * a null String will be returned.
*/ */
virtual String album() const; virtual String album() const;
@ -66,7 +66,7 @@ namespace TagLib {
virtual String comment() const; virtual String comment() const;
/*! /*!
* Returns the genre name; if no genre is present in the tag String::null * Returns the genre name; if no genre is present in the tag a null String
* will be returned. * will be returned.
*/ */
virtual String genre() const; virtual String genre() const;
@ -77,7 +77,7 @@ namespace TagLib {
virtual String rating() const; virtual String rating() const;
/*! /*!
* Returns the genre name; if no genre is present in the tag String::null * Returns the genre name; if no genre is present in the tag a null String
* will be returned. * will be returned.
*/ */
virtual String copyright() const; virtual String copyright() const;
@ -104,7 +104,7 @@ namespace TagLib {
virtual void setArtist(const String &s); virtual void setArtist(const String &s);
/*! /*!
* Sets the album to \a s. If \a s is String::null then this value will be * Sets the album to \a s. If \a s is a null String then this value will be
* cleared. * cleared.
*/ */
virtual void setAlbum(const String &s); virtual void setAlbum(const String &s);

@ -36,11 +36,11 @@
using namespace TagLib; using namespace TagLib;
Audible::Tag::Tag() : TagLib::Tag::Tag() { Audible::Tag::Tag() : TagLib::Tag::Tag() {
m_title = String::null; m_title = String();
m_artist = String::null; m_artist = String();
m_album = String::null; m_album = String();
m_comment = String::null; m_comment = String();
m_genre = String::null; m_genre = String();
m_year = 0; m_year = 0;
m_track = 0; m_track = 0;
m_userID = 0; m_userID = 0;
@ -51,11 +51,11 @@ Audible::Tag::~Tag() {
} }
bool Audible::Tag::isEmpty() const { bool Audible::Tag::isEmpty() const {
return m_title == String::null && return m_title.isEmpty() &&
m_artist == String::null && m_artist.isEmpty() &&
m_album == String::null && m_album.isEmpty() &&
m_comment == String::null && m_comment.isEmpty() &&
m_genre == String::null && m_genre.isEmpty() &&
m_year == 0 && m_year == 0 &&
m_track == 0 && m_track == 0 &&
m_userID == 0; m_userID == 0;
@ -106,7 +106,7 @@ void Audible::Tag::readTags( FILE *fp )
} }
else if(!strcmp(name, "description")) else if(!strcmp(name, "description"))
{ {
if( m_comment.isNull() ) if( m_comment.isEmpty() )
m_comment = String(value, String::Latin1); m_comment = String(value, String::Latin1);
} }
else if(!strcmp(name, "pubdate")) else if(!strcmp(name, "pubdate"))

@ -54,30 +54,30 @@ namespace TagLib {
/*! /*!
* Returns the track name; if no track name is present in the tag * Returns the track name; if no track name is present in the tag
* String::null will be returned. * a null String will be returned.
*/ */
virtual String title() const { return m_title; } virtual String title() const { return m_title; }
/*! /*!
* Returns the artist name; if no artist name is present in the tag * Returns the artist name; if no artist name is present in the tag
* String::null will be returned. * a null String will be returned.
*/ */
virtual String artist() const { return m_artist; } virtual String artist() const { return m_artist; }
/*! /*!
* Returns the album name; if no album name is present in the tag * Returns the album name; if no album name is present in the tag
* String::null will be returned. * a null String will be returned.
*/ */
virtual String album() const { return m_album; } virtual String album() const { return m_album; }
/*! /*!
* Returns the track comment; if no comment is present in the tag * Returns the track comment; if no comment is present in the tag
* String::null will be returned. * a null String will be returned.
*/ */
virtual String comment() const { return m_comment; } virtual String comment() const { return m_comment; }
/*! /*!
* Returns the genre name; if no genre is present in the tag String::null * Returns the genre name; if no genre is present in the tag a null String
* will be returned. * will be returned.
*/ */
virtual String genre() const { return m_genre; } virtual String genre() const { return m_genre; }
@ -99,31 +99,31 @@ namespace TagLib {
virtual uint userID() const { return m_userID; } virtual uint userID() const { return m_userID; }
/*! /*!
* Sets the title to \a s. If \a s is String::null then this value will be * Sets the title to \a s. If \a s is a null String then this value will be
* cleared. * cleared.
*/ */
virtual void setTitle(const String &s) { m_title = s; } virtual void setTitle(const String &s) { m_title = s; }
/*! /*!
* Sets the artist to \a s. If \a s is String::null then this value will be * Sets the artist to \a s. If \a s is a null String then this value will be
* cleared. * cleared.
*/ */
virtual void setArtist(const String &s) { m_artist = s; } virtual void setArtist(const String &s) { m_artist = s; }
/*! /*!
* Sets the album to \a s. If \a s is String::null then this value will be * Sets the album to \a s. If \a s is a null String then this value will be
* cleared. * cleared.
*/ */
virtual void setAlbum(const String &s) { m_album = s; } virtual void setAlbum(const String &s) { m_album = s; }
/*! /*!
* Sets the album to \a s. If \a s is String::null then this value will be * Sets the album to \a s. If \a s is a null String then this value will be
* cleared. * cleared.
*/ */
virtual void setComment(const String &s) { m_comment = s; } virtual void setComment(const String &s) { m_comment = s; }
/*! /*!
* Sets the genre to \a s. If \a s is String::null then this value will be * Sets the genre to \a s. If \a s is a null String then this value will be
* cleared. For tag formats that use a fixed set of genres, the appropriate * cleared. For tag formats that use a fixed set of genres, the appropriate
* value will be selected based on a string comparison. A list of available * value will be selected based on a string comparison. A list of available
* genres for those formats should be available in that type's * genres for those formats should be available in that type's

@ -55,7 +55,7 @@ void MP4::ITunesAlbBox::parse()
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
// parse data box // parse data box
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
if(mp4file->readSizeAndType( size, fourcc ) == true) if(mp4file->readSizeAndType( size, fourcc ) == true)

@ -55,7 +55,7 @@ void MP4::ITunesArtBox::parse()
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
// parse data box // parse data box
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
if(mp4file->readSizeAndType( size, fourcc ) == true) if(mp4file->readSizeAndType( size, fourcc ) == true)

@ -55,7 +55,7 @@ void MP4::ITunesCmtBox::parse()
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
// parse data box // parse data box
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
if(mp4file->readSizeAndType( size, fourcc ) == true) if(mp4file->readSizeAndType( size, fourcc ) == true)

@ -55,7 +55,7 @@ void MP4::ITunesCvrBox::parse()
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
// parse data box // parse data box
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
if(mp4file->readSizeAndType( size, fourcc ) == true) if(mp4file->readSizeAndType( size, fourcc ) == true)

@ -55,7 +55,7 @@ void MP4::ITunesDayBox::parse()
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
// parse data box // parse data box
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
if(mp4file->readSizeAndType( size, fourcc ) == true) if(mp4file->readSizeAndType( size, fourcc ) == true)

@ -55,7 +55,7 @@ void MP4::ITunesDiskBox::parse()
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
// parse data box // parse data box
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
if(mp4file->readSizeAndType( size, fourcc ) == true) if(mp4file->readSizeAndType( size, fourcc ) == true)

@ -55,7 +55,7 @@ void MP4::ITunesGenBox::parse()
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
// parse data box // parse data box
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
if(mp4file->readSizeAndType( size, fourcc ) == true) if(mp4file->readSizeAndType( size, fourcc ) == true)

@ -55,7 +55,7 @@ void MP4::ITunesGrpBox::parse()
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
// parse data box // parse data box
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
if(mp4file->readSizeAndType( size, fourcc ) == true) if(mp4file->readSizeAndType( size, fourcc ) == true)

@ -55,7 +55,7 @@ void MP4::ITunesNamBox::parse()
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
// parse data box // parse data box
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
if(mp4file->readSizeAndType( size, fourcc ) == true) if(mp4file->readSizeAndType( size, fourcc ) == true)

@ -55,7 +55,7 @@ void MP4::ITunesTmpoBox::parse()
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
// parse data box // parse data box
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
if(mp4file->readSizeAndType( size, fourcc ) == true) if(mp4file->readSizeAndType( size, fourcc ) == true)

@ -55,7 +55,7 @@ void MP4::ITunesTrknBox::parse()
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
// parse data box // parse data box
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
if(mp4file->readSizeAndType( size, fourcc ) == true) if(mp4file->readSizeAndType( size, fourcc ) == true)

@ -55,7 +55,7 @@ void MP4::ITunesWrtBox::parse()
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
// parse data box // parse data box
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
if(mp4file->readSizeAndType( size, fourcc ) == true) if(mp4file->readSizeAndType( size, fourcc ) == true)

@ -30,9 +30,9 @@ using namespace TagLib;
class MP4::Mp4AudioSampleEntry::Mp4AudioSampleEntryPrivate class MP4::Mp4AudioSampleEntry::Mp4AudioSampleEntryPrivate
{ {
public: public:
TagLib::uint channelcount; uint channelcount;
TagLib::uint samplerate; uint samplerate;
TagLib::uint bitrate; uint bitrate;
}; };
MP4::Mp4AudioSampleEntry::Mp4AudioSampleEntry( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ) MP4::Mp4AudioSampleEntry::Mp4AudioSampleEntry( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset )
@ -46,17 +46,17 @@ MP4::Mp4AudioSampleEntry::~Mp4AudioSampleEntry()
delete d; delete d;
} }
TagLib::uint MP4::Mp4AudioSampleEntry::channels() const uint MP4::Mp4AudioSampleEntry::channels() const
{ {
return d->channelcount; return d->channelcount;
} }
TagLib::uint MP4::Mp4AudioSampleEntry::samplerate() const uint MP4::Mp4AudioSampleEntry::samplerate() const
{ {
return d->samplerate; return d->samplerate;
} }
TagLib::uint MP4::Mp4AudioSampleEntry::bitrate() const uint MP4::Mp4AudioSampleEntry::bitrate() const
{ {
return d->bitrate; return d->bitrate;
} }
@ -88,7 +88,7 @@ void MP4::Mp4AudioSampleEntry::parseEntry()
(fourcc() == MP4::Fourcc("drms")) ) (fourcc() == MP4::Fourcc("drms")) )
{ {
TagLib::MP4::Fourcc fourcc; TagLib::MP4::Fourcc fourcc;
TagLib::uint esds_size; uint esds_size;
if (!mp4file->readSizeAndType( esds_size, fourcc )) if (!mp4file->readSizeAndType( esds_size, fourcc ))
return; return;
@ -104,8 +104,8 @@ void MP4::Mp4AudioSampleEntry::parseEntry()
// upcoming byte must be ESDescrTag (0x03) // upcoming byte must be ESDescrTag (0x03)
if( EsDescrTag[0] == 0x03 ) if( EsDescrTag[0] == 0x03 )
{ {
TagLib::uint descr_len = mp4file->readSystemsLen(); uint descr_len = mp4file->readSystemsLen();
TagLib::uint EsId; uint EsId;
if( !mp4file->readShort( EsId ) ) if( !mp4file->readShort( EsId ) )
return; return;
ByteVector priority = mp4file->readBlock(1); ByteVector priority = mp4file->readBlock(1);
@ -114,7 +114,7 @@ void MP4::Mp4AudioSampleEntry::parseEntry()
} }
else else
{ {
TagLib::uint EsId; uint EsId;
if( !mp4file->readShort( EsId ) ) if( !mp4file->readShort( EsId ) )
return; return;
} }
@ -123,7 +123,7 @@ void MP4::Mp4AudioSampleEntry::parseEntry()
if( DecCfgTag[0] != 0x04 ) if( DecCfgTag[0] != 0x04 )
return; return;
// read decoder configuration length // read decoder configuration length
// TagLib::uint deccfg_len = mp4file->readSystemsLen(); // uint deccfg_len = mp4file->readSystemsLen();
// read object type Id // read object type Id
ByteVector objId = mp4file->readBlock(1); ByteVector objId = mp4file->readBlock(1);
// read stream type id // read stream type id
@ -131,7 +131,7 @@ void MP4::Mp4AudioSampleEntry::parseEntry()
// read buffer Size DB // read buffer Size DB
ByteVector bufferSizeDB = mp4file->readBlock(3); ByteVector bufferSizeDB = mp4file->readBlock(3);
// read max bitrate // read max bitrate
TagLib::uint max_bitrate; uint max_bitrate;
if( !mp4file->readInt( max_bitrate ) ) if( !mp4file->readInt( max_bitrate ) )
return; return;
// read average bitrate // read average bitrate

@ -36,11 +36,11 @@ namespace TagLib
~Mp4AudioSampleEntry(); ~Mp4AudioSampleEntry();
//! function to get the number of channels //! function to get the number of channels
TagLib::uint channels() const; uint channels() const;
//! function to get the sample rate //! function to get the sample rate
TagLib::uint samplerate() const; uint samplerate() const;
//! function to get the average bitrate of the audio stream //! function to get the average bitrate of the audio stream
TagLib::uint bitrate() const; uint bitrate() const;
private: private:
//! parse the content of the box //! parse the content of the box

@ -63,7 +63,7 @@ MP4::File::File(const char *file, bool , AudioProperties::ReadStyle )
d->isValid = false; d->isValid = false;
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
while( readSizeAndType( size, fourcc ) == true ) while( readSizeAndType( size, fourcc ) == true )
@ -126,17 +126,17 @@ void MP4::File::remove()
{ {
} }
TagLib::uint MP4::File::readSystemsLen() uint MP4::File::readSystemsLen()
{ {
TagLib::uint length = 0; uint length = 0;
TagLib::uint nbytes = 0; uint nbytes = 0;
ByteVector input; ByteVector input;
TagLib::uchar tmp_input; uchar tmp_input;
do do
{ {
input = readBlock(1); input = readBlock(1);
tmp_input = static_cast<TagLib::uchar>(input[0]); tmp_input = static_cast<uchar>(input[0]);
nbytes++; nbytes++;
length = (length<<7) | (tmp_input&0x7F); length = (length<<7) | (tmp_input&0x7F);
} while( (tmp_input&0x80) && (nbytes<4) ); } while( (tmp_input&0x80) && (nbytes<4) );
@ -144,7 +144,7 @@ TagLib::uint MP4::File::readSystemsLen()
return length; return length;
} }
bool MP4::File::readSizeAndType( TagLib::uint& size, MP4::Fourcc& fourcc ) bool MP4::File::readSizeAndType( uint& size, MP4::Fourcc& fourcc )
{ {
// read the two blocks from file // read the two blocks from file
ByteVector readsize = readBlock(4); ByteVector readsize = readBlock(4);
@ -169,7 +169,7 @@ bool MP4::File::readSizeAndType( TagLib::uint& size, MP4::Fourcc& fourcc )
return true; return true;
} }
bool MP4::File::readInt( TagLib::uint& toRead ) bool MP4::File::readInt( uint& toRead )
{ {
ByteVector readbuffer = readBlock(4); ByteVector readbuffer = readBlock(4);
if( readbuffer.size() != 4 ) if( readbuffer.size() != 4 )
@ -182,7 +182,7 @@ bool MP4::File::readInt( TagLib::uint& toRead )
return true; return true;
} }
bool MP4::File::readShort( TagLib::uint& toRead ) bool MP4::File::readShort( uint& toRead )
{ {
ByteVector readbuffer = readBlock(2); ByteVector readbuffer = readBlock(2);
if( readbuffer.size() != 2 ) if( readbuffer.size() != 2 )
@ -295,7 +295,7 @@ void fillTagFromProxy( MP4::Mp4TagsProxy& proxy, MP4::Tag& mp4tag )
TagLib::ByteVector datavec = databox->data(); TagLib::ByteVector datavec = databox->data();
if( datavec.size() >= 4 ) if( datavec.size() >= 4 )
{ {
TagLib::uint trackno = static_cast<TagLib::uint>( static_cast<unsigned char>(datavec[0]) << 24 | uint trackno = static_cast<uint>( static_cast<unsigned char>(datavec[0]) << 24 |
static_cast<unsigned char>(datavec[1]) << 16 | static_cast<unsigned char>(datavec[1]) << 16 |
static_cast<unsigned char>(datavec[2]) << 8 | static_cast<unsigned char>(datavec[2]) << 8 |
static_cast<unsigned char>(datavec[3]) ); static_cast<unsigned char>(datavec[3]) );
@ -342,7 +342,7 @@ void fillTagFromProxy( MP4::Mp4TagsProxy& proxy, MP4::Tag& mp4tag )
TagLib::ByteVector datavec = databox->data(); TagLib::ByteVector datavec = databox->data();
if( datavec.size() >= 4 ) if( datavec.size() >= 4 )
{ {
TagLib::uint discno = static_cast<TagLib::uint>( static_cast<unsigned char>(datavec[0]) << 24 | uint discno = static_cast<uint>( static_cast<unsigned char>(datavec[0]) << 24 |
static_cast<unsigned char>(datavec[1]) << 16 | static_cast<unsigned char>(datavec[1]) << 16 |
static_cast<unsigned char>(datavec[2]) << 8 | static_cast<unsigned char>(datavec[2]) << 8 |
static_cast<unsigned char>(datavec[3]) ); static_cast<unsigned char>(datavec[3]) );
@ -360,7 +360,7 @@ void fillTagFromProxy( MP4::Mp4TagsProxy& proxy, MP4::Tag& mp4tag )
if( datavec.size() >= 2 ) if( datavec.size() >= 2 )
{ {
TagLib::uint bpm = static_cast<TagLib::uint>( static_cast<unsigned char>(datavec[0]) << 8 | uint bpm = static_cast<uint>( static_cast<unsigned char>(datavec[0]) << 8 |
static_cast<unsigned char>(datavec[1]) ); static_cast<unsigned char>(datavec[1]) );
mp4tag.setBpm( bpm ); mp4tag.setBpm( bpm );
} }

@ -114,22 +114,22 @@ namespace TagLib {
* Helper function for parsing the MP4 file - reads the size and type of the next box. * Helper function for parsing the MP4 file - reads the size and type of the next box.
* Returns true if read succeeded - not at EOF * Returns true if read succeeded - not at EOF
*/ */
bool readSizeAndType( TagLib::uint& size, MP4::Fourcc& fourcc ); bool readSizeAndType( uint& size, MP4::Fourcc& fourcc );
/*! /*!
* Helper function to read the length of an descriptor in systems manner * Helper function to read the length of an descriptor in systems manner
*/ */
TagLib::uint readSystemsLen(); uint readSystemsLen();
/*! /*!
* Helper function for reading an unsigned int out of the file (big endian method) * Helper function for reading an unsigned int out of the file (big endian method)
*/ */
bool readInt( TagLib::uint& toRead ); bool readInt( uint& toRead );
/*! /*!
* Helper function for reading an unsigned short out of the file (big endian method) * Helper function for reading an unsigned short out of the file (big endian method)
*/ */
bool readShort( TagLib::uint& toRead ); bool readShort( uint& toRead );
/*! /*!
* Helper function for reading an unsigned long long (64bit) out of the file (big endian method) * Helper function for reading an unsigned long long (64bit) out of the file (big endian method)

@ -30,12 +30,12 @@ using namespace TagLib;
class MP4::Mp4HdlrBox::Mp4HdlrBoxPrivate class MP4::Mp4HdlrBox::Mp4HdlrBoxPrivate
{ {
public: public:
TagLib::uint pre_defined; uint pre_defined;
MP4::Fourcc handler_type; MP4::Fourcc handler_type;
TagLib::String hdlr_string; TagLib::String hdlr_string;
}; // class Mp4HdlrBoxPrivate }; // class Mp4HdlrBoxPrivate
MP4::Mp4HdlrBox::Mp4HdlrBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) MP4::Mp4HdlrBox::Mp4HdlrBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset )
: Mp4IsoFullBox( file, fourcc, size, offset ) : Mp4IsoFullBox( file, fourcc, size, offset )
{ {
d = new MP4::Mp4HdlrBox::Mp4HdlrBoxPrivate(); d = new MP4::Mp4HdlrBox::Mp4HdlrBoxPrivate();
@ -58,7 +58,7 @@ TagLib::String MP4::Mp4HdlrBox::hdlr_string() const
void MP4::Mp4HdlrBox::parse() void MP4::Mp4HdlrBox::parse()
{ {
TagLib::uint totalread = 12+20; uint totalread = 12+20;
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
if( mp4file->readInt( d->pre_defined ) == false ) if( mp4file->readInt( d->pre_defined ) == false )

@ -32,7 +32,7 @@ namespace TagLib
class Mp4HdlrBox: public Mp4IsoFullBox class Mp4HdlrBox: public Mp4IsoFullBox
{ {
public: public:
Mp4HdlrBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); Mp4HdlrBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset );
~Mp4HdlrBox(); ~Mp4HdlrBox();
//! parse hdlr contents //! parse hdlr contents

@ -36,7 +36,7 @@ public:
MP4::BoxFactory boxfactory; MP4::BoxFactory boxfactory;
}; // class Mp4IlstBoxPrivate }; // class Mp4IlstBoxPrivate
MP4::Mp4IlstBox::Mp4IlstBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) MP4::Mp4IlstBox::Mp4IlstBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset )
: Mp4IsoBox( file, fourcc, size, offset ) : Mp4IsoBox( file, fourcc, size, offset )
{ {
d = new MP4::Mp4IlstBox::Mp4IlstBoxPrivate(); d = new MP4::Mp4IlstBox::Mp4IlstBoxPrivate();
@ -62,9 +62,9 @@ void MP4::Mp4IlstBox::parse()
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
TagLib::uint totalsize = 8; uint totalsize = 8;
// parse all contained boxes // parse all contained boxes
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
#if 0 #if 0

@ -32,7 +32,7 @@ namespace TagLib
class Mp4IlstBox: public Mp4IsoBox class Mp4IlstBox: public Mp4IsoBox
{ {
public: public:
Mp4IlstBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); Mp4IlstBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset );
~Mp4IlstBox(); ~Mp4IlstBox();
//! parse ilst contents //! parse ilst contents

@ -28,12 +28,12 @@ class MP4::Mp4IsoBox::Mp4IsoBoxPrivate
{ {
public: public:
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
TagLib::uint size; uint size;
long offset; long offset;
TagLib::File* file; TagLib::File* file;
}; };
MP4::Mp4IsoBox::Mp4IsoBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) MP4::Mp4IsoBox::Mp4IsoBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset )
{ {
d = new MP4::Mp4IsoBox::Mp4IsoBoxPrivate(); d = new MP4::Mp4IsoBox::Mp4IsoBoxPrivate();
d->file = file; d->file = file;
@ -60,7 +60,7 @@ MP4::Fourcc MP4::Mp4IsoBox::fourcc() const
return d->fourcc; return d->fourcc;
} }
TagLib::uint MP4::Mp4IsoBox::size() const uint MP4::Mp4IsoBox::size() const
{ {
return d->size; return d->size;
} }

@ -55,12 +55,12 @@ void MP4::Mp4IsoFullBox::parsebox()
parse(); parse();
} }
TagLib::uchar MP4::Mp4IsoFullBox::version() uchar MP4::Mp4IsoFullBox::version()
{ {
return d->version; return d->version;
} }
TagLib::uint MP4::Mp4IsoFullBox::flags() uint MP4::Mp4IsoFullBox::flags()
{ {
return d->flags; return d->flags;
} }

@ -31,13 +31,13 @@ public:
TagLib::String artist; TagLib::String artist;
TagLib::String album; TagLib::String album;
TagLib::String genre; TagLib::String genre;
TagLib::uint year; uint year;
TagLib::uint track; uint track;
TagLib::String comment; TagLib::String comment;
TagLib::String grouping; TagLib::String grouping;
TagLib::String composer; TagLib::String composer;
TagLib::uint disk; uint disk;
TagLib::uint bpm; uint bpm;
bool isEmpty; bool isEmpty;
TagLib::ByteVector cover; TagLib::ByteVector cover;
}; };
@ -83,12 +83,12 @@ String MP4::Tag::genre() const
return d->genre; return d->genre;
} }
TagLib::uint MP4::Tag::year() const uint MP4::Tag::year() const
{ {
return d->year; return d->year;
} }
TagLib::uint MP4::Tag::track() const uint MP4::Tag::track() const
{ {
return d->track; return d->track;
} }
@ -103,12 +103,12 @@ String MP4::Tag::composer() const
return d->composer; return d->composer;
} }
TagLib::uint MP4::Tag::disk() const uint MP4::Tag::disk() const
{ {
return d->disk; return d->disk;
} }
TagLib::uint MP4::Tag::bpm() const uint MP4::Tag::bpm() const
{ {
return d->bpm; return d->bpm;
} }
@ -148,13 +148,13 @@ void MP4::Tag::setGenre(const String &s)
d->isEmpty = false; d->isEmpty = false;
} }
void MP4::Tag::setYear(const TagLib::uint i) void MP4::Tag::setYear(const uint i)
{ {
d->year = i; d->year = i;
d->isEmpty = false; d->isEmpty = false;
} }
void MP4::Tag::setTrack(const TagLib::uint i) void MP4::Tag::setTrack(const uint i)
{ {
d->track = i; d->track = i;
d->isEmpty = false; d->isEmpty = false;
@ -172,13 +172,13 @@ void MP4::Tag::setComposer(const String &s)
d->isEmpty = false; d->isEmpty = false;
} }
void MP4::Tag::setDisk(const TagLib::uint i) void MP4::Tag::setDisk(const uint i)
{ {
d->disk = i; d->disk = i;
d->isEmpty = false; d->isEmpty = false;
} }
void MP4::Tag::setBpm(const TagLib::uint i) void MP4::Tag::setBpm(const uint i)
{ {
d->bpm = i; d->bpm = i;
d->isEmpty = false; d->isEmpty = false;

@ -38,7 +38,7 @@ public:
MP4::BoxFactory boxfactory; MP4::BoxFactory boxfactory;
}; // class Mp4MdiaBoxPrivate }; // class Mp4MdiaBoxPrivate
MP4::Mp4MdiaBox::Mp4MdiaBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) MP4::Mp4MdiaBox::Mp4MdiaBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset )
: Mp4IsoBox( file, fourcc, size, offset ) : Mp4IsoBox( file, fourcc, size, offset )
{ {
d = new MP4::Mp4MdiaBox::Mp4MdiaBoxPrivate(); d = new MP4::Mp4MdiaBox::Mp4MdiaBoxPrivate();
@ -60,9 +60,9 @@ void MP4::Mp4MdiaBox::parse()
{ {
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
TagLib::uint totalsize = 8; uint totalsize = 8;
// parse all contained boxes // parse all contained boxes
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
// stores the current handler type // stores the current handler type
@ -81,7 +81,7 @@ void MP4::Mp4MdiaBox::parse()
// create the appropriate subclass and parse it // create the appropriate subclass and parse it
MP4::Mp4IsoBox* curbox = d->boxfactory.createInstance( mp4file, fourcc, size, mp4file->tell() ); MP4::Mp4IsoBox* curbox = d->boxfactory.createInstance( mp4file, fourcc, size, mp4file->tell() );
if( static_cast<TagLib::uint>( fourcc ) == 0x6d696e66 /*"minf"*/ ) if( static_cast<uint>( fourcc ) == 0x6d696e66 /*"minf"*/ )
{ {
// cast to minf // cast to minf
Mp4MinfBox* minfbox = dynamic_cast<Mp4MinfBox*>( curbox ); Mp4MinfBox* minfbox = dynamic_cast<Mp4MinfBox*>( curbox );
@ -94,7 +94,7 @@ void MP4::Mp4MdiaBox::parse()
curbox->parsebox(); curbox->parsebox();
d->mdiaBoxes.append( curbox ); d->mdiaBoxes.append( curbox );
if(static_cast<TagLib::uint>( fourcc ) == 0x68646c72 /*"hdlr"*/ ) if(static_cast<uint>( fourcc ) == 0x68646c72 /*"hdlr"*/ )
{ {
// cast to hdlr box // cast to hdlr box
Mp4HdlrBox* hdlrbox = dynamic_cast<Mp4HdlrBox*>( curbox ); Mp4HdlrBox* hdlrbox = dynamic_cast<Mp4HdlrBox*>( curbox );

@ -32,7 +32,7 @@ namespace TagLib
class Mp4MdiaBox: public Mp4IsoBox class Mp4MdiaBox: public Mp4IsoBox
{ {
public: public:
Mp4MdiaBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); Mp4MdiaBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset );
~Mp4MdiaBox(); ~Mp4MdiaBox();
//! parse mdia contents //! parse mdia contents

@ -36,7 +36,7 @@ public:
MP4::BoxFactory boxfactory; MP4::BoxFactory boxfactory;
}; // class Mp4MetaBoxPrivate }; // class Mp4MetaBoxPrivate
MP4::Mp4MetaBox::Mp4MetaBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) MP4::Mp4MetaBox::Mp4MetaBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset )
: Mp4IsoFullBox( file, fourcc, size, offset ) : Mp4IsoFullBox( file, fourcc, size, offset )
{ {
d = new MP4::Mp4MetaBox::Mp4MetaBoxPrivate(); d = new MP4::Mp4MetaBox::Mp4MetaBoxPrivate();
@ -58,9 +58,9 @@ void MP4::Mp4MetaBox::parse()
{ {
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
TagLib::uint totalsize = 12; // initial size of box uint totalsize = 12; // initial size of box
// parse all contained boxes // parse all contained boxes
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
while( (mp4file->readSizeAndType( size, fourcc ) == true) ) while( (mp4file->readSizeAndType( size, fourcc ) == true) )

@ -32,7 +32,7 @@ namespace TagLib
class Mp4MetaBox: public Mp4IsoFullBox class Mp4MetaBox: public Mp4IsoFullBox
{ {
public: public:
Mp4MetaBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); Mp4MetaBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset );
~Mp4MetaBox(); ~Mp4MetaBox();
//! parse meta contents //! parse meta contents

@ -39,7 +39,7 @@ public:
MP4::Fourcc handler_type; MP4::Fourcc handler_type;
}; // class Mp4MinfBoxPrivate }; // class Mp4MinfBoxPrivate
MP4::Mp4MinfBox::Mp4MinfBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) MP4::Mp4MinfBox::Mp4MinfBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset )
: Mp4IsoBox( file, fourcc, size, offset ) : Mp4IsoBox( file, fourcc, size, offset )
{ {
d = new MP4::Mp4MinfBox::Mp4MinfBoxPrivate(); d = new MP4::Mp4MinfBox::Mp4MinfBoxPrivate();
@ -66,9 +66,9 @@ void MP4::Mp4MinfBox::parse()
{ {
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
TagLib::uint totalsize = 8; uint totalsize = 8;
// parse all contained boxes // parse all contained boxes
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
while( (mp4file->readSizeAndType( size, fourcc ) == true) ) while( (mp4file->readSizeAndType( size, fourcc ) == true) )
@ -84,7 +84,7 @@ void MP4::Mp4MinfBox::parse()
// create the appropriate subclass and parse it // create the appropriate subclass and parse it
MP4::Mp4IsoBox* curbox = d->boxfactory.createInstance( mp4file, fourcc, size, mp4file->tell() ); MP4::Mp4IsoBox* curbox = d->boxfactory.createInstance( mp4file, fourcc, size, mp4file->tell() );
if(static_cast<TagLib::uint>( fourcc ) == 0x7374626c /*stbl*/ ) if(static_cast<uint>( fourcc ) == 0x7374626c /*stbl*/ )
{ {
// cast to hdlr box // cast to hdlr box
Mp4StblBox* stblbox = dynamic_cast<Mp4StblBox*>( curbox ); Mp4StblBox* stblbox = dynamic_cast<Mp4StblBox*>( curbox );

@ -32,7 +32,7 @@ namespace TagLib
class Mp4MinfBox: public Mp4IsoBox class Mp4MinfBox: public Mp4IsoBox
{ {
public: public:
Mp4MinfBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); Mp4MinfBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset );
~Mp4MinfBox(); ~Mp4MinfBox();
//! parse minf contents //! parse minf contents

@ -36,7 +36,7 @@ public:
MP4::BoxFactory boxfactory; MP4::BoxFactory boxfactory;
}; // class Mp4MoovBoxPrivate }; // class Mp4MoovBoxPrivate
MP4::Mp4MoovBox::Mp4MoovBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) MP4::Mp4MoovBox::Mp4MoovBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset )
: Mp4IsoBox( file, fourcc, size, offset ) : Mp4IsoBox( file, fourcc, size, offset )
{ {
d = new MP4::Mp4MoovBox::Mp4MoovBoxPrivate(); d = new MP4::Mp4MoovBox::Mp4MoovBoxPrivate();
@ -58,9 +58,9 @@ void MP4::Mp4MoovBox::parse()
{ {
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
TagLib::uint totalsize = 8; uint totalsize = 8;
// parse all contained boxes // parse all contained boxes
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
while( (mp4file->readSizeAndType( size, fourcc ) == true) ) while( (mp4file->readSizeAndType( size, fourcc ) == true) )

@ -32,7 +32,7 @@ namespace TagLib
class Mp4MoovBox: public Mp4IsoBox class Mp4MoovBox: public Mp4IsoBox
{ {
public: public:
Mp4MoovBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); Mp4MoovBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset );
~Mp4MoovBox(); ~Mp4MoovBox();
//! parse moov contents //! parse moov contents

@ -36,18 +36,18 @@ public:
//! modification time of the file - since midnight, Jan. 1, 1904, UTC-time //! modification time of the file - since midnight, Jan. 1, 1904, UTC-time
TagLib::ulonglong modificationTime; TagLib::ulonglong modificationTime;
//! timescale for the file - referred by all time specifications in this box //! timescale for the file - referred by all time specifications in this box
TagLib::uint timescale; uint timescale;
//! duration of presentation //! duration of presentation
TagLib::ulonglong duration; TagLib::ulonglong duration;
//! playout speed //! playout speed
TagLib::uint rate; uint rate;
//! volume for entire presentation //! volume for entire presentation
TagLib::uint volume; uint volume;
//! track ID for an additional track (next new track) //! track ID for an additional track (next new track)
TagLib::uint nextTrackID; uint nextTrackID;
}; // class Mp4MvhdBoxPrivate }; // class Mp4MvhdBoxPrivate
MP4::Mp4MvhdBox::Mp4MvhdBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) MP4::Mp4MvhdBox::Mp4MvhdBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset )
: Mp4IsoFullBox( file, fourcc, size, offset ) : Mp4IsoFullBox( file, fourcc, size, offset )
{ {
d = new MP4::Mp4MvhdBox::Mp4MvhdBoxPrivate(); d = new MP4::Mp4MvhdBox::Mp4MvhdBoxPrivate();
@ -68,7 +68,7 @@ TagLib::ulonglong MP4::Mp4MvhdBox::modificationTime() const
return d->modificationTime; return d->modificationTime;
} }
TagLib::uint MP4::Mp4MvhdBox::timescale() const uint MP4::Mp4MvhdBox::timescale() const
{ {
return d->timescale; return d->timescale;
} }
@ -78,17 +78,17 @@ TagLib::ulonglong MP4::Mp4MvhdBox::duration() const
return d->duration; return d->duration;
} }
TagLib::uint MP4::Mp4MvhdBox::rate() const uint MP4::Mp4MvhdBox::rate() const
{ {
return d->rate; return d->rate;
} }
TagLib::uint MP4::Mp4MvhdBox::volume() const uint MP4::Mp4MvhdBox::volume() const
{ {
return d->volume; return d->volume;
} }
TagLib::uint MP4::Mp4MvhdBox::nextTrackID() const uint MP4::Mp4MvhdBox::nextTrackID() const
{ {
return d->nextTrackID; return d->nextTrackID;
} }
@ -111,7 +111,7 @@ void MP4::Mp4MvhdBox::parse()
} }
else else
{ {
TagLib::uint creationTime_tmp, modificationTime_tmp, duration_tmp; uint creationTime_tmp, modificationTime_tmp, duration_tmp;
if( !mp4file->readInt( creationTime_tmp ) ) if( !mp4file->readInt( creationTime_tmp ) )
return; return;

@ -33,7 +33,7 @@ namespace TagLib
class Mp4MvhdBox: public Mp4IsoFullBox class Mp4MvhdBox: public Mp4IsoFullBox
{ {
public: public:
Mp4MvhdBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); Mp4MvhdBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset );
~Mp4MvhdBox(); ~Mp4MvhdBox();
//! function to get the creation time of the mp4 file //! function to get the creation time of the mp4 file

@ -45,15 +45,15 @@ MP4::Mp4PropsProxy::~Mp4PropsProxy()
delete d; delete d;
} }
TagLib::uint MP4::Mp4PropsProxy::seconds() const uint MP4::Mp4PropsProxy::seconds() const
{ {
if( d->mvhdbox ) if( d->mvhdbox )
return static_cast<TagLib::uint>( d->mvhdbox->duration() / d->mvhdbox->timescale() ); return static_cast<uint>( d->mvhdbox->duration() / d->mvhdbox->timescale() );
else else
return 0; return 0;
} }
TagLib::uint MP4::Mp4PropsProxy::channels() const uint MP4::Mp4PropsProxy::channels() const
{ {
if( d->audiosampleentry ) if( d->audiosampleentry )
return d->audiosampleentry->channels(); return d->audiosampleentry->channels();
@ -61,7 +61,7 @@ TagLib::uint MP4::Mp4PropsProxy::channels() const
return 0; return 0;
} }
TagLib::uint MP4::Mp4PropsProxy::sampleRate() const uint MP4::Mp4PropsProxy::sampleRate() const
{ {
if( d->audiosampleentry ) if( d->audiosampleentry )
return (d->audiosampleentry->samplerate()>>16); return (d->audiosampleentry->samplerate()>>16);
@ -69,7 +69,7 @@ TagLib::uint MP4::Mp4PropsProxy::sampleRate() const
return 0; return 0;
} }
TagLib::uint MP4::Mp4PropsProxy::bitRate() const uint MP4::Mp4PropsProxy::bitRate() const
{ {
if( d->audiosampleentry ) if( d->audiosampleentry )
return (d->audiosampleentry->bitrate()); return (d->audiosampleentry->bitrate());

@ -41,13 +41,13 @@ namespace TagLib
~Mp4PropsProxy(); ~Mp4PropsProxy();
//! function to get length of media in seconds //! function to get length of media in seconds
TagLib::uint seconds() const; uint seconds() const;
//! function to get the nunmber of channels //! function to get the nunmber of channels
TagLib::uint channels() const; uint channels() const;
//! function to get the sample rate //! function to get the sample rate
TagLib::uint sampleRate() const; uint sampleRate() const;
//! function to get the bitrate rate //! function to get the bitrate rate
TagLib::uint bitRate() const; uint bitRate() const;
//! function to register the movie header box - mvhd //! function to register the movie header box - mvhd
void registerMvhd( MP4::Mp4MvhdBox* mvhdbox ); void registerMvhd( MP4::Mp4MvhdBox* mvhdbox );

@ -28,7 +28,7 @@ using namespace TagLib;
class MP4::Mp4SampleEntry::Mp4SampleEntryPrivate class MP4::Mp4SampleEntry::Mp4SampleEntryPrivate
{ {
public: public:
TagLib::uint data_reference_index; uint data_reference_index;
}; };
MP4::Mp4SampleEntry::Mp4SampleEntry( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ) MP4::Mp4SampleEntry::Mp4SampleEntry( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset )

@ -39,7 +39,7 @@ public:
MP4::Fourcc handler_type; MP4::Fourcc handler_type;
}; // class Mp4StblBoxPrivate }; // class Mp4StblBoxPrivate
MP4::Mp4StblBox::Mp4StblBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) MP4::Mp4StblBox::Mp4StblBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset )
: Mp4IsoBox( file, fourcc, size, offset ) : Mp4IsoBox( file, fourcc, size, offset )
{ {
d = new MP4::Mp4StblBox::Mp4StblBoxPrivate(); d = new MP4::Mp4StblBox::Mp4StblBoxPrivate();
@ -66,9 +66,9 @@ void MP4::Mp4StblBox::parse()
{ {
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
TagLib::uint totalsize = 8; uint totalsize = 8;
// parse all contained boxes // parse all contained boxes
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
while( (mp4file->readSizeAndType( size, fourcc ) == true) ) while( (mp4file->readSizeAndType( size, fourcc ) == true) )
@ -86,7 +86,7 @@ void MP4::Mp4StblBox::parse()
MP4::Mp4IsoBox* curbox = d->boxfactory.createInstance( mp4file, fourcc, size, mp4file->tell() ); MP4::Mp4IsoBox* curbox = d->boxfactory.createInstance( mp4file, fourcc, size, mp4file->tell() );
// check for stsd // check for stsd
if( static_cast<TagLib::uint>(fourcc) == 0x73747364 /*'stsd'*/ ) if( static_cast<uint>(fourcc) == 0x73747364 /*'stsd'*/ )
{ {
// cast to stsd box // cast to stsd box
MP4::Mp4StsdBox* stsdbox = dynamic_cast<MP4::Mp4StsdBox*>(curbox); MP4::Mp4StsdBox* stsdbox = dynamic_cast<MP4::Mp4StsdBox*>(curbox);

@ -32,7 +32,7 @@ namespace TagLib
class Mp4StblBox: public Mp4IsoBox class Mp4StblBox: public Mp4IsoBox
{ {
public: public:
Mp4StblBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); Mp4StblBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset );
~Mp4StblBox(); ~Mp4StblBox();
//! parse stbl contents //! parse stbl contents

@ -36,7 +36,7 @@ public:
MP4::Mp4AudioSampleEntry* audioSampleEntry; MP4::Mp4AudioSampleEntry* audioSampleEntry;
}; // class Mp4StsdBoxPrivate }; // class Mp4StsdBoxPrivate
MP4::Mp4StsdBox::Mp4StsdBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) MP4::Mp4StsdBox::Mp4StsdBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset )
: Mp4IsoFullBox( file, fourcc, size, offset ) : Mp4IsoFullBox( file, fourcc, size, offset )
{ {
d = new MP4::Mp4StsdBox::Mp4StsdBoxPrivate(); d = new MP4::Mp4StsdBox::Mp4StsdBoxPrivate();
@ -58,19 +58,19 @@ void MP4::Mp4StsdBox::parse()
if(!mp4file) if(!mp4file)
return; return;
TagLib::uint totalsize = 12; // initial size of box uint totalsize = 12; // initial size of box
// check for handler type - only parse if 'soun': // check for handler type - only parse if 'soun':
if( static_cast<TagLib::uint>(d->handler_type) == 0x736f756e ) if( static_cast<uint>(d->handler_type) == 0x736f756e )
{ {
// read entry count // read entry count
TagLib::uint entry_count; uint entry_count;
if(!mp4file->readInt( entry_count )) if(!mp4file->readInt( entry_count ))
return; return;
// simply read first entry and skip all following // simply read first entry and skip all following
// read size and type // read size and type
TagLib::uint cursize; uint cursize;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
if( !mp4file->readSizeAndType( cursize, fourcc )) if( !mp4file->readSizeAndType( cursize, fourcc ))
return; return;

@ -32,7 +32,7 @@ namespace TagLib
class Mp4StsdBox: public Mp4IsoFullBox class Mp4StsdBox: public Mp4IsoFullBox
{ {
public: public:
Mp4StsdBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); Mp4StsdBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset );
~Mp4StsdBox(); ~Mp4StsdBox();
//! parse stsd contents //! parse stsd contents

@ -36,7 +36,7 @@ public:
MP4::BoxFactory boxfactory; MP4::BoxFactory boxfactory;
}; // class Mp4TrakBoxPrivate }; // class Mp4TrakBoxPrivate
MP4::Mp4TrakBox::Mp4TrakBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) MP4::Mp4TrakBox::Mp4TrakBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset )
: Mp4IsoBox( file, fourcc, size, offset ) : Mp4IsoBox( file, fourcc, size, offset )
{ {
d = new MP4::Mp4TrakBox::Mp4TrakBoxPrivate(); d = new MP4::Mp4TrakBox::Mp4TrakBoxPrivate();
@ -58,9 +58,9 @@ void MP4::Mp4TrakBox::parse()
{ {
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
TagLib::uint totalsize = 8; uint totalsize = 8;
// parse all contained boxes // parse all contained boxes
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
while( (mp4file->readSizeAndType( size, fourcc ) == true) ) while( (mp4file->readSizeAndType( size, fourcc ) == true) )

@ -32,7 +32,7 @@ namespace TagLib
class Mp4TrakBox: public Mp4IsoBox class Mp4TrakBox: public Mp4IsoBox
{ {
public: public:
Mp4TrakBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); Mp4TrakBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset );
~Mp4TrakBox(); ~Mp4TrakBox();
//! parse trak contents //! parse trak contents

@ -36,7 +36,7 @@ public:
MP4::BoxFactory boxfactory; MP4::BoxFactory boxfactory;
}; // class Mp4UdtaBoxPrivate }; // class Mp4UdtaBoxPrivate
MP4::Mp4UdtaBox::Mp4UdtaBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) MP4::Mp4UdtaBox::Mp4UdtaBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset )
: Mp4IsoBox( file, fourcc, size, offset ) : Mp4IsoBox( file, fourcc, size, offset )
{ {
d = new MP4::Mp4UdtaBox::Mp4UdtaBoxPrivate(); d = new MP4::Mp4UdtaBox::Mp4UdtaBoxPrivate();
@ -61,9 +61,9 @@ void MP4::Mp4UdtaBox::parse()
#endif #endif
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() ); TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
TagLib::uint totalsize = 8; uint totalsize = 8;
// parse all contained boxes // parse all contained boxes
TagLib::uint size; uint size;
MP4::Fourcc fourcc; MP4::Fourcc fourcc;
#if 0 #if 0

@ -32,7 +32,7 @@ namespace TagLib
class Mp4UdtaBox: public Mp4IsoBox class Mp4UdtaBox: public Mp4IsoBox
{ {
public: public:
Mp4UdtaBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); Mp4UdtaBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset );
~Mp4UdtaBox(); ~Mp4UdtaBox();
//! parse moov contents //! parse moov contents

@ -91,12 +91,12 @@ String RealMediaFF::genre() const
return !m_err && m_id3v1tag ? m_id3v1tag->tag()->genre() : ""; return !m_err && m_id3v1tag ? m_id3v1tag->tag()->genre() : "";
} }
TagLib::uint RealMediaFF::year() const uint RealMediaFF::year() const
{ {
return !m_err && m_id3v1tag ? m_id3v1tag->tag()->year() : 0; return !m_err && m_id3v1tag ? m_id3v1tag->tag()->year() : 0;
} }
TagLib::uint RealMediaFF::track() const uint RealMediaFF::track() const
{ {
return !m_err && m_id3v1tag ? m_id3v1tag->tag()->track() : 0; return !m_err && m_id3v1tag ? m_id3v1tag->tag()->track() : 0;
} }

@ -269,8 +269,8 @@ namespace TagLib
TagLib::String album () const; TagLib::String album () const;
TagLib::String comment () const; TagLib::String comment () const;
TagLib::String genre () const; TagLib::String genre () const;
TagLib::uint year () const; uint year () const;
TagLib::uint track () const; uint track () const;
// TODO write support // TODO write support
//void setTitle (const String &s); //void setTitle (const String &s);
//void setArtist (const String &s); //void setArtist (const String &s);

@ -78,12 +78,12 @@ String RealMedia::Tag::genre () const
return m_rmff->genre(); return m_rmff->genre();
} }
TagLib::uint RealMedia::Tag::year () const uint RealMedia::Tag::year () const
{ {
return m_rmff->year(); return m_rmff->year();
} }
TagLib::uint RealMedia::Tag::track () const uint RealMedia::Tag::track () const
{ {
return m_rmff->track(); return m_rmff->track();
} }

@ -107,7 +107,7 @@ TagData* TagEngine::readTags( const TQString& file )
if( audioProperties ) if( audioProperties )
{ {
tagData->length = audioProperties->length(); tagData->length = audioProperties->lengthInSeconds();
// TODO read all information // TODO read all information
//tagData->fileSize = ; //tagData->fileSize = ;
// = audioProperties->channels(); // = audioProperties->channels();

@ -49,7 +49,7 @@ namespace TagLib {
if(tag2) if(tag2)
return tag2->title(); return tag2->title();
return String::null; return String();
} }
virtual String artist() const { virtual String artist() const {
@ -59,7 +59,7 @@ namespace TagLib {
if(tag2) if(tag2)
return tag2->artist(); return tag2->artist();
return String::null; return String();
} }
virtual String album() const { virtual String album() const {
@ -69,7 +69,7 @@ namespace TagLib {
if(tag2) if(tag2)
return tag2->album(); return tag2->album();
return String::null; return String();
} }
virtual String comment() const { virtual String comment() const {
@ -79,7 +79,7 @@ namespace TagLib {
if(tag2) if(tag2)
return tag2->comment(); return tag2->comment();
return String::null; return String();
} }
virtual String genre() const { virtual String genre() const {
@ -89,7 +89,7 @@ namespace TagLib {
if(tag2) if(tag2)
return tag2->genre(); return tag2->genre();
return String::null; return String();
} }
virtual uint year() const { virtual uint year() const {

@ -49,7 +49,7 @@ namespace TagLib {
if(tag2) if(tag2)
return tag2->title(); return tag2->title();
return String::null; return String();
} }
virtual String artist() const { virtual String artist() const {
@ -59,7 +59,7 @@ namespace TagLib {
if(tag2) if(tag2)
return tag2->artist(); return tag2->artist();
return String::null; return String();
} }
virtual String album() const { virtual String album() const {
@ -69,7 +69,7 @@ namespace TagLib {
if(tag2) if(tag2)
return tag2->album(); return tag2->album();
return String::null; return String();
} }
virtual String comment() const { virtual String comment() const {
@ -79,7 +79,7 @@ namespace TagLib {
if(tag2) if(tag2)
return tag2->comment(); return tag2->comment();
return String::null; return String();
} }
virtual String genre() const { virtual String genre() const {
@ -89,7 +89,7 @@ namespace TagLib {
if(tag2) if(tag2)
return tag2->genre(); return tag2->genre();
return String::null; return String();
} }
virtual uint year() const { virtual uint year() const {

Loading…
Cancel
Save