本文整理汇总了C++中mlt::Producer::profile方法的典型用法代码示例。如果您正苦于以下问题:C++ Producer::profile方法的具体用法?C++ Producer::profile怎么用?C++ Producer::profile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mlt::Producer
的用法示例。
在下文中一共展示了Producer::profile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: duplicateFilters
void BinController::duplicateFilters(Mlt::Producer original, Mlt::Producer clone)
{
Mlt::Service clipService(original.get_service());
Mlt::Service dupService(clone.get_service());
//delete original;
//delete clone;
int ct = 0;
Mlt::Filter *filter = clipService.filter(ct);
while (filter) {
// Only duplicate Kdenlive filters, and skip the fade in effects
//fprintf(stderr, "CHKNG FILTER: %s\n", filter->get("kdenlive_id"));
if (filter->is_valid()/* && strcmp(filter->get("kdenlive_id"), "") && strcmp(filter->get("kdenlive_id"), "fadein") && strcmp(filter->get("kdenlive_id"), "fade_from_black")*/) {
// looks like there is no easy way to duplicate a filter,
// so we will create a new one and duplicate its properties
Mlt::Filter *dup = new Mlt::Filter(*original.profile(), filter->get("mlt_service"));
if (dup && dup->is_valid()) {
Mlt::Properties entries(filter->get_properties());
for (int i = 0; i < entries.count(); ++i) {
dup->set(entries.get_name(i), entries.get(i));
}
dupService.attach(*dup);
}
}
ct++;
filter = clipService.filter(ct);
}
}
示例2: getProducerXML
QString BinController::getProducerXML(Mlt::Producer &producer)
{
QString filename = QStringLiteral("string");
Mlt::Consumer c(*producer.profile(), "xml", filename.toUtf8().constData());
Mlt::Service s(producer.get_service());
if (!s.is_valid())
return QLatin1String("");
int ignore = s.get_int("ignore_points");
if (ignore)
s.set("ignore_points", 0);
c.set("time_format", "frames");
c.set("no_meta", 1);
c.set("store", "kdenlive");
if (filename != QLatin1String("string")) {
c.set("no_root", 1);
c.set("root", QFileInfo(filename).absolutePath().toUtf8().constData());
}
c.connect(s);
c.start();
if (ignore)
s.set("ignore_points", ignore);
return QString::fromUtf8(c.get(filename.toUtf8().constData()));
}