Skip to content

Commit

Permalink
Refactor to Mlt::Tractor(Mlt::Profile) ctor.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Jan 30, 2015
1 parent 7d81096 commit d242e21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/jobs/encodejob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,11 @@ void EncodeJob::onVideoQualityTriggered()
tmpName.append(".mlt");

// Generate the XML for the comparison.
Mlt::Tractor tractor;
Mlt::Tractor tractor(MLT.profile());
Mlt::Producer original(MLT.profile(), xmlPath().toUtf8().constData());
Mlt::Producer encoded(MLT.profile(), objectName().toUtf8().constData());
Mlt::Transition vqm(MLT.profile(), "vqm");
if (original.is_valid() && encoded.is_valid() && vqm.is_valid()) {
tractor.set_profile(MLT.profile());
tractor.set_track(original, 0);
tractor.set_track(encoded, 1);
tractor.plant_transition(vqm);
Expand Down
6 changes: 2 additions & 4 deletions src/models/multitrackmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2096,8 +2096,7 @@ void MultitrackModel::audioLevelsReady(const QModelIndex& index)
bool MultitrackModel::createIfNeeded()
{
if (!m_tractor) {
m_tractor = new Mlt::Tractor;
m_tractor->set_profile(MLT.profile());
m_tractor = new Mlt::Tractor(MLT.profile());
MLT.profile().set_explicit(true);
m_tractor->set("shotcut", 1);
retainPlaylist();
Expand Down Expand Up @@ -2148,8 +2147,7 @@ void MultitrackModel::adjustBackgroundDuration()
void MultitrackModel::addAudioTrack()
{
if (!m_tractor) {
m_tractor = new Mlt::Tractor;
m_tractor->set_profile(MLT.profile());
m_tractor = new Mlt::Tractor(MLT.profile());
MLT.profile().set_explicit(true);
m_tractor->set("shotcut", 1);
retainPlaylist();
Expand Down

0 comments on commit d242e21

Please sign in to comment.