Commit 8ecfa9be authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Media: Remove InputType. We don't support this and it clutters the code.

parent 82225c51
......@@ -238,7 +238,7 @@ ImportController::accept()
collapseAllButCurrentPath();
foreach ( Clip* clip, m_temporaryMedias->clips().values() )
{
if ( clip->getMedia()->source()->length() == 0 && clip->getMedia()->inputType() == Media::File )
if ( clip->getMedia()->source()->length() == 0 )
invalidMedias = true;
Library::getInstance()->addClip( clip );
}
......@@ -260,7 +260,7 @@ ImportController::handleInvalidMedias()
{
foreach ( Clip* clip, m_temporaryMedias->clips().values() )
{
if ( clip->getMedia()->source()->length() == 0 && clip->getMedia()->inputType() == Media::File )
if ( clip->getMedia()->source()->length() == 0 )
{
Transcoder *transcoder = new Transcoder( clip->getMedia() );
connect( transcoder, SIGNAL( done() ), transcoder, SLOT( deleteLater() ) );
......
......@@ -106,19 +106,11 @@ Clip::lengthSecond() const
void
Clip::computeLength()
{
if ( m_media->inputType() == Media::File )
{
float fps = m_media->source()->fps();
if ( fps < 0.1f )
fps = Clip::DefaultFPS;
m_length = m_end - m_begin;
m_lengthSeconds = qRound64( (float)m_length / fps );
}
else
{
m_length = 0;
m_lengthSeconds = 0;
}
float fps = m_media->source()->fps();
if ( fps < 0.1f )
fps = Clip::DefaultFPS;
m_length = m_end - m_begin;
m_lengthSeconds = qRound64( (float)m_length / fps );
}
const QStringList&
......
......@@ -106,12 +106,6 @@ void Media::setFileType(Media::FileType type)
m_fileType = type;
}
Media::InputType
Media::inputType() const
{
return m_inputType;
}
void
Media::setNbFrames( qint64 nbFrames )
{
......@@ -187,7 +181,6 @@ Media::onMetaDataComputed()
void
Media::setFilePath( const QString &filePath )
{
m_inputType = Media::File;
if ( m_fileInfo )
delete m_fileInfo;
m_fileInfo = new QFileInfo( filePath );
......
......@@ -66,11 +66,6 @@ public:
Video,
Image
};
enum InputType
{
File,
Stream
};
static const QString VideoExtensions;
static const QString AudioExtensions;
static const QString ImageExtensions;
......@@ -98,8 +93,6 @@ public:
FileType fileType() const;
void setFileType( FileType type );
InputType inputType() const;
Clip* baseClip() { return m_baseClip; }
const Clip* baseClip() const { return m_baseClip; }
void setBaseClip( Clip* clip );
......@@ -122,7 +115,6 @@ protected:
QFileInfo* m_fileInfo;
qint64 m_nbFrames;
FileType m_fileType;
InputType m_inputType;
QString m_fileName;
Clip* m_baseClip;
bool m_inWorkspace;
......
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