[vlmc-devel] [PATCH 2/2] Clip: Don't use "get" prefix
Yikai Lu
luyikei.qmltu at gmail.com
Sun Apr 10 06:23:49 CEST 2016
---
src/Gui/ClipProperty.cpp | 4 ++--
src/Gui/import/ImportController.cpp | 6 +++---
src/Gui/import/TagWidget.cpp | 2 +-
src/Gui/library/MediaCellView.cpp | 24 ++++++++++++------------
src/Gui/library/MediaLibrary.cpp | 2 +-
src/Gui/media/ClipMetadataDisplayer.cpp | 2 +-
src/Gui/timeline/AbstractGraphicsMediaItem.cpp | 2 +-
src/Gui/timeline/GraphicsAudioItem.cpp | 10 +++++-----
src/Gui/timeline/GraphicsMovieItem.cpp | 10 +++++-----
src/Gui/timeline/TracksView.cpp | 4 ++--
src/Library/Library.cpp | 2 +-
src/Library/MediaContainer.cpp | 6 +++---
src/Media/Clip.cpp | 10 +++++-----
src/Media/Clip.h | 8 ++++----
src/Project/Workspace.cpp | 4 ++--
src/Renderer/ClipRenderer.cpp | 16 ++++++++--------
src/Workflow/ClipWorkflow.cpp | 8 ++++----
src/Workflow/TrackWorkflow.cpp | 4 ++--
18 files changed, 62 insertions(+), 62 deletions(-)
diff --git a/src/Gui/ClipProperty.cpp b/src/Gui/ClipProperty.cpp
index 89e23a5..fcac27b 100644
--- a/src/Gui/ClipProperty.cpp
+++ b/src/Gui/ClipProperty.cpp
@@ -41,9 +41,9 @@ ClipProperty::ClipProperty( Clip* clip, QWidget *parent ) :
connect( this, SIGNAL( accepted() ), this, SLOT( deleteLater() ) );
connect( this, SIGNAL( rejected() ), this, SLOT( deleteLater() ) );
- setWindowTitle( m_clip->getMedia()->fileInfo()->fileName() + " " + tr( "properties" ) );
+ setWindowTitle( m_clip->media()->fileInfo()->fileName() + " " + tr( "properties" ) );
//Snapshot
- ui->snapshotLabel->setPixmap( m_clip->getMedia()->snapshot().scaled( 128, 128, Qt::KeepAspectRatio ) );
+ ui->snapshotLabel->setPixmap( m_clip->media()->snapshot().scaled( 128, 128, Qt::KeepAspectRatio ) );
//Metatags
const QPushButton* button = ui->buttonBox->button( QDialogButtonBox::Apply );
Q_ASSERT( button != nullptr);
diff --git a/src/Gui/import/ImportController.cpp b/src/Gui/import/ImportController.cpp
index 2a119a5..e0f731f 100644
--- a/src/Gui/import/ImportController.cpp
+++ b/src/Gui/import/ImportController.cpp
@@ -236,7 +236,7 @@ ImportController::accept()
collapseAllButCurrentPath();
foreach ( Clip* clip, m_temporaryMedias->clips().values() )
{
- if ( clip->getMedia()->source()->length() == 0 )
+ if ( clip->media()->source()->length() == 0 )
invalidMedias = true;
Core::instance()->library()->addClip( clip );
}
@@ -258,9 +258,9 @@ ImportController::handleInvalidMedias()
{
foreach ( Clip* clip, m_temporaryMedias->clips().values() )
{
- if ( clip->getMedia()->source()->length() == 0 )
+ if ( clip->media()->source()->length() == 0 )
{
- Transcoder *transcoder = new Transcoder( clip->getMedia() );
+ Transcoder *transcoder = new Transcoder( clip->media() );
connect( transcoder, SIGNAL( done() ), transcoder, SLOT( deleteLater() ) );
transcoder->transcodeToPs();
}
diff --git a/src/Gui/import/TagWidget.cpp b/src/Gui/import/TagWidget.cpp
index 61a68da..796b9b7 100644
--- a/src/Gui/import/TagWidget.cpp
+++ b/src/Gui/import/TagWidget.cpp
@@ -68,7 +68,7 @@ TagWidget::clipSelected( Clip* clip )
else
static_cast<QPushButton*>(m_buttonList[i])->setChecked( false );
}
- connect( clip->getMedia(), SIGNAL( metaDataComputed( const Media* ) ),
+ connect( clip->media(), SIGNAL( metaDataComputed( const Media* ) ),
this, SLOT( setMetaTags() ) );
connect( clip, SIGNAL( destroyed() ), this, SLOT( clipDestroyed() ) );
}
diff --git a/src/Gui/library/MediaCellView.cpp b/src/Gui/library/MediaCellView.cpp
index 37aff3b..9643b10 100644
--- a/src/Gui/library/MediaCellView.cpp
+++ b/src/Gui/library/MediaCellView.cpp
@@ -65,20 +65,20 @@ MediaCellView::MediaCellView( Clip* clip, QWidget *parent ) :
m_ui->clipCountLabel->hide();
m_ui->arrow->hide();
}
- if ( clip->getMedia()->source()->isParsed() == false )
+ if ( clip->media()->source()->isParsed() == false )
{
m_ui->thumbnail->setEnabled( false );
connect( MetaDataManager::instance(), SIGNAL( startingComputing( const Media* )),
this, SLOT( metadataComputingStarted( const Media* ) ), Qt::DirectConnection );
}
- connect( clip->getMedia(), SIGNAL( metaDataComputed() ),
+ connect( clip->media(), SIGNAL( metaDataComputed() ),
this, SLOT( metadataUpdated() ) );
// Snapshot generation will generate a QPixmap, which has to be done on GUI thread
- connect( clip->getMedia(), SIGNAL( snapshotAvailable() ),
+ connect( clip->media(), SIGNAL( snapshotAvailable() ),
this, SLOT( snapshotUpdated() ), Qt::QueuedConnection );
- setThumbnail( clip->getMedia()->snapshot() );
- setTitle( clip->getMedia()->fileName() );
+ setThumbnail( clip->media()->snapshot() );
+ setTitle( clip->media()->fileName() );
setLength( clip->lengthSecond() * 1000 );
}
@@ -90,7 +90,7 @@ MediaCellView::~MediaCellView()
void
MediaCellView::metadataComputingStarted( const Media *media )
{
- if ( media != m_clip->getMedia() )
+ if ( media != m_clip->media() )
return ;
//Disable the delete button to avoid deleting the media while metadata are computed.
m_ui->delLabel->setEnabled( false );
@@ -102,18 +102,18 @@ MediaCellView::metadataComputingStarted( const Media *media )
void
MediaCellView::metadataUpdated()
{
- setLength( m_clip->getMedia()->source()->length() );
+ setLength( m_clip->media()->source()->length() );
m_ui->thumbnail->setEnabled( true );
//If the media is a Video or an Image, we must wait for the snapshot to be computer
//before allowing deletion.
- if ( m_clip->getMedia()->fileType() == Media::Audio )
+ if ( m_clip->media()->fileType() == Media::Audio )
m_ui->delLabel->setEnabled( true );
}
void
MediaCellView::snapshotUpdated()
{
- setThumbnail( m_clip->getMedia()->snapshot() );
+ setThumbnail( m_clip->media()->snapshot() );
m_ui->delLabel->setEnabled( true );
}
@@ -147,7 +147,7 @@ MediaCellView::nbClipUpdated()
if ( m_clip->isRootClip() == true )
nbClips = m_clip->mediaContainer()->count();
else
- nbClips = m_clip->getParent()->mediaContainer()->count();
+ nbClips = m_clip->parent()->mediaContainer()->count();
if ( nbClips == 0 )
{
@@ -222,7 +222,7 @@ MediaCellView::mouseMoveEvent( QMouseEvent* event )
mimeData->setData( "vlmc/uuid", m_clip->uuid().toString().toLatin1() );
QDrag* drag = new QDrag( this );
drag->setMimeData( mimeData );
- Media* parent = m_clip->getMedia();
+ Media* parent = m_clip->media();
drag->setPixmap( parent->snapshot().scaled( 100, 100, Qt::KeepAspectRatio ) );
drag->exec( Qt::CopyAction | Qt::MoveAction, Qt::CopyAction );
}
@@ -294,7 +294,7 @@ MediaCellView::contextMenuEvent( QContextMenuEvent *event )
return ;
if ( copyInWorkspace == selectedAction )
{
- if ( Core::instance()->workspace()->copyToWorkspace( m_clip->getMedia() ) == false )
+ if ( Core::instance()->workspace()->copyToWorkspace( m_clip->media() ) == false )
{
QMessageBox::warning( nullptr, tr( "Can't copy to workspace" ),
tr( "Can't copy this media to workspace: %1" ).arg( Core::instance()->workspace()->lastError() ) );
diff --git a/src/Gui/library/MediaLibrary.cpp b/src/Gui/library/MediaLibrary.cpp
index d92c97a..8f5dd45 100644
--- a/src/Gui/library/MediaLibrary.cpp
+++ b/src/Gui/library/MediaLibrary.cpp
@@ -123,7 +123,7 @@ MediaLibrary::viewChanged( ViewController *view )
bool
MediaLibrary::filterByName( const Clip *clip, const QString &filter )
{
- return ( clip->getMedia()->fileName().contains( filter, Qt::CaseInsensitive ) );
+ return ( clip->media()->fileName().contains( filter, Qt::CaseInsensitive ) );
}
bool
diff --git a/src/Gui/media/ClipMetadataDisplayer.cpp b/src/Gui/media/ClipMetadataDisplayer.cpp
index 7faf8be..3d97ee8 100644
--- a/src/Gui/media/ClipMetadataDisplayer.cpp
+++ b/src/Gui/media/ClipMetadataDisplayer.cpp
@@ -98,7 +98,7 @@ ClipMetadataDisplayer::setWatchedClip( const Clip *clip )
disconnect( m_watchedClip );
m_watchedClip = clip;
- m_watchedMedia = clip->getMedia();
+ m_watchedMedia = clip->media();
connect( m_watchedClip, SIGNAL( unloaded( Clip* ) ), this, SLOT( clipDestroyed( Clip* ) ) );
if ( m_watchedMedia->source()->isParsed() == true )
metadataUpdated();
diff --git a/src/Gui/timeline/AbstractGraphicsMediaItem.cpp b/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
index 0e834df..be683d0 100644
--- a/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
+++ b/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
@@ -201,7 +201,7 @@ AbstractGraphicsMediaItem::setEmphasized( bool value )
bool
AbstractGraphicsMediaItem::hasResizeBoundaries() const
{
- return ( clipHelper()->clip()->getMedia()->fileType() != Media::Image );
+ return ( clipHelper()->clip()->media()->fileType() != Media::Image );
}
qint64
diff --git a/src/Gui/timeline/GraphicsAudioItem.cpp b/src/Gui/timeline/GraphicsAudioItem.cpp
index a5f0092..7a2b6f5 100644
--- a/src/Gui/timeline/GraphicsAudioItem.cpp
+++ b/src/Gui/timeline/GraphicsAudioItem.cpp
@@ -38,10 +38,10 @@
GraphicsAudioItem::GraphicsAudioItem( Clip* clip ) :
AbstractGraphicsMediaItem( clip )
{
- QTime length = QTime().addMSecs( clip->getMedia()->source()->length() );
+ QTime length = QTime().addMSecs( clip->media()->source()->length() );
QString tooltip( tr( "<p style='white-space:pre'><b>Name:</b> %1"
"<br><b>Length:</b> %2" )
- .arg( clip->getMedia()->fileName() )
+ .arg( clip->media()->fileName() )
.arg( length.toString("hh:mm:ss.zzz") ) );
setToolTip( tooltip );
}
@@ -51,10 +51,10 @@ GraphicsAudioItem::GraphicsAudioItem( ClipHelper* ch ) :
{
setFlags( QGraphicsItem::ItemIsSelectable );
- QTime length = QTime().addMSecs( ch->clip()->getMedia()->source()->length() );
+ QTime length = QTime().addMSecs( ch->clip()->media()->source()->length() );
QString tooltip( tr( "<p style='white-space:pre'><b>Name:</b> %1"
"<br><b>Length:</b> %2" )
- .arg( ch->clip()->getMedia()->fileName() )
+ .arg( ch->clip()->media()->fileName() )
.arg( length.toString("hh:mm:ss.zzz") ) );
setToolTip( tooltip );
setAcceptHoverEvents( true );
@@ -171,7 +171,7 @@ GraphicsAudioItem::paintTitle( QPainter* painter, const QStyleOptionGraphicsItem
// Initiate the font metrics calculation
QFontMetrics fm( painter->font() );
- QString text = m_clipHelper->clip()->getMedia()->fileName();
+ QString text = m_clipHelper->clip()->media()->fileName();
// Get the transformations required to map the text on the viewport
QTransform viewPortTransform = Timeline::instance()->tracksView()->viewportTransform();
diff --git a/src/Gui/timeline/GraphicsMovieItem.cpp b/src/Gui/timeline/GraphicsMovieItem.cpp
index 932686f..2f339db 100644
--- a/src/Gui/timeline/GraphicsMovieItem.cpp
+++ b/src/Gui/timeline/GraphicsMovieItem.cpp
@@ -37,10 +37,10 @@
GraphicsMovieItem::GraphicsMovieItem( Clip* clip ) :
AbstractGraphicsMediaItem( clip )
{
- QTime length = QTime().addMSecs( clip->getMedia()->source()->length() );
+ QTime length = QTime().addMSecs( clip->media()->source()->length() );
QString tooltip( tr( "<p style='white-space:pre'><b>Name:</b> %1"
"<br><b>Length:</b> %2" )
- .arg( clip->getMedia()->fileName() )
+ .arg( clip->media()->fileName() )
.arg( length.toString("hh:mm:ss.zzz") ) );
setToolTip( tooltip );
}
@@ -48,10 +48,10 @@ GraphicsMovieItem::GraphicsMovieItem( Clip* clip ) :
GraphicsMovieItem::GraphicsMovieItem( ClipHelper* ch ) :
AbstractGraphicsMediaItem( ch )
{
- QTime length = QTime().addMSecs( ch->clip()->getMedia()->source()->length() );
+ QTime length = QTime().addMSecs( ch->clip()->media()->source()->length() );
QString tooltip( tr( "<p style='white-space:pre'><b>Name:</b> %1"
"<br><b>Length:</b> %2" )
- .arg( ch->clip()->getMedia()->fileName() )
+ .arg( ch->clip()->media()->fileName() )
.arg( length.toString("hh:mm:ss.zzz") ) );
setToolTip( tooltip );
}
@@ -165,7 +165,7 @@ GraphicsMovieItem::paintTitle( QPainter* painter, const QStyleOptionGraphicsItem
// Initiate the font metrics calculation
QFontMetrics fm( painter->font() );
- QString text = m_clipHelper->clip()->getMedia()->fileName();
+ QString text = m_clipHelper->clip()->media()->fileName();
// Get the transformations required to map the text on the viewport
QTransform viewPortTransform = Timeline::instance()->tracksView()->viewportTransform();
diff --git a/src/Gui/timeline/TracksView.cpp b/src/Gui/timeline/TracksView.cpp
index 564a191..04b93da 100644
--- a/src/Gui/timeline/TracksView.cpp
+++ b/src/Gui/timeline/TracksView.cpp
@@ -378,8 +378,8 @@ TracksView::clipDragEnterEvent( QDragEnterEvent *event )
Clip *clip = Core::instance()->library()->clip( fullId );
if ( clip == nullptr )
return;
- bool hasVideo = clip->getMedia()->source()->hasVideo();
- bool hasAudio = clip->getMedia()->source()->hasAudio();
+ bool hasVideo = clip->media()->source()->hasVideo();
+ bool hasAudio = clip->media()->source()->hasAudio();
if ( hasAudio == false && hasVideo == false )
return ;
diff --git a/src/Library/Library.cpp b/src/Library/Library.cpp
index 64ccbc9..747ef42 100644
--- a/src/Library/Library.cpp
+++ b/src/Library/Library.cpp
@@ -124,7 +124,7 @@ Library::addClip( Clip *clip )
bool ret = MediaContainer::addClip( clip );
if ( ret != false )
setCleanState( false );
- m_medias[clip->getMedia()->fileInfo()->absoluteFilePath()] = clip->getMedia();
+ m_medias[clip->media()->fileInfo()->absoluteFilePath()] = clip->media();
return ret;
}
diff --git a/src/Library/MediaContainer.cpp b/src/Library/MediaContainer.cpp
index cb00d33..a0b3364 100644
--- a/src/Library/MediaContainer.cpp
+++ b/src/Library/MediaContainer.cpp
@@ -84,7 +84,7 @@ MediaContainer::addMedia( const QFileInfo& fileInfo )
}
foreach( Clip* it, m_clips.values() )
{
- if ( (*it->getMedia()->fileInfo()) == fileInfo )
+ if ( (*it->media()->fileInfo()) == fileInfo )
{
vlmcWarning() << "Ignoring aleady imported media" << fileInfo.absolutePath();
return nullptr;
@@ -99,7 +99,7 @@ MediaContainer::mediaAlreadyLoaded( const QFileInfo& fileInfo )
{
foreach( Clip* clip, m_clips.values() )
{
- if ( clip->getMedia()->fileInfo()->filePath() == fileInfo.filePath() )
+ if ( clip->media()->fileInfo()->filePath() == fileInfo.filePath() )
return true;
}
return false;
@@ -111,7 +111,7 @@ MediaContainer::addClip( Clip* clip )
foreach ( Clip* c, m_clips.values() )
{
if ( clip->uuid() == c->uuid() ||
- ( clip->getMedia()->fileInfo() == c->getMedia()->fileInfo() &&
+ ( clip->media()->fileInfo() == c->media()->fileInfo() &&
( clip->begin() == c->begin() && clip->end() == c->end() ) ) )
{
vlmcWarning() << "Clip already loaded.";
diff --git a/src/Media/Clip.cpp b/src/Media/Clip.cpp
index 7be0ba5..4f29f8e 100644
--- a/src/Media/Clip.cpp
+++ b/src/Media/Clip.cpp
@@ -55,7 +55,7 @@ Clip::Clip( Media *media, qint64 begin /*= 0*/, qint64 end /*= -1*/, const QStri
Clip::Clip( Clip *parent, qint64 begin /*= -1*/, qint64 end /*= -1*/,
const QString &uuid /*= QString()*/ ) :
- m_media( parent->getMedia() ),
+ m_media( parent->media() ),
m_begin( begin ),
m_end( end ),
m_rootClip( parent->rootClip() ),
@@ -82,13 +82,13 @@ Clip::~Clip()
}
Media*
-Clip::getMedia()
+Clip::media()
{
return m_media;
}
const Media*
-Clip::getMedia() const
+Clip::media() const
{
return m_media;
}
@@ -183,13 +183,13 @@ Clip::isRootClip() const
}
Clip*
-Clip::getParent()
+Clip::parent()
{
return m_parent;
}
const Clip*
-Clip::getParent() const
+Clip::parent() const
{
return m_parent;
}
diff --git a/src/Media/Clip.h b/src/Media/Clip.h
index b1fd525..5fb5997 100644
--- a/src/Media/Clip.h
+++ b/src/Media/Clip.h
@@ -93,11 +93,11 @@ class Clip : public QObject
/**
\return Returns the Media that the clip was basep uppon.
*/
- Media* getMedia();
- const Media* getMedia() const;
+ Media* media();
+ const Media* media() const;
- Clip *getParent();
- const Clip *getParent() const;
+ Clip *parent();
+ const Clip *parent() const;
MediaContainer* mediaContainer();
const MediaContainer* mediaContainer() const;
diff --git a/src/Project/Workspace.cpp b/src/Project/Workspace.cpp
index 4c4b056..51b96d8 100644
--- a/src/Project/Workspace.cpp
+++ b/src/Project/Workspace.cpp
@@ -118,9 +118,9 @@ Workspace::clipLoaded( Clip *clip )
if ( clip->isRootClip() == false )
return ;
//If already in workspace : well...
- if ( isInWorkspace( clip->getMedia() ) == true )
+ if ( isInWorkspace( clip->media() ) == true )
return ;
- copyToWorkspace( clip->getMedia() );
+ copyToWorkspace( clip->media() );
}
void
diff --git a/src/Renderer/ClipRenderer.cpp b/src/Renderer/ClipRenderer.cpp
index 318d6bd..13bf721 100644
--- a/src/Renderer/ClipRenderer.cpp
+++ b/src/Renderer/ClipRenderer.cpp
@@ -88,7 +88,7 @@ ClipRenderer::startPreview()
updateInfos( m_selectedClip );
delete m_sourceRenderer;
- m_sourceRenderer = m_selectedClip->getMedia()->source()->createRenderer( m_eventWatcher );
+ m_sourceRenderer = m_selectedClip->media()->source()->createRenderer( m_eventWatcher );
m_sourceRenderer->setOutputWidget( (void *) static_cast< RenderWidget* >( m_renderWidget )->id() );
connect( m_eventWatcher, SIGNAL( stopped() ), this, SLOT( videoStopped() ) );
@@ -100,7 +100,7 @@ ClipRenderer::startPreview()
connect( m_eventWatcher, SIGNAL( timeChanged( qint64 ) ), this, SLOT( timeChanged( qint64 ) ) );
m_sourceRenderer->start();
- m_sourceRenderer->setPosition( (float)m_begin / (float)m_selectedClip->getMedia()->source()->nbFrames() );
+ m_sourceRenderer->setPosition( (float)m_begin / (float)m_selectedClip->media()->source()->nbFrames() );
m_clipLoaded = true;
m_isRendering = true;
m_paused = false;
@@ -175,7 +175,7 @@ ClipRenderer::previousFrame()
Q_ASSERT( m_paused == true );
}
/* FIXME: Implement a better way to render previous frame */
- qint64 interval = static_cast<qint64>( qCeil(1000.0f * 2.0f / m_selectedClip->getMedia()->source()->fps() ) );
+ qint64 interval = static_cast<qint64>( qCeil(1000.0f * 2.0f / m_selectedClip->media()->source()->fps() ) );
m_sourceRenderer->setTime( m_sourceRenderer->time() - interval );
m_sourceRenderer->nextFrame();
}
@@ -191,7 +191,7 @@ qint64
ClipRenderer::getLengthMs() const
{
if ( m_selectedClip )
- return ( qRound64( (qreal)( m_end - m_begin ) / m_selectedClip->getMedia()->source()->fps() * 1000.0 ) );
+ return ( qRound64( (qreal)( m_end - m_begin ) / m_selectedClip->media()->source()->fps() * 1000.0 ) );
return 0;
}
@@ -214,14 +214,14 @@ ClipRenderer::getCurrentFrame() const
if ( m_clipLoaded == false || m_isRendering == false || m_selectedClip == nullptr )
return 0;
return qRound64( (qreal)m_sourceRenderer->time() / 1000 *
- (qreal)m_selectedClip->getMedia()->source()->fps() );
+ (qreal)m_selectedClip->media()->source()->fps() );
}
float
ClipRenderer::getFps() const
{
if ( m_selectedClip != nullptr )
- return m_selectedClip->getMedia()->source()->fps();
+ return m_selectedClip->media()->source()->fps();
return 0.0f;
}
@@ -237,7 +237,7 @@ ClipRenderer::previewWidgetCursorChanged( qint64 newFrame )
if ( m_isRendering == true )
{
newFrame += m_begin;
- qint64 nbSeconds = qRound64( (qreal)newFrame / m_selectedClip->getMedia()->source()->fps() );
+ qint64 nbSeconds = qRound64( (qreal)newFrame / m_selectedClip->media()->source()->fps() );
m_sourceRenderer->setTime( nbSeconds * 1000 );
}
}
@@ -271,7 +271,7 @@ ClipRenderer::videoPlaying()
void
ClipRenderer::timeChanged( qint64 time )
{
- float fps = m_selectedClip->getMedia()->source()->fps();
+ float fps = m_selectedClip->media()->source()->fps();
qint64 f = qRound64( (qreal)time / 1000.0 * fps );
if ( f >= m_end )
return ;
diff --git a/src/Workflow/ClipWorkflow.cpp b/src/Workflow/ClipWorkflow.cpp
index 707a96a..f7fa55c 100644
--- a/src/Workflow/ClipWorkflow.cpp
+++ b/src/Workflow/ClipWorkflow.cpp
@@ -68,7 +68,7 @@ ClipWorkflow::initialize()
m_state = ClipWorkflow::Initializing;
delete m_renderer;
- m_renderer = m_clipHelper->clip()->getMedia()->source()->createRenderer( m_eventWatcher );
+ m_renderer = m_clipHelper->clip()->media()->source()->createRenderer( m_eventWatcher );
preallocate();
initializeInternals();
@@ -104,11 +104,11 @@ ClipWorkflow::loadingComplete()
void
ClipWorkflow::adjustBegin()
{
- if ( m_clipHelper->clip()->getMedia()->fileType() == Media::Video ||
- m_clipHelper->clip()->getMedia()->fileType() == Media::Audio )
+ if ( m_clipHelper->clip()->media()->fileType() == Media::Video ||
+ m_clipHelper->clip()->media()->fileType() == Media::Audio )
{
m_renderer->setTime( m_clipHelper->begin() /
- m_clipHelper->clip()->getMedia()->source()->fps() * 1000 );
+ m_clipHelper->clip()->media()->source()->fps() * 1000 );
}
}
diff --git a/src/Workflow/TrackWorkflow.cpp b/src/Workflow/TrackWorkflow.cpp
index bc77e20..acb2e2d 100644
--- a/src/Workflow/TrackWorkflow.cpp
+++ b/src/Workflow/TrackWorkflow.cpp
@@ -82,7 +82,7 @@ TrackWorkflow::addClip( ClipHelper* ch, qint64 start )
ClipWorkflow* cw;
if ( m_trackType == Workflow::VideoTrack )
{
- if ( ch->clip()->getMedia()->fileType() == Media::Video )
+ if ( ch->clip()->media()->fileType() == Media::Video )
cw = new VideoClipWorkflow( ch );
else
cw = new ImageClipWorkflow( ch );
@@ -529,7 +529,7 @@ TrackWorkflow::clear()
void
TrackWorkflow::adjustClipTime( qint64 currentFrame, qint64 start, ClipWorkflow* cw )
{
- float fps = cw->clip()->getMedia()->source()->fps();
+ float fps = cw->clip()->media()->source()->fps();
qint64 nbMs = ( currentFrame - start ) / fps * 1000;
qint64 beginInMs = cw->getClipHelper()->begin() / fps * 1000;
qint64 startFrame = beginInMs + nbMs;
--
1.9.1
More information about the Vlmc-devel
mailing list