Commit 7d775ce0 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Fixed bug with mrl percent encoding.

We now use getMrl in ClipWorkflow
parent 86f25af3
......@@ -59,9 +59,11 @@ Media::Media( const QString& filePath, const QString& uuid /*= QString()*/ )
m_fileName = m_fileInfo->fileName();
setFileType();
if ( m_fileType == Media::Video || m_fileType == Media::Audio )
m_mrl = "file:///" + QUrl::toPercentEncoding( m_fileInfo->absoluteFilePath() );
m_mrl = "file:///" + QUrl::toPercentEncoding( m_fileInfo->absoluteFilePath(),
"/" );
else
m_mrl = "fake:///" + QUrl::toPercentEncoding( m_fileInfo->absoluteFilePath() );
m_mrl = "fake:///" + QUrl::toPercentEncoding( m_fileInfo->absoluteFilePath(),
"/" );
}
else
{
......
......@@ -120,7 +120,6 @@ void MetaDataWorker::metaDataAvailable()
m_media->setFps( Clip::DefaultFPS );
}
m_media->setNbFrames( (m_media->getLengthMS() / 1000) * m_media->getFps() );
m_media->emitMetaDataComputed();
//Setting time for snapshot :
if ( m_media->getFileType() == Media::Video ||
m_media->getFileType() == Media::Image )
......@@ -172,6 +171,7 @@ void MetaDataWorker::setSnapshot()
void MetaDataWorker::finalize()
{
m_media->emitMetaDataComputed();
m_media->disconnect( this );
emit computed();
delete this;
......
......@@ -77,10 +77,7 @@ void ClipWorkflow::initialize( bool preloading /*= false*/ )
// qDebug() << "Setting state to initializing";
setState( Initializing );
// qDebug() << "State is Initializing.";
if ( m_clip->getParent()->getFileType() == Media::Image )
m_vlcMedia = new LibVLCpp::Media( "fake:///" + QUrl::toPercentEncoding( m_clip->getParent()->getFileInfo()->absoluteFilePath() ) );
else
m_vlcMedia = new LibVLCpp::Media( "file:///" + QUrl::toPercentEncoding( m_clip->getParent()->getFileInfo()->absoluteFilePath() ) );
m_vlcMedia = new LibVLCpp::Media( m_clip->getParent()->getMrl() );
initVlcOutput();
m_mediaPlayer = Pool<LibVLCpp::MediaPlayer>::getInstance()->get();
m_mediaPlayer->setMedia( m_vlcMedia );
......
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