当前位置: 首页>>代码示例>>C++>>正文


C++ Producer::set方法代码示例

本文整理汇总了C++中mlt::Producer::set方法的典型用法代码示例。如果您正苦于以下问题:C++ Producer::set方法的具体用法?C++ Producer::set怎么用?C++ Producer::set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mlt::Producer的用法示例。


在下文中一共展示了Producer::set方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: newProducer

Mlt::Producer* JackProducerWidget::newProducer(Mlt::Profile& profile)
{
    Mlt::Producer* p = new Mlt::Producer(profile, "jack:Shotcut");
    p->set(kBackgroundCaptureProperty, 1);
    p->set(kShotcutCaptionProperty, "JACK");
    return p;
}
开发者ID:bmatherly,项目名称:shotcut,代码行数:7,代码来源:jackproducerwidget.cpp

示例2: producer

Mlt::Producer* IsingWidget::producer(Mlt::Profile& profile)
{
    Mlt::Producer* p = new Mlt::Producer(profile, "frei0r.ising0r");
    p->set(kParamTemperature, ui->tempSpinner->text().toLatin1().constData());
    p->set(kParamBorderGrowth, ui->borderGrowthSpinner->text().toLatin1().constData());
    p->set(kParamSpontaneous, ui->spontGrowthSpinner->text().toLatin1().constData());
    return p;
}
开发者ID:AresDice,项目名称:shotcut,代码行数:8,代码来源:isingwidget.cpp

示例3: producer

Mlt::Producer* PlasmaWidget::producer(Mlt::Profile& profile)
{
    Mlt::Producer* p = new Mlt::Producer(profile, "frei0r.plasma");
    p->set(kParamSpeed1, ui->speed1Spinner->text().toAscii().constData());
    p->set(kParamSpeed2, ui->speed2Spinner->text().toAscii().constData());
    p->set(kParamSpeed3, ui->speed3Spinner->text().toAscii().constData());
    p->set(kParamSpeed4, ui->speed4Spinner->text().toAscii().constData());
    p->set(kParamMove1, ui->move1Spinner->text().toAscii().constData());
    p->set(kParamMove2, ui->move2Spinner->text().toAscii().constData());
    return p;
}
开发者ID:GNUmedia,项目名称:shotcut,代码行数:11,代码来源:plasmawidget.cpp

示例4: newProducer

Mlt::Producer* AlsaWidget::newProducer(Mlt::Profile& profile)
{
    QString s("alsa:%1");
    if (ui->lineEdit->text().isEmpty())
        s = s.arg("default");
    else
        s = s.arg(ui->lineEdit->text());
    if (ui->alsaChannelsSpinBox->value() > 0)
        s += QString("?channels=%1").arg(ui->alsaChannelsSpinBox->value());
    Mlt::Producer* p = new Mlt::Producer(profile, s.toUtf8().constData());
    p->set(kBackgroundCaptureProperty, 1);
    p->set(kShotcutCaptionProperty, "ALSA");
    return p;
}
开发者ID:bmatherly,项目名称:shotcut,代码行数:14,代码来源:alsawidget.cpp

示例5: getBinProducer

Mlt::Producer *BinController::getBinVideoProducer(const QString &id)
{
    QString videoId = id + "_video";
    if (!m_extraClipList.contains(videoId)) {
        // create clone
        QString originalId = id.section(QStringLiteral("_"), 0, 0);
        Mlt::Producer *original = getBinProducer(originalId);
        Mlt::Producer *videoOnly = cloneProducer(*original);
        videoOnly->set("audio_index", -1);
        videoOnly->set("id", videoId.toUtf8().constData());
        m_extraClipList.insert(videoId, videoOnly);
        return videoOnly;
    }
    return m_extraClipList.value(videoId);
}
开发者ID:dreamsxin,项目名称:kdenlive,代码行数:15,代码来源:bincontroller.cpp

示例6: producer

Mlt::Producer* DecklinkProducerWidget::producer(Mlt::Profile& profile)
{
    Mlt::Producer* p = new Mlt::Producer(profile,
        QString("consumer:decklink:%1").arg(ui->deviceCombo->currentIndex()).toAscii().constData());
    if (p->is_valid())
        p->set("profile", ui->profileCombo->itemData(ui->profileCombo->currentIndex()).toString().toAscii().constData());
    return p;
}
开发者ID:eddrog,项目名称:shotcut,代码行数:8,代码来源:decklinkproducerwidget.cpp

示例7: undo

void ClearCommand::undo()
{
    m_model.close();
    Mlt::Producer* producer = new Mlt::Producer(MLT.profile(), "xml-string", m_xml.toUtf8().constData());
    if (producer->is_valid()) {
        producer->set("resource", "<playlist>");
        MAIN.open(producer);
        MLT.pause();
        MAIN.seekPlaylist(0);
    }
}
开发者ID:AresDice,项目名称:shotcut,代码行数:11,代码来源:playlistcommands.cpp

示例8: producer

