Commit 7552fb22 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Solved a warning about fps when parsing audio file

parent 20de0a57
......@@ -45,6 +45,7 @@ Media::Media( const QString& filePath, const QString& uuid /*= QString()*/ )
m_nbFrames( 0 ),
m_width( 0 ),
m_height( 0 ),
m_fps( .0f ),
m_baseClip( NULL )
{
if ( uuid.length() == 0 )
......
......@@ -110,15 +110,15 @@ void MetaDataWorker::metaDataAvailable()
m_media->setWidth( m_mediaPlayer->getWidth() );
m_media->setHeight( m_mediaPlayer->getHeight() );
m_media->setFps( m_mediaPlayer->getFps() );
if ( m_media->getFps() == .0f )
{
qWarning() << "Invalid FPS for media:" << m_media->getFileInfo()->absoluteFilePath();
m_media->setFps( Clip::DefaultFPS );
}
}
m_media->setLength( m_mediaPlayer->getLength() );
m_media->setFps( m_mediaPlayer->getFps() );
if ( m_media->getFps() == .0f )
{
qWarning() << "Invalid FPS for media:" << m_media->getFileInfo()->absoluteFilePath();
m_media->setFps( Clip::DefaultFPS );
}
m_media->setNbFrames( (m_media->getLengthMS() / 1000) * m_media->getFps() );
//Setting time for snapshot :
if ( m_media->getFileType() == Media::Video ||
......
......@@ -35,14 +35,6 @@ class MetaDataWorker : public QObject
Q_OBJECT
Q_DISABLE_COPY( MetaDataWorker )
public:
enum MetaDataType
{
MetaData,
Snapshot,
Audio
};
public:
MetaDataWorker( LibVLCpp::MediaPlayer* mediaPlayer, Media* media );
~MetaDataWorker();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment