本文整理汇总了C++中mlt::Producer::pass_list方法的典型用法代码示例。如果您正苦于以下问题:C++ Producer::pass_list方法的具体用法?C++ Producer::pass_list怎么用?C++ Producer::pass_list使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mlt::Producer
的用法示例。
在下文中一共展示了Producer::pass_list方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: on_durationSpinBox_editingFinished
void ImageProducerWidget::on_durationSpinBox_editingFinished()
{
if (!m_producer)
return;
if (ui->durationSpinBox->value() == m_producer->get_out() + 1)
return;
Mlt::Producer* p = producer(MLT.profile());
p->pass_list(*m_producer, "force_aspect_ratio, shotcut_aspect_num, shotcut_aspect_den,"
"shotcut_resource, resource, ttl, shotcut_sequence");
reopen(p);
}
示例2: on_sequenceCheckBox_clicked
void ImageProducerWidget::on_sequenceCheckBox_clicked(bool checked)
{
QString resource = m_producer->get("resource");
ui->repeatSpinBox->setEnabled(checked);
if (checked && !m_producer->get(kShotcutResourceProperty))
m_producer->set(kShotcutResourceProperty, resource.toUtf8().constData());
m_producer->set(kShotcutSequenceProperty, checked);
m_producer->set("ttl", ui->repeatSpinBox->value());
if (checked) {
QFileInfo info(resource);
QString name(info.fileName());
QString begin = "";
int i = name.length();
int count = 0;
// find the last numeric digit
for (; i && !name[i - 1].isDigit(); i--) {};
// count the digits and build the begin value
for (; i && name[i - 1].isDigit(); i--, count++)
begin.prepend(name[i - 1]);
if (count) {
m_producer->set("begin", begin.toLatin1().constData());
int j = begin.toInt();
name.replace(i, count, begin.prepend('%').append('d'));
resource = info.path() + "/" + name;
m_producer->set("resource", resource.toUtf8().constData());
// Count the number of consecutive files.
MAIN.showStatusMessage(tr("Getting length of image sequence..."));
name = info.fileName();
name.replace(i, count, "%1");
resource = info.path().append('/').append(name);
for (i = j; QFile::exists(resource.arg(i, count, 10, QChar('0'))); ++i);
i -= j;
m_producer->set("length", i);
ui->durationSpinBox->setValue(i);
MAIN.showStatusMessage(tr("Reloading image sequence..."));
}
}
else {
m_producer->set("resource", m_producer->get(kShotcutResourceProperty));
m_producer->set("length", qRound(MLT.profile().fps() * 600));
ui->durationSpinBox->setValue(qRound(MLT.profile().fps() * Settings.imageDuration()));
}
Mlt::Producer* p = producer(MLT.profile());
p->pass_list(*m_producer, "force_aspect_ratio,"
kAspectRatioNumerator "," kAspectRatioDenominator ","
kShotcutResourceProperty ", resource, ttl, length," kShotcutSequenceProperty);
reopen(p);
}