Mlt::Producer* ColorBarsWidget::producer(Mlt::Profile& profile)
{
    Mlt::Producer* p = new Mlt::Producer(profile, "frei0r.test_pat_B");
    p->set(kParamType, ui->comboBox->currentIndex());
    if (profile.sample_aspect_num() == 16 && profile.sample_aspect_den() == 15)
        p->set(kParamAspect, map_value_backward(ASPECT_PAL, 0, 6.9999));
    else if (profile.sample_aspect_num() == 64 && profile.sample_aspect_den() == 45)
        p->set(kParamAspect, map_value_backward(ASPECT_PAL_WIDE, 0, 6.9999));
    else if (profile.sample_aspect_num() == 8 && profile.sample_aspect_den() == 9)
        p->set(kParamAspect, map_value_backward(ASPECT_NTSC, 0, 6.9999));
    else if (profile.sample_aspect_num() == 32 && profile.sample_aspect_den() == 27)
        p->set(kParamAspect, map_value_backward(ASPECT_NTSC_WIDE, 0, 6.9999));
    else if (profile.sample_aspect_num() == 4 && profile.sample_aspect_den() == 3)
        p->set(kParamAspect, map_value_backward(ASPECT_HDV, 0, 6.9999));
    p->set(kShotcutCaptionProperty, ui->comboBox->currentText().toUtf8().constData());
    p->set(kShotcutDetailProperty, ui->comboBox->currentText().toUtf8().constData());
    return p;
}
开发者ID:Sunderland93,项目名称:shotcut,代码行数:18,代码来源:colorbarswidget.cpp

示例9: newProducer

Mlt::Producer* CountProducerWidget::newProducer(Mlt::Profile& profile)
{
    Mlt::Producer* p = new Mlt::Producer(profile, "count:");
    p->set("direction", currentDirection().toLatin1().constData());
    p->set("style", currentStyle().toLatin1().constData());
    p->set("sound", currentSound().toLatin1().constData());
    p->set("background", currentBackground().toLatin1().constData());
    p->set("drop", ui->dropCheckBox->isChecked());
    setLength(p, ui->durationSpinBox->value());
    p->set(kShotcutCaptionProperty, ui->nameLabel->text().toUtf8().constData());
    p->set(kShotcutDetailProperty, detail().toUtf8().constData());
    return p;
}
开发者ID:bmatherly,项目名称:shotcut,代码行数:13,代码来源:countproducerwidget.cpp

示例10: replaceProducer

void BinController::replaceProducer(const QString &id, Mlt::Producer &producer)
{
    ClipController *ctrl = m_clipList.value(id);
    if (!ctrl) {
        qDebug()<<" / // error controller not found, crashing";
        return;
    }
    pasteEffects(id, producer);
    ctrl->updateProducer(id, &producer);
    replaceBinPlaylistClip(id, producer);
    emit prepareTimelineReplacement(id);
    producer.set("id", id.toUtf8().constData());
    // Remove video only producer
    QString videoId = id + "_video";
    if (m_extraClipList.contains(videoId)) {
        m_extraClipList.remove(videoId);
    }
    removeBinPlaylistClip("#" + id);
    emit replaceTimelineProducer(id);
}
开发者ID:dreamsxin,项目名称:kdenlive,代码行数:20,代码来源:bincontroller.cpp

示例11: ntscProfile

Mlt::Producer* Video4LinuxWidget::newProducer(Mlt::Profile& profile)
{
    if (!profile.is_explicit()) {
        Mlt::Profile ntscProfile("dv_ntsc");
        Mlt::Profile palProfile("dv_pal");
        if (ui->v4lWidthSpinBox->value() == ntscProfile.width() && ui->v4lHeightSpinBox->value() == ntscProfile.height()) {
            profile.set_sample_aspect(ntscProfile.sample_aspect_num(), ntscProfile.sample_aspect_den());
            profile.set_progressive(ntscProfile.progressive());
            profile.set_colorspace(ntscProfile.colorspace());
            profile.set_frame_rate(ntscProfile.frame_rate_num(), ntscProfile.frame_rate_den());
        } else if (ui->v4lWidthSpinBox->value() == palProfile.width() && ui->v4lHeightSpinBox->value() == palProfile.height()) {
            profile.set_sample_aspect(palProfile.sample_aspect_num(), palProfile.sample_aspect_den());
            profile.set_progressive(palProfile.progressive());
            profile.set_colorspace(palProfile.colorspace());
            profile.set_frame_rate(palProfile.frame_rate_num(), palProfile.frame_rate_den());
        } else {
            profile.set_width(ui->v4lWidthSpinBox->value());
            profile.set_height(ui->v4lHeightSpinBox->value());
            profile.set_sample_aspect(1, 1);
            profile.set_progressive(1);
            profile.set_colorspace(601);
            profile.set_frame_rate(ui->v4lFramerateSpinBox->value() * 10000, 10000);
        }
    }
    Mlt::Producer* p = new Mlt::Producer(profile, URL().toLatin1().constData());
    if (!p->is_valid()) {
        delete p;
        p = new Mlt::Producer(profile, "color:");
        p->set("resource1", QString("video4linux2:%1")
               .arg(ui->v4lLineEdit->text()).toLatin1().constData());
        p->set("error", 1);
    }
    else if (m_audioWidget) {
        Mlt::Producer* audio = dynamic_cast<AbstractProducerWidget*>(m_audioWidget)->newProducer(profile);
        Mlt::Tractor* tractor = new Mlt::Tractor;
        tractor->set("_profile", profile.get_profile(), 0);
        tractor->set_track(*p, 0);
        delete p;
        tractor->set_track(*audio, 1);
        delete audio;
        p = new Mlt::Producer(tractor->get_producer());
        delete tractor;
        p->set("resource1", QString("video4linux2:%1")
               .arg(ui->v4lLineEdit->text()).toLatin1().constData());
    }
    p->set("device", ui->v4lLineEdit->text().toLatin1().constData());
    p->set("width", ui->v4lWidthSpinBox->value());
    p->set("height", ui->v4lHeightSpinBox->value());
    if (ui->v4lFramerateSpinBox->value() > 0)
        p->set("framerate", ui->v4lFramerateSpinBox->value());
    p->set("standard", ui->v4lStandardCombo->currentText().toLatin1().constData());
    p->set("channel", ui->v4lChannelSpinBox->value());
    p->set("audio_ix", ui->v4lAudioComboBox->currentIndex());
    p->set("force_seekable", 0);
    p->set(kBackgroundCaptureProperty, 1);
    p->set(kShotcutCaptionProperty, "Video4Linux");
    return p;
}
开发者ID:bmatherly,项目名称:shotcut,代码行数:58,代码来源:video4linuxwidget.cpp

