|
|
|
@ -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,10 +126,10 @@ 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;
|
|
|
|
|
|
|
|
|
@ -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 );
|
|
|
|
|
}
|
|
|
|
|