void Video4LinuxWidget::on_applyButton_clicked() { MLT.close(); AbstractProducerWidget::setProducer(0); emit producerChanged(0); QCoreApplication::processEvents(); Mlt::Producer* p = newProducer(MLT.profile()); AbstractProducerWidget::setProducer(p); MLT.setProducer(p); MLT.play(); emit producerChanged(p); }
void CountProducerWidget::on_dropCheckBox_clicked(bool checked) { if (m_producer) { m_producer->set("drop", checked); emit producerChanged(producer()); } }
void CountProducerWidget::on_backgroundCombo_activated(int /*index*/) { if (m_producer) { m_producer->set("background", currentBackground().toLatin1().constData()); emit producerChanged(producer()); } }
void CountProducerWidget::loadPreset(Mlt::Properties& p) { if (!p.get("direction") || !p.get("style")) return; int index = -1; index = ui->directionCombo->findData(QVariant(p.get("direction"))); ui->directionCombo->setCurrentIndex(index); index = ui->styleCombo->findData(QVariant(p.get("style"))); ui->styleCombo->setCurrentIndex(index); index = ui->soundCombo->findData(QVariant(p.get("sound"))); ui->soundCombo->setCurrentIndex(index); index = ui->backgroundCombo->findData(QVariant(p.get("background"))); ui->backgroundCombo->setCurrentIndex(index); ui->dropCheckBox->setChecked(p.get("drop")); ui->durationSpinBox->setValue(p.get_int("length")); if (m_producer) { m_producer->set("direction", p.get("direction")); m_producer->set("style", p.get("style")); m_producer->set("sound", p.get("sound")); m_producer->set("background", p.get("background")); m_producer->set("drop", p.get("drop")); setLength(producer(), ui->durationSpinBox->value()); m_producer->set(kShotcutDetailProperty, detail().toUtf8().constData()); emit producerChanged(producer()); } }
void CountProducerWidget::on_styleCombo_activated(int /*index*/) { if (m_producer) { m_producer->set("style", currentStyle().toLatin1().constData()); m_producer->set(kShotcutDetailProperty, detail().toUtf8().constData()); emit producerChanged(producer()); } }
void IsingWidget::on_spontGrowthDial_valueChanged(int value) { if (m_producer) { m_producer->set(kParamSpontaneous, value/100.0); emit producerChanged(); } ui->spontGrowthSpinner->setValue(value/100.0); }
void IsingWidget::on_borderGrowthDial_valueChanged(int value) { if (m_producer) { m_producer->set(kParamBorderGrowth, value/100.0); emit producerChanged(); } ui->borderGrowthSpinner->setValue(value/100.0); }
void IsingWidget::on_tempDial_valueChanged(int value) { if (m_producer) { m_producer->set(kParamTemperature, value/100.0); emit producerChanged(); } ui->tempSpinner->setValue(value/100.0); }
void PlasmaWidget::on_move1Dial_valueChanged(int value) { if (m_producer) { m_producer->set(kParamMove1, value/100.0); emit producerChanged(); } ui->move1Spinner->setValue(value/100.0); }
void PlasmaWidget::on_speed4Dial_valueChanged(int value) { if (m_producer) { m_producer->set(kParamSpeed4, value/100.0); emit producerChanged(); } ui->speed4Spinner->setValue(value/100.0); }
void ColorBarsWidget::on_comboBox_activated(int index) { if (m_producer) { m_producer->set(kParamType, index); m_producer->set(kShotcutCaptionProperty, ui->comboBox->currentText().toUtf8().constData()); m_producer->set(kShotcutDetailProperty, ui->comboBox->currentText().toUtf8().constData()); emit producerChanged(m_producer); } }
void DecklinkProducerWidget::on_deviceCombo_activated(int /*index*/) { if (m_producer) { MLT.stop(); delete m_producer; m_producer = 0; setProducer(producer(MLT.profile())); MLT.play(); emit producerChanged(); } }
void CountProducerWidget::on_durationSpinBox_editingFinished() { if (!m_producer) return; if (ui->durationSpinBox->value() == m_producer->get_length()) return; if (m_producer) { setLength(producer(), ui->durationSpinBox->value()); MLT.stop(); emit producerReopened(); emit producerChanged(producer()); MLT.seek(0); } }
void ImageProducerWidget::on_aspectNumSpinBox_valueChanged(int) { if (m_producer) { double new_sar = double(ui->aspectNumSpinBox->value()) / double(ui->aspectDenSpinBox->value()); double sar = m_producer->get_double("aspect_ratio"); if (m_producer->get("force_aspect_ratio") || new_sar != sar) { m_producer->set("force_aspect_ratio", QString::number(new_sar).toLatin1().constData()); m_producer->set("shotcut_aspect_num", ui->aspectNumSpinBox->text().toLatin1().constData()); m_producer->set("shotcut_aspect_den", ui->aspectDenSpinBox->text().toLatin1().constData()); } emit producerChanged(); } }
void ImageProducerWidget::reopen(Mlt::Producer* p) { int out = ui->durationSpinBox->value() - 1; int position = m_producer->position(); if (out + 1 > p->get_length()) p->set("length", out + 1); p->set("out", out); if (position > p->get_out()) position = p->get_out(); p->set("in", m_producer->get_in()); if (MLT.setProducer(p)) { setProducer(0); return; } emit producerReopened(); emit producerChanged(); MLT.seek(position); setProducer(p); }
void ImageProducerWidget::on_repeatSpinBox_editingFinished() { m_producer->set("ttl", ui->repeatSpinBox->value()); emit producerChanged(); }