Exemple #1
0
MeltJob::MeltJob(const QString& name, const QString& xml, int frameRateNum, int frameRateDen)
    : AbstractJob(name)
    , m_isStreaming(false)
    , m_previousPercent(0)
    , m_currentFrame(0)
    , m_useMultiConsumer(false)
{
    if (!xml.isEmpty()) {
        QAction* action = new QAction(tr("View XML"), this);
        action->setToolTip(tr("View the MLT XML for this job"));
        connect(action, SIGNAL(triggered()), this, SLOT(onViewXmlTriggered()));
        m_standardActions << action;
        m_xml.setFileTemplate(QDir::tempPath().append("/shotcut-XXXXXX.mlt"));
        m_xml.open();
        m_xml.write(xml.toUtf8());
        m_xml.close();
    } else {
        // Not an EncodeJob
        QAction* action = new QAction(tr("Open"), this);
        action->setToolTip(tr("Open the output file in the Shotcut player"));
        connect(action, SIGNAL(triggered()), this, SLOT(onOpenTiggered()));
        m_successActions << action;
    
        action = new QAction(tr("Show In Folder"), this);
        action->setToolTip(tr("Show In Folder"));
        connect(action, SIGNAL(triggered()), this, SLOT(onShowFolderTriggered()));
        m_successActions << action;
    }
    if (frameRateNum > 0 && frameRateDen > 0)
        m_profile.set_frame_rate(frameRateNum, frameRateDen);
}
Exemple #2
0
MeltJob::MeltJob(const QString& name, const QString& xml)
    : AbstractJob(name)
    , m_xml(xml)
{
    QAction* action = new QAction(tr("View XML"), this);
    action->setToolTip(tr("View the MLT XML for this job"));
    connect(action, SIGNAL(triggered()), this, SLOT(onViewXmlTriggered()));
    m_standardActions << action;
}
Exemple #3
0
MeltJob::MeltJob(const QString& name, const QString& xml)
    : AbstractJob(name)
    , m_xml(QDir::tempPath().append("/shotcut-XXXXXX.mlt"))
    , m_isStreaming(false)
{
    QAction* action = new QAction(tr("View XML"), this);
    action->setToolTip(tr("View the MLT XML for this job"));
    connect(action, SIGNAL(triggered()), this, SLOT(onViewXmlTriggered()));
    m_standardActions << action;
    m_xml.open();
    m_xml.write(xml.toUtf8());
    m_xml.close();
}