Add support for taglib 2

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/20/head
Michele Calgaro 3 weeks ago
parent 4e11f456f0
commit 2eda7f08c6
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

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

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

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

@ -56,7 +56,7 @@ namespace TagLib {
/*!
* 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;
@ -66,7 +66,7 @@ namespace TagLib {
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.
*/
virtual String genre() const;
@ -77,7 +77,7 @@ namespace TagLib {
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.
*/
virtual String copyright() const;
@ -104,7 +104,7 @@ namespace TagLib {
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.
*/
virtual void setAlbum(const String &s);

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

@ -54,30 +54,30 @@ namespace TagLib {
/*!
* 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; }
/*!
* 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; }
/*!
* 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; }
/*!
* 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; }
/*!
* 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.
*/
virtual String genre() const { return m_genre; }
@ -99,31 +99,31 @@ namespace TagLib {
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.
*/
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.
*/
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.
*/
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.
*/
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
* value will be selected based on a string comparison. A list of available
* 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() );
// parse data box
TagLib::uint size;
uint size;
MP4::Fourcc fourcc;
if(mp4file->readSizeAndType( size, fourcc ) == true)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -32,7 +32,7 @@ namespace TagLib
class Mp4HdlrBox: public Mp4IsoFullBox
{
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();
//! parse hdlr contents

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

@ -32,7 +32,7 @@ namespace TagLib
class Mp4IlstBox: public Mp4IsoBox
{
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();
//! parse ilst contents

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

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

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

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

@ -32,7 +32,7 @@ namespace TagLib
class Mp4MdiaBox: public Mp4IsoBox
{
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();
//! parse mdia contents

@ -36,7 +36,7 @@ public:
MP4::BoxFactory boxfactory;
}; // 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 )
{
d = new MP4::Mp4MetaBox::Mp4MetaBoxPrivate();
@ -58,9 +58,9 @@ void MP4::Mp4MetaBox::parse()
{
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
TagLib::uint size;
uint size;
MP4::Fourcc fourcc;
while( (mp4file->readSizeAndType( size, fourcc ) == true) )

@ -32,7 +32,7 @@ namespace TagLib
class Mp4MetaBox: public Mp4IsoFullBox
{
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();
//! parse meta contents

@ -39,7 +39,7 @@ public:
MP4::Fourcc handler_type;
}; // 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 )
{
d = new MP4::Mp4MinfBox::Mp4MinfBoxPrivate();
@ -66,9 +66,9 @@ void MP4::Mp4MinfBox::parse()
{
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
TagLib::uint totalsize = 8;
uint totalsize = 8;
// parse all contained boxes
TagLib::uint size;
uint size;
MP4::Fourcc fourcc;
while( (mp4file->readSizeAndType( size, fourcc ) == true) )
@ -84,7 +84,7 @@ void MP4::Mp4MinfBox::parse()
// create the appropriate subclass and parse it
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
Mp4StblBox* stblbox = dynamic_cast<Mp4StblBox*>( curbox );

@ -32,7 +32,7 @@ namespace TagLib
class Mp4MinfBox: public Mp4IsoBox
{
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();
//! parse minf contents

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

@ -32,7 +32,7 @@ namespace TagLib
class Mp4MoovBox: public Mp4IsoBox
{
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();
//! parse moov contents

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

@ -33,7 +33,7 @@ namespace TagLib
class Mp4MvhdBox: public Mp4IsoFullBox
{
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();
//! function to get the creation time of the mp4 file

@ -45,15 +45,15 @@ MP4::Mp4PropsProxy::~Mp4PropsProxy()
delete d;
}
TagLib::uint MP4::Mp4PropsProxy::seconds() const
uint MP4::Mp4PropsProxy::seconds() const
{
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
return 0;
}
TagLib::uint MP4::Mp4PropsProxy::channels() const
uint MP4::Mp4PropsProxy::channels() const
{
if( d->audiosampleentry )
return d->audiosampleentry->channels();
@ -61,7 +61,7 @@ TagLib::uint MP4::Mp4PropsProxy::channels() const
return 0;
}
TagLib::uint MP4::Mp4PropsProxy::sampleRate() const
uint MP4::Mp4PropsProxy::sampleRate() const
{
if( d->audiosampleentry )
return (d->audiosampleentry->samplerate()>>16);
@ -69,7 +69,7 @@ TagLib::uint MP4::Mp4PropsProxy::sampleRate() const
return 0;
}
TagLib::uint MP4::Mp4PropsProxy::bitRate() const
uint MP4::Mp4PropsProxy::bitRate() const
{
if( d->audiosampleentry )
return (d->audiosampleentry->bitrate());

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

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

@ -39,7 +39,7 @@ public:
MP4::Fourcc handler_type;
}; // 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 )
{
d = new MP4::Mp4StblBox::Mp4StblBoxPrivate();
@ -66,9 +66,9 @@ void MP4::Mp4StblBox::parse()
{
TagLib::MP4::File* mp4file = static_cast<MP4::File*>( file() );
TagLib::uint totalsize = 8;
uint totalsize = 8;
// parse all contained boxes
TagLib::uint size;
uint size;
MP4::Fourcc fourcc;
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() );
// check for stsd
if( static_cast<TagLib::uint>(fourcc) == 0x73747364 /*'stsd'*/ )
if( static_cast<uint>(fourcc) == 0x73747364 /*'stsd'*/ )
{
// cast to stsd box
MP4::Mp4StsdBox* stsdbox = dynamic_cast<MP4::Mp4StsdBox*>(curbox);

@ -32,7 +32,7 @@ namespace TagLib
class Mp4StblBox: public Mp4IsoBox
{
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();
//! parse stbl contents

@ -36,7 +36,7 @@ public:
MP4::Mp4AudioSampleEntry* audioSampleEntry;
}; // 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 )
{
d = new MP4::Mp4StsdBox::Mp4StsdBoxPrivate();
@ -58,19 +58,19 @@ void MP4::Mp4StsdBox::parse()
if(!mp4file)
return;
TagLib::uint totalsize = 12; // initial size of box
uint totalsize = 12; // initial size of box
// 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
TagLib::uint entry_count;
uint entry_count;
if(!mp4file->readInt( entry_count ))
return;
// simply read first entry and skip all following
// read size and type
TagLib::uint cursize;
uint cursize;
MP4::Fourcc fourcc;
if( !mp4file->readSizeAndType( cursize, fourcc ))
return;

@ -32,7 +32,7 @@ namespace TagLib
class Mp4StsdBox: public Mp4IsoFullBox
{
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();
//! parse stsd contents

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

@ -32,7 +32,7 @@ namespace TagLib
class Mp4TrakBox: public Mp4IsoBox
{
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();
//! parse trak contents

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

@ -32,7 +32,7 @@ namespace TagLib
class Mp4UdtaBox: public Mp4IsoBox
{
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();
//! parse moov contents

@ -91,12 +91,12 @@ String RealMediaFF::genre() const
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;
}
TagLib::uint RealMediaFF::track() const
uint RealMediaFF::track() const
{
return !m_err && m_id3v1tag ? m_id3v1tag->tag()->track() : 0;
}

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

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

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

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

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

Loading…
Cancel
Save