.
This commit is contained in:
+7
-27
@@ -2,20 +2,13 @@
|
||||
#include "common.h"
|
||||
|
||||
|
||||
cImage::cImage()
|
||||
{
|
||||
}
|
||||
|
||||
cImage::cImage(const QImage& image, const QString& szFileName, const cImage::ImageType& imageType, const QString& szDescription) :
|
||||
m_image(image),
|
||||
m_szFileName(szFileName),
|
||||
m_ImageType(imageType),
|
||||
m_szDescription(szDescription)
|
||||
cImage::cImage() :
|
||||
QImage()
|
||||
{
|
||||
}
|
||||
|
||||
cImage::cImage(const QByteArray& array, const QString& szFileName, const cImage::ImageType& imageType, const QString& szDescription) :
|
||||
m_image(QImage::fromData(array)),
|
||||
QImage(QImage::fromData(array)),
|
||||
m_szFileName(szFileName),
|
||||
m_ImageType(imageType),
|
||||
m_szDescription(szDescription)
|
||||
@@ -26,22 +19,9 @@ cImageList::cImageList()
|
||||
{
|
||||
}
|
||||
|
||||
cImage* cImageList::add(const QImage& image, const QString& szFileName, const cImage::ImageType& imageType, const QString& szDescription)
|
||||
cImage* cImageList::add(const QByteArray &array, const QString& szFileName, const cImage::ImageType& imageType, const QString& szDescription)
|
||||
{
|
||||
cImage* lpNew = new cImage(image, szFileName, imageType, szDescription);
|
||||
|
||||
if(!lpNew)
|
||||
return(0);
|
||||
append(lpNew);
|
||||
return(lpNew);
|
||||
}
|
||||
|
||||
cImage* cImageList::add(const QByteArray& array, const QString& szFileName, const cImage::ImageType& imageType, const QString& szDescription)
|
||||
{
|
||||
cImage* lpNew = new cImage(array, szFileName, imageType, szDescription);
|
||||
|
||||
if(!lpNew)
|
||||
return(0);
|
||||
append(lpNew);
|
||||
return(lpNew);
|
||||
cImage image(array, szFileName, imageType, szDescription);
|
||||
append(image);
|
||||
return(&image);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <QMetaType>
|
||||
|
||||
|
||||
class cImage
|
||||
class cImage : public QImage
|
||||
{
|
||||
public:
|
||||
enum ImageType
|
||||
@@ -34,23 +34,24 @@ public:
|
||||
PublisherLogo = 0x14
|
||||
};
|
||||
cImage();
|
||||
cImage(const QImage& image, const QString& szFileName, const cImage::ImageType& imageType, const QString& szDescription);
|
||||
cImage(const QByteArray& array, const QString& szFileName, const cImage::ImageType& imageType, const QString& szDescription);
|
||||
|
||||
protected:
|
||||
QImage m_image;
|
||||
QString m_szFileName;
|
||||
ImageType m_ImageType;
|
||||
QString m_szDescription;
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(cImage)
|
||||
|
||||
class cImageList : public QList<cImage *>
|
||||
class cImageList : public QList<cImage>
|
||||
{
|
||||
public:
|
||||
cImageList();
|
||||
cImage* add(const QImage& image, const QString& szFileName, const cImage::ImageType& imageType, const QString& szDescription);
|
||||
cImage* add(const QByteArray& array, const QString& szFileName, const cImage::ImageType& imageType, const QString& szDescription);
|
||||
};
|
||||
|
||||
|
||||
+6
-102
@@ -14,8 +14,8 @@ void addFile(const QString& szFile)
|
||||
|
||||
cMediaInfo* lpMediaInfo = new cMediaInfo;
|
||||
lpMediaInfo->readFromFile(szFile);
|
||||
// if(lpMediaInfo->isValid())
|
||||
// lpMediaInfo->writeToDB();
|
||||
if(lpMediaInfo->isValid())
|
||||
lpMediaInfo->writeToDB();
|
||||
delete lpMediaInfo;
|
||||
}
|
||||
|
||||
@@ -54,107 +54,11 @@ cMainWindow::cMainWindow(QWidget *parent) :
|
||||
cDatabase* lpDatabase;
|
||||
lpDatabase = new cDatabase(this);
|
||||
|
||||
bool bRet;
|
||||
bRet = lpDatabase->getDB().transaction();
|
||||
// bool bRet;
|
||||
// bRet = lpDatabase->getDB().transaction();
|
||||
// addPath("C:/Users/vet0572/Music");
|
||||
// addPath("C:/Users/vet0572/Music/Bee Gees");
|
||||
addPath("C:/Users/vet0572/Music/Ambros, Tauchen, Prokopetz");
|
||||
addPath("C:/Users/vet0572/Music/Amy MacDonald");
|
||||
addPath("C:/Users/vet0572/Music/Amy Winehouse");
|
||||
addPath("C:/Users/vet0572/Music/Andreas Bourani");
|
||||
addPath("C:/Users/vet0572/Music/Angus & Julia Stone");
|
||||
addPath("C:/Users/vet0572/Music/Anna Maria Kaufmann and Joey Tempest");
|
||||
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/2 Years On");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Bee Gees Story");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Best of Bee Gees");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Brillant Front Birth");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Children of the World");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Cucumber Castle");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/E.S.P");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/First");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Greatest");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Here at Last...Bee Gees...Live");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/High Civilization");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Horizontal");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Idea");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/In the beginning");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Inception And Nostalgia");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Instrumental & Other Rarities");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Kick In The Head");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Life In A Tin Can");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Live At The Beeb");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Living Eyes");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Love Songs");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Main Course");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Melody");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Mr. Natural");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Number Ones");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Odessa");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/One");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/One Night Only");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Rare Precious And Beautiful");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Rare precious and beautiful - Vol 3");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Rare, Precious & Beautiful 2");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Saturday night fever");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Sayonara Tokyo");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Sing And Play 14 Barry Gibb Songs");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Size Isn't Everything");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Spicks and Specks");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Spirits Having Flown");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Staying Alive");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Still Waters");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/The best of Volume 02");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/The Very Best");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/This is where I came in");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/To Whom It May Concern");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Tomorrow The World");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Trafalgar");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Turn Around, Look At Me");
|
||||
addPath("C:/Users/vet0572/Music/Bee Gees/Turn around, look at us");
|
||||
|
||||
addPath("C:/Users/vet0572/Music/Ambros, Tauchen, Prokopetz");
|
||||
addPath("C:/Users/vet0572/Music/Amy MacDonald");
|
||||
addPath("C:/Users/vet0572/Music/Amy Winehouse");
|
||||
addPath("C:/Users/vet0572/Music/Andreas Bourani");
|
||||
addPath("C:/Users/vet0572/Music/Angus & Julia Stone");
|
||||
addPath("C:/Users/vet0572/Music/Anna Maria Kaufmann and Joey Tempest");
|
||||
addPath("C:/Users/vet0572/Music/Boney M");
|
||||
addPath("C:/Users/vet0572/Music/Delta Moon");
|
||||
addPath("C:/Users/vet0572/Music/Dire Straits");
|
||||
addPath("C:/Users/vet0572/Music/Erste Allgemeine Verunsicherung");
|
||||
addPath("C:/Users/vet0572/Music/Flogging Molly");
|
||||
addPath("C:/Users/vet0572/Music/Frank Zander");
|
||||
addPath("C:/Users/vet0572/Music/Game Of Thrones");
|
||||
addPath("C:/Users/vet0572/Music/Game Of Thrones- Season 4");
|
||||
addPath("C:/Users/vet0572/Music/Heartbeat");
|
||||
addPath("C:/Users/vet0572/Music/Hubert von Goisern");
|
||||
addPath("C:/Users/vet0572/Music/Hugh Laurie");
|
||||
addPath("C:/Users/vet0572/Music/Jon Lord");
|
||||
addPath("C:/Users/vet0572/Music/Karthago");
|
||||
addPath("C:/Users/vet0572/Music/Legend of The Seeker");
|
||||
addPath("C:/Users/vet0572/Music/Ludwig Hirsch");
|
||||
addPath("C:/Users/vet0572/Music/Mass Effect");
|
||||
addPath("C:/Users/vet0572/Music/Matt Simons");
|
||||
addPath("C:/Users/vet0572/Music/Mike Krüger - 79er Motzbeutel");
|
||||
addPath("C:/Users/vet0572/Music/Mike Oldfield");
|
||||
addPath("C:/Users/vet0572/Music/Ostbahn Kurti & Die Chefpartie");
|
||||
addPath("C:/Users/vet0572/Music/Papermoon");
|
||||
addPath("C:/Users/vet0572/Music/Passenger");
|
||||
addPath("C:/Users/vet0572/Music/Ramin Djawadi");
|
||||
addPath("C:/Users/vet0572/Music/Roger Hodgson");
|
||||
addPath("C:/Users/vet0572/Music/Shadow Of The Beast");
|
||||
addPath("C:/Users/vet0572/Music/Simon & Garfunkel");
|
||||
addPath("C:/Users/vet0572/Music/Stars On 45");
|
||||
addPath("C:/Users/vet0572/Music/STS");
|
||||
addPath("C:/Users/vet0572/Music/The Piano Guys");
|
||||
addPath("C:/Users/vet0572/Music/The Pogues");
|
||||
addPath("C:/Users/vet0572/Music/The Stand");
|
||||
addPath("C:/Users/vet0572/Music/Tracy Chapman");
|
||||
addPath("C:/Users/vet0572/Music/Vienna Symphony Orchestra");
|
||||
addPath("C:/Users/vet0572/Music/Wig");
|
||||
addPath("C:/Users/vet0572/Music/Wolfgang Ambros");
|
||||
bRet = lpDatabase->getDB().commit();
|
||||
addPath("C:/Users/birkeh/Music");
|
||||
// bRet = lpDatabase->getDB().commit();
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
|
||||
+123
-92
@@ -202,12 +202,16 @@ bool cMediaInfo::readFromFile(const QString& szFileName)
|
||||
tags = lpApe->properties();
|
||||
|
||||
APE::Properties* lpAudioProperties = lpApe->audioProperties();
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_iBitsPerSample = lpAudioProperties->bitsPerSample();
|
||||
m_iVersion = lpAudioProperties->version();
|
||||
|
||||
if(lpAudioProperties)
|
||||
{
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_iBitsPerSample = lpAudioProperties->bitsPerSample();
|
||||
m_iVersion = lpAudioProperties->version();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MEDIA_TYPE_ASF:
|
||||
@@ -231,11 +235,15 @@ bool cMediaInfo::readFromFile(const QString& szFileName)
|
||||
tags = lpASF->properties();
|
||||
|
||||
ASF::Properties* lpAudioProperties = lpASF->audioProperties();
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_bIsEncrypted = lpAudioProperties->isEncrypted();
|
||||
|
||||
if(lpAudioProperties)
|
||||
{
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_bIsEncrypted = lpAudioProperties->isEncrypted();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MEDIA_TYPE_FLAC:
|
||||
@@ -246,12 +254,16 @@ bool cMediaInfo::readFromFile(const QString& szFileName)
|
||||
tags = lpFlac->properties();
|
||||
|
||||
FLAC::Properties* lpAudioProperties = lpFlac->audioProperties();
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_iSampleWidth = lpAudioProperties->sampleWidth();
|
||||
m_ullSampleFrames = lpAudioProperties->sampleFrames();
|
||||
|
||||
if(lpAudioProperties)
|
||||
{
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_iSampleWidth = lpAudioProperties->sampleWidth();
|
||||
m_ullSampleFrames = lpAudioProperties->sampleFrames();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MEDIA_TYPE_MP4:
|
||||
@@ -273,12 +285,16 @@ bool cMediaInfo::readFromFile(const QString& szFileName)
|
||||
tags = lpMP4->properties();
|
||||
|
||||
MP4::Properties* lpAudioProperties = lpMP4->audioProperties();
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_iBitsPerSample = lpAudioProperties->bitsPerSample();
|
||||
m_bIsEncrypted = lpAudioProperties->isEncrypted();
|
||||
|
||||
if(lpAudioProperties)
|
||||
{
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_iBitsPerSample = lpAudioProperties->bitsPerSample();
|
||||
m_bIsEncrypted = lpAudioProperties->isEncrypted();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MEDIA_TYPE_MPC:
|
||||
@@ -289,16 +305,20 @@ bool cMediaInfo::readFromFile(const QString& szFileName)
|
||||
tags = lpMPC->properties();
|
||||
|
||||
MPC::Properties* lpAudioProperties = lpMPC->audioProperties();
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_iVersion = lpAudioProperties->mpcVersion();
|
||||
m_ullSampleFrames = lpAudioProperties->sampleFrames();
|
||||
m_iTrackGain = lpAudioProperties->trackGain();
|
||||
m_iAlbumGain = lpAudioProperties->albumGain();
|
||||
m_iTrackPeak = lpAudioProperties->trackPeak();
|
||||
m_iAlbumPeak = lpAudioProperties->albumPeak();
|
||||
|
||||
if(lpAudioProperties)
|
||||
{
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_iVersion = lpAudioProperties->mpcVersion();
|
||||
m_ullSampleFrames = lpAudioProperties->sampleFrames();
|
||||
m_iTrackGain = lpAudioProperties->trackGain();
|
||||
m_iAlbumGain = lpAudioProperties->albumGain();
|
||||
m_iTrackPeak = lpAudioProperties->trackPeak();
|
||||
m_iAlbumPeak = lpAudioProperties->albumPeak();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MEDIA_TYPE_MPEG:
|
||||
@@ -311,42 +331,45 @@ bool cMediaInfo::readFromFile(const QString& szFileName)
|
||||
tags = lpMPEG->properties();
|
||||
|
||||
MPEG::Properties* lpAudioProperties = lpMPEG->audioProperties();
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_iLayer = lpAudioProperties->layer();
|
||||
switch(lpAudioProperties->version())
|
||||
{
|
||||
case MPEG::Header::Version1:
|
||||
m_iVersion = 10;
|
||||
break;
|
||||
case MPEG::Header::Version2:
|
||||
m_iVersion = 20;
|
||||
break;
|
||||
case MPEG::Header::Version2_5:
|
||||
m_iVersion = 25;
|
||||
break;
|
||||
}
|
||||
m_bProtectionEnabled = lpAudioProperties->protectionEnabled();
|
||||
switch(lpAudioProperties->channelMode())
|
||||
{
|
||||
case MPEG::Header::Stereo:
|
||||
m_channelMode = CHANNEL_MODE_STEREO;
|
||||
break;
|
||||
case MPEG::Header::JointStereo:
|
||||
m_channelMode = CHANNEL_MODE_JOINTSTEREO;
|
||||
break;
|
||||
case MPEG::Header::DualChannel:
|
||||
m_channelMode = CHANNEL_MODE_DUALMONO;
|
||||
break;
|
||||
case MPEG::Header::SingleChannel:
|
||||
m_channelMode = CHANNEL_MODE_MONO;
|
||||
break;
|
||||
}
|
||||
m_bIsCopyrighted = lpAudioProperties->isCopyrighted();
|
||||
m_bIsOriginal = lpAudioProperties->isOriginal();
|
||||
|
||||
if(lpAudioProperties)
|
||||
{
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_iLayer = lpAudioProperties->layer();
|
||||
switch(lpAudioProperties->version())
|
||||
{
|
||||
case MPEG::Header::Version1:
|
||||
m_iVersion = 10;
|
||||
break;
|
||||
case MPEG::Header::Version2:
|
||||
m_iVersion = 20;
|
||||
break;
|
||||
case MPEG::Header::Version2_5:
|
||||
m_iVersion = 25;
|
||||
break;
|
||||
}
|
||||
m_bProtectionEnabled = lpAudioProperties->protectionEnabled();
|
||||
switch(lpAudioProperties->channelMode())
|
||||
{
|
||||
case MPEG::Header::Stereo:
|
||||
m_channelMode = CHANNEL_MODE_STEREO;
|
||||
break;
|
||||
case MPEG::Header::JointStereo:
|
||||
m_channelMode = CHANNEL_MODE_JOINTSTEREO;
|
||||
break;
|
||||
case MPEG::Header::DualChannel:
|
||||
m_channelMode = CHANNEL_MODE_DUALMONO;
|
||||
break;
|
||||
case MPEG::Header::SingleChannel:
|
||||
m_channelMode = CHANNEL_MODE_MONO;
|
||||
break;
|
||||
}
|
||||
m_bIsCopyrighted = lpAudioProperties->isCopyrighted();
|
||||
m_bIsOriginal = lpAudioProperties->isOriginal();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MEDIA_TYPE_TRUEAUDIO:
|
||||
@@ -357,12 +380,16 @@ bool cMediaInfo::readFromFile(const QString& szFileName)
|
||||
tags = lpTrueAudio->properties();
|
||||
|
||||
TrueAudio::Properties* lpAudioProperties = lpTrueAudio->audioProperties();
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_iBitsPerSample = lpAudioProperties->bitsPerSample();
|
||||
m_iVersion = lpAudioProperties->ttaVersion();
|
||||
|
||||
if(lpAudioProperties)
|
||||
{
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_iBitsPerSample = lpAudioProperties->bitsPerSample();
|
||||
m_iVersion = lpAudioProperties->ttaVersion();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MEDIA_TYPE_WAVPACK:
|
||||
@@ -373,13 +400,17 @@ bool cMediaInfo::readFromFile(const QString& szFileName)
|
||||
tags = lpWavPack->properties();
|
||||
|
||||
WavPack::Properties* lpAudioProperties = lpWavPack->audioProperties();
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_iBitsPerSample = lpAudioProperties->bitsPerSample();
|
||||
m_ullSampleFrames = lpAudioProperties->sampleFrames();
|
||||
m_iVersion = lpAudioProperties->version();
|
||||
|
||||
if(lpAudioProperties)
|
||||
{
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_iBitsPerSample = lpAudioProperties->bitsPerSample();
|
||||
m_ullSampleFrames = lpAudioProperties->sampleFrames();
|
||||
m_iVersion = lpAudioProperties->version();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MEDIA_TYPE_WAV:
|
||||
@@ -389,12 +420,16 @@ bool cMediaInfo::readFromFile(const QString& szFileName)
|
||||
tags = lpWav->properties();
|
||||
|
||||
RIFF::WAV::Properties* lpAudioProperties = lpWav->audioProperties();
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_iSampleWidth = lpAudioProperties->sampleWidth();
|
||||
m_ullSampleFrames = lpAudioProperties->sampleFrames();
|
||||
|
||||
if(lpAudioProperties)
|
||||
{
|
||||
m_iLength = lpAudioProperties->length();
|
||||
m_iBitrate = lpAudioProperties->bitrate();
|
||||
m_iSampleRate = lpAudioProperties->sampleRate();
|
||||
m_iChannels = lpAudioProperties->channels();
|
||||
m_iSampleWidth = lpAudioProperties->sampleWidth();
|
||||
m_ullSampleFrames = lpAudioProperties->sampleFrames();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -709,11 +744,7 @@ void cMediaInfo::readTagV2(ID3v2::Tag* lpTag)
|
||||
szDescription = lpPicture->description().toCString();
|
||||
|
||||
QByteArray pictureData = QByteArray(lpPicture->picture().data(), lpPicture->picture().size());
|
||||
// QPixmap pixmap;
|
||||
// pixmap.loadFromData(pictureData);
|
||||
// m_imageList.add(pictureData, m_szFileName, (cImage::ImageType)t, szDescription);
|
||||
QImage image = QImage::fromData(pictureData);
|
||||
m_images.append(image);
|
||||
m_imageList.add(pictureData, m_szFileName, (cImage::ImageType)t, szDescription);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user