示例12: ntscProfile

Mlt::Producer *DirectShowVideoWidget::producer(Mlt::Profile& profile)
{
#if 0
    if (!profile.is_explicit()) {
        Mlt::Profile ntscProfile("dv_ntsc");
        Mlt::Profile palProfile("dv_pal");
        if (ui->v4lWidthSpinBox->value() == ntscProfile.width() && ui->v4lHeightSpinBox->value() == ntscProfile.height()) {
            profile.set_sample_aspect(ntscProfile.sample_aspect_num(), ntscProfile.sample_aspect_den());
            profile.set_progressive(ntscProfile.progressive());
            profile.set_colorspace(ntscProfile.colorspace());
            profile.set_frame_rate(ntscProfile.frame_rate_num(), ntscProfile.frame_rate_den());
        } else if (ui->v4lWidthSpinBox->value() == palProfile.width() && ui->v4lHeightSpinBox->value() == palProfile.height()) {
            profile.set_sample_aspect(palProfile.sample_aspect_num(), palProfile.sample_aspect_den());
            profile.set_progressive(palProfile.progressive());
            profile.set_colorspace(palProfile.colorspace());
            profile.set_frame_rate(palProfile.frame_rate_num(), palProfile.frame_rate_den());
        } else {
            profile.set_width(ui->v4lWidthSpinBox->value());
            profile.set_height(ui->v4lHeightSpinBox->value());
            profile.set_sample_aspect(1, 1);
            profile.set_progressive(1);
            profile.set_colorspace(601);
            profile.set_frame_rate(ui->v4lFramerateSpinBox->value() * 10000, 10000);
        }
    }
#endif
    Mlt::Producer* p = 0;
    if (ui->videoCombo->currentIndex() > 0) {
        p = new Mlt::Producer(profile, QString("dshow:video=%1")
                          .arg(ui->videoCombo->currentText())
                          .toLatin1().constData());
    }
    if (ui->audioCombo->currentIndex() > 0) {
        Mlt::Producer* audio = new Mlt::Producer(profile,
            QString("dshow:audio=%1").arg(ui->audioCombo->currentText())
                                     .toLatin1().constData());
        if (p && p->is_valid() && audio->is_valid()) {
            Mlt::Tractor* tractor = new Mlt::Tractor;
            tractor->set("_profile", profile.get_profile(), 0);
            tractor->set("resource", p->get("resource"));
            tractor->set("resource2", audio->get("resource"));
            tractor->set_track(*p, 0);
            delete p;
            tractor->set_track(*audio, 1);
            delete audio;
            p = tractor;
        } else {
            p = audio;
        }
    }
    if (!p || !p->is_valid()) {
        delete p;
        p = new Mlt::Producer(profile, "color:");
        if (ui->videoCombo->currentIndex() > 0) {
            p->set("resource", QString("dshow:video=%1")
                   .arg(ui->videoCombo->currentText())
                   .toLatin1().constData());
        }
        if (ui->audioCombo->currentIndex() > 0) {
            QString resource = QString("dshow:audio=%1").arg(ui->audioCombo->currentText());
            if (ui->videoCombo->currentIndex() > 0) {
                p->set("resource2", resource.toLatin1().constData());
            } else {
                p->set("resource", resource.toLatin1().constData());
            }
        }
        p->set("error", 1);
    }
    p->set("force_seekable", 0);
    return p;
}
开发者ID:Sunderland93,项目名称:shotcut,代码行数:71,代码来源:directshowvideowidget.cpp


注:本文中的mlt::Producer::set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。