Commit cedc847d authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Merge branch 'work/mlt7'

parents ea4527ae c96f9f61
......@@ -26,8 +26,8 @@ option(CRASH_AUTO_TEST "Auto-generate testcases upon some crashes (uses RTTR lib
option(BUILD_FUZZING "Build fuzzing target" OFF)
# Minimum versions of main dependencies.
set(MLT_MIN_MAJOR_VERSION 6)
set(MLT_MIN_MINOR_VERSION 20)
set(MLT_MIN_MAJOR_VERSION 7)
set(MLT_MIN_MINOR_VERSION 0)
set(MLT_MIN_PATCH_VERSION 0)
set(MLT_MIN_VERSION ${MLT_MIN_MAJOR_VERSION}.${MLT_MIN_MINOR_VERSION}.${MLT_MIN_PATCH_VERSION})
......
......@@ -6,7 +6,7 @@
# Redistribution and use is allowed according to the terms of the BSD license.
find_package(PkgConfig QUIET)
pkg_check_modules(PC_MLT mlt++)
pkg_check_modules(PC_MLT mlt++-7)
# Workaround cmake 3.17 issue (dropped .dll extension for library search)
if(WIN32)
......@@ -21,11 +21,11 @@ find_path(MLT_INCLUDE_DIR
PATHS
/usr/local/include
/usr/include
PATH_SUFFIXES mlt
PATH_SUFFIXES mlt-7
)
find_library(MLT_LIBRARIES
NAMES mlt
NAMES mlt-7
HINTS
${PC_MLT_LIBDIR}
${PC_MLT_PREFIX}/lib
......@@ -42,10 +42,11 @@ find_path(MLTPP_INCLUDE_DIR
PATHS
/usr/local/include
/usr/include
PATH_SUFFIXES mlt-7
)
find_library(MLTPP_LIBRARIES
NAMES mlt++
NAMES mlt++-7
HINTS
${PC_MLT_LIBDIR}
${PC_MLT_PREFIX}/lib
......
......@@ -6,7 +6,6 @@ audiopan.xml
audiospectrum.xml
audiowave.xml
audiowaveform.xml
automask.xml
boxblur.xml
brightness.xml
channelcopy.xml
......
<!DOCTYPE kpartgui>
<effect tag="autotrack_rectangle" id="autotrack_rectangle">
<name>Auto Mask</name>
<description>Hide a selected zone and follow its movements</description>
<author>Zachary Drew</author>
<parameter type="geometry" name="geometry" default="50% 50% 50% 50%" fixed="1" opacity="false">
<name>Geometry</name>
</parameter>
<parameter type="constant" name="motion_est.macroblock_width" max="100" min="1" default="16" suffix="pixels">
<name>Macroblock width</name>
</parameter>
<parameter type="constant" name="motion_est.macroblock_height" max="100" min="1" default="16" suffix="pixels">
<name>Macroblock height</name>
</parameter>
<parameter type="constant" name="motion_est.limit_x" max="500" min="1" default="64" suffix="pixels">
<name>Maximum x distance</name>
</parameter>
<parameter type="constant" name="motion_est.limit_y" max="500" min="1" default="64" suffix="pixels">
<name>Maximum y distance</name>
</parameter>
<parameter type="bool" name="motion_est.denoise" default="0">
<name>Denoise</name>
</parameter>
<parameter type="bool" name="debug" default="0">
<name>Debug</name>
</parameter>
<parameter type="bool" name="obscure" default="1">
<name>Obscure</name>
</parameter>
<parameter type="readonly" name="motion_vector_list" value="">
<name>Tracking data</name>
<comment>Click to copy to clipboard</comment>
</parameter>
<parameter type="filterjob" filtertag="autotrack_rectangle" filterparams="_serialize=1 motion_vector_list=0" consumer="null" consumerparams="all=1 terminate_on_pause=1">
<name conditional="Reset">Analyse</name>
<jobparam name="storedata" />
<jobparam name="projecttreefilter" />
<jobparam name="key">motion_vector_list</jobparam>
<jobparam name="finalfilter">autotrack_rectangle</jobparam>
<jobparam name="displaydataname">Motion vectors</jobparam>
</parameter>
</effect>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<data name="effects" version="0">
<group list="chroma,frei0r.alpha0ps,frei0r.alphagrad,frei0r.alphaspot,frei0r.transparency,frei0r.mask0mate,rotoscoping,frei0r.keyspillm0pup,avfilter.despill,obscure,autotrack_rectangle,frei0r.bluescreen0r,lumakey,shape,spot_remover,frei0r.select0r,frei0r.spillsupress,frei0r.bgsubtract0r,opencv.tracker,strobe">
<group list="chroma,frei0r.alpha0ps,frei0r.alphagrad,frei0r.alphaspot,frei0r.transparency,frei0r.mask0mate,rotoscoping,frei0r.keyspillm0pup,avfilter.despill,obscure,frei0r.bluescreen0r,lumakey,shape,spot_remover,frei0r.select0r,frei0r.spillsupress,frei0r.bgsubtract0r,opencv.tracker,strobe">
<text>Alpha, Mask and Keying</text>
</group>
<group list="boxblur,frei0r.squareblur,avfilter.avgblur,avfilter.gblur,avfilter.smartblur,avfilter.boxblur,avfilter.unsharp,avfilter.sab">
......
......@@ -2,12 +2,8 @@ ExternalProject_Add(
ext_mlt
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
GIT_REPOSITORY https://github.com/mltframework/mlt.git
GIT_TAG v6
GIT_TAG master
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${EXT_INSTALL_DIR} ${AT_HOST} ${AT_SHARED_ONLY} --enable-gpl --enable-gpl3 --enable-opencv --enable-opengl
CMAKE_ARGS ${CMAKE_GLOBAL_PROFILE} -DMOD_OPENCV=ON -DMOD_MOVIT=ON
BUILD_IN_SOURCE 1
BUILD_ALWAYS TRUE
BUILD_COMMAND $(MAKE) clean
COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
)
......@@ -66,8 +66,8 @@ cp -r $DEPS_INSTALL_PREFIX/translations $APPDIR/usr/
# TO remove once we switch to the newer Qt5.12 Appimage dependency
# cp -r $DEPS_INSTALL_PREFIX/openssl/lib/* $APPDIR/usr/lib
cp -r $DEPS_INSTALL_PREFIX/share/mlt $APPDIR/usr/share
cp -r $DEPS_INSTALL_PREFIX/lib/mlt $APPDIR/usr/lib
cp -r $DEPS_INSTALL_PREFIX/share/mlt-7 $APPDIR/usr/share
cp -r $DEPS_INSTALL_PREFIX/lib/mlt-7 $APPDIR/usr/lib
cp -r $DEPS_INSTALL_PREFIX/lib/libharfbuzz* $APPDIR/usr/lib
cp -r $DEPS_INSTALL_PREFIX/lib/libfribidi* $APPDIR/usr/lib
cp -r $DEPS_INSTALL_PREFIX/lib/libpango* $APPDIR/usr/lib
......@@ -75,6 +75,7 @@ cp -r $DEPS_INSTALL_PREFIX/lib/ladspa $APPDIR/usr/lib || true
cp -r $DEPS_INSTALL_PREFIX/lib/libmlt* $APPDIR/usr/lib
cp -r $DEPS_INSTALL_PREFIX/lib/frei0r-1 $APPDIR/usr/lib
cp -r $DEPS_INSTALL_PREFIX/bin/melt $APPDIR/usr/bin
cp -r $DEPS_INSTALL_PREFIX/bin/melt-7 $APPDIR/usr/bin
cp -r $DEPS_INSTALL_PREFIX/bin/ffmpeg $APPDIR/usr/bin
cp -r $DEPS_INSTALL_PREFIX/bin/ffplay $APPDIR/usr/bin
cp -r $DEPS_INSTALL_PREFIX/bin/ffprobe $APPDIR/usr/bin
......@@ -129,7 +130,7 @@ done
# patchelf --set-rpath '$ORIGIN/../../lib' $lib;
#done
for lib in $APPDIR/usr/lib/mlt/*.so*; do
for lib in $APPDIR/usr/lib/mlt-7/*.so*; do
patchelf --set-rpath '$ORIGIN/..' $lib;
done
......@@ -190,7 +191,7 @@ linuxdeployqt $APPDIR/usr/share/applications/org.kde.kdenlive.desktop \
-qmldir=$DEPS_INSTALL_PREFIX/qml \
-verbose=2 \
-bundle-non-qt-libs \
-extra-plugins=$APPDIR/usr/lib/mlt,$APPDIR/usr/plugins,$APPDIR/usr/qml,$APPDIR/usr/share/locale \
-extra-plugins=$APPDIR/usr/lib/mlt-7,$APPDIR/usr/plugins,$APPDIR/usr/qml,$APPDIR/usr/share/locale \
-exclude-libs=libnss3.so,libnssutil3.so,libGL.so.1
# -appimage \
......@@ -213,7 +214,7 @@ rm $APPDIR/AppRun
cat > $APPDIR/AppRun << EOF
#!/bin/bash
DIR="\`dirname \"\$0\"\`"
DIR="\`dirname \"\$0\"\`"
DIR="\`( cd \"\$DIR\" && pwd )\`"
export APPDIR=\$DIR
export LC_ALL=\$LANG
......@@ -230,14 +231,14 @@ export XDG_CONFIG_HOME=\$HOME/.config/
export PATH=\$DIR/usr/bin:\$DIR/usr/lib:\$DIR/usr/lib/libexec/kf5::\$PATH
export KDE_FORK_SLAVES=1
export MLT_REPOSITORY=\$DIR/usr/lib/mlt/
export MLT_DATA=\$DIR/usr/share/mlt/
export MLT_REPOSITORY=\$DIR/usr/lib/mlt-7/
export MLT_DATA=\$DIR/usr/share/mlt-7/
export MLT_ROOT_DIR=\$DIR/usr/
export LADSPA_PATH=\$DIR/usr/lib/ladspa
export LIBVA_DRIVERS_PATH=\$DIR/usr/lib/va
export FREI0R_PATH=\$DIR/usr/lib/frei0r-1
export MLT_PROFILES_PATH=\$DIR/usr/share/mlt/profiles/
export MLT_PRESETS_PATH=\$DIR/usr/share/mlt/presets/
export MLT_PROFILES_PATH=\$DIR/usr/share/mlt-7/profiles/
export MLT_PRESETS_PATH=\$DIR/usr/share/mlt-7/presets/
export SDL_AUDIODRIVER=pulseaudio
export GST_PLUGIN_SCANNER=\$DIR/usr/lib/x86_64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner
export GST_PLUGIN_PATH=\$DIR/usr/lib/x86_64-linux-gnu/gstreamer1.0/
......@@ -278,4 +279,3 @@ appimagetool $APPDIR
# Generate a new name for the Appimage file and rename it accordingly
APPIMAGE=kdenlive-"$VERSION"-x86_64.appimage
mv Kdenlive-x86_64.AppImage $APPIMAGE
......@@ -9,7 +9,7 @@ set_package_properties(LibV4L2 PROPERTIES
if(NOT WIN32)
find_package(PkgConfig QUIET)
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=mltdatadir mlt-framework
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=mltdatadir mlt-framework-7
OUTPUT_VARIABLE MLT_DATADIR
RESULT_VARIABLE MLT_DATADIR_failed)
if(NOT MLT_DATADIR_failed)
......@@ -17,7 +17,7 @@ if(NOT WIN32)
endif()
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=meltbin mlt-framework
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=meltbin mlt-framework-7
OUTPUT_VARIABLE MLT_MELTBIN
RESULT_VARIABLE MLT_MELTBIN_failed)
if(NOT MLT_MELTBIN_failed)
......
......@@ -642,7 +642,11 @@ void KeyframeView::paintEvent(QPaintEvent *event)
QStylePainter p(this);
int maxWidth = width() - 2 * m_offset;
m_scale = maxWidth / double(m_duration - 1);
if (m_duration > 1) {
m_scale = maxWidth / double(m_duration - 1);
} else {
m_scale = maxWidth;
}
int headOffset = m_lineHeight / 2;
int offset = pCore->getItemIn(m_model->getOwnerId());
m_zoomStart = m_zoomHandle.x() * maxWidth;
......
......@@ -279,7 +279,7 @@ void AssetParameterModel::setParameter(const QString &name, int value, bool upda
}
m_asset->set("effect", effectParam.join(QLatin1Char(' ')).toUtf8().constData());
emit replugEffect(shared_from_this());
} else if (m_assetId == QLatin1String("autotrack_rectangle") || m_assetId.startsWith(QStringLiteral("ladspa"))) {
} else if (m_assetId.startsWith(QStringLiteral("ladspa"))) {
// these effects don't understand param change and need to be rebuild
emit replugEffect(shared_from_this());
}
......@@ -369,7 +369,7 @@ void AssetParameterModel::setParameter(const QString &name, const QString &param
m_asset->set("effect", effectParam.join(QLatin1Char(' ')).toUtf8().constData());
emit replugEffect(shared_from_this());
updateChildRequired = false;
} else if (m_assetId == QLatin1String("autotrack_rectangle") || m_assetId.startsWith(QStringLiteral("ladspa"))) {
} else if (m_assetId.startsWith(QStringLiteral("ladspa"))) {
// these effects don't understand param change and need to be rebuild
emit replugEffect(shared_from_this());
updateChildRequired = false;
......
......@@ -337,8 +337,8 @@ void WheelContainer::resizeEvent(QResizeEvent *event)
const QString WheelContainer::getParamValues() const
{
return QString::number(m_color.redF() * m_sizeFactor, 'g', 3) + QLatin1Char(',') + QString::number(m_color.greenF() * m_sizeFactor, 'g', 3) +
QLatin1Char(',') + QString::number(m_color.blueF() * m_sizeFactor, 'g', 3);
return QString::number(m_color.redF() * m_sizeFactor, 'f', 3) + QLatin1Char(',') + QString::number(m_color.greenF() * m_sizeFactor, 'f', 3) +
QLatin1Char(',') + QString::number(m_color.blueF() * m_sizeFactor, 'f', 3);
}
const QList <double> WheelContainer::getNiceParamValues() const
......
......@@ -27,7 +27,8 @@
#include "monitor/monitormanager.h"
#include "timecodedisplay.h"
#include "widgets/geometrywidget.h"
#include <mlt++/MltGeometry.h>
#include <mlt++/MltProperties.h>
#include <framework/mlt_types.h>
#include <QVBoxLayout>
GeometryEditWidget::GeometryEditWidget(std::shared_ptr<AssetParameterModel> model, QModelIndex index, QSize frameSize, QWidget *parent)
......@@ -39,12 +40,12 @@ GeometryEditWidget::GeometryEditWidget(std::shared_ptr<AssetParameterModel> mode
int start = m_model->data(m_index, AssetParameterModel::ParentInRole).toInt();
int end = start + m_model->data(m_index, AssetParameterModel::ParentDurationRole).toInt();
QSize profileSize = pCore->getCurrentFrameSize();
Mlt::Geometry geometry(value.toUtf8().data(), end, profileSize.width(), profileSize.height());
Mlt::GeometryItem item;
QRect rect;
if (geometry.fetch(&item, 0) == 0) {
rect = QRect(int(item.x()), int(item.y()), int(item.w()), int(item.h()));
} else {
Mlt::Properties mlt_prop;
m_model->passProperties(mlt_prop);
mlt_prop.set("rect", value.toUtf8().data());
mlt_rect r = mlt_prop.get_rect("rect");
QRect rect = QRect(int(profileSize.width() * r.x), int(profileSize.height() * r.y), int(profileSize.width()* r.w), int(profileSize.height() * r.h));;
if (rect.isNull()) {
// Cannot read value, use random default
rect = QRect(50, 50, 200, 200);
}
......
......@@ -25,6 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "clipcreator.hpp"
#include "core.h"
#include "dialogs/clipcreationdialog.h"
#include "dialogs/timeremap.h"
#include "doc/documentchecker.h"
#include "doc/docundostack.hpp"
#include "doc/kdenlivedoc.h"
......@@ -2022,6 +2023,8 @@ void Bin::selectProxyModel(const QModelIndex &id)
showClipProperties(clip, false);
m_deleteAction->setText(i18n("Delete Clip"));
m_proxyAction->setText(i18n("Proxy Clip"));
//TODO: testing only, we should check clip type...
pCore->timeRemapWidget()->setClip(clip);
} else if (currentItem->itemType() == AbstractProjectItem::FolderItem) {
// A folder was selected, disable editing clip
m_tagsWidget->setTagData();
......@@ -4553,3 +4556,36 @@ bool Bin::addProjectClipInFolder(const QString &path, const QString &parentFolde
}
return ok;
}
void Bin::remapCurrent()
{
std::shared_ptr<ProjectClip> clip = getFirstSelectedClip();
if (clip) {
QFileInfo info(clip->url());
QDir dir =info.absoluteDir();
QString fName = info.fileName().section(QLatin1Char('.'),0, -2);
fName.append("-remap");
int ix = 1;
QString renderName = QString("%1%2.mlt").arg(fName).arg(QString::number(ix, 'f', 3));
while (dir.exists(renderName)) {
ix++;
renderName = QString("%1%2.mlt").arg(fName).arg(QString::number(ix, 'f', 3));
}
Mlt::Consumer consumer(pCore->getCurrentProfile()->profile(), "xml", dir.absoluteFilePath(renderName).toUtf8().constData());
consumer.set("terminate_on_pause", 1);
consumer.set("title", "Time remap");
consumer.set("real_time", -1);
Mlt::Tractor t(pCore->getCurrentProfile()->profile());
Mlt::Chain chain(pCore->getCurrentProfile()->profile(), nullptr, clip->url().toUtf8().constData());
Mlt::Link link("timeremap");
chain.attach(link);
t.set_track(chain, 0);
consumer.connect(t);
consumer.run();
Fun undo = []() { return true; };
Fun redo = []() { return true; };
auto id = ClipCreator::createClipFromFile(dir.absoluteFilePath(renderName), getCurrentFolder(), pCore->projectItemModel(), undo, redo);
pCore->pushUndo(undo, redo, i18n("Add clip remap"));
selectClipById(id);
}
}
......@@ -463,6 +463,8 @@ public slots:
void showTitleWidget(const std::shared_ptr<ProjectClip> &clip);
/** @brief Add a clip in a specially named folder */
bool addProjectClipInFolder(const QString &path, const QString &parentFolder, const QString &folderName);
/** @brief Create a playlist clip for timeremap. */
void remapCurrent();
protected:
/* This function is called whenever an item is selected to propagate signals
......
......@@ -1552,7 +1552,8 @@ QStringList ProjectClip::updatedAnalysisData(const QString &name, const QString
if (KMessageBox::questionYesNo(QApplication::activeWindow(), i18n("Clip already contains analysis data %1", name), QString(), KGuiItem(i18n("Merge")),
KGuiItem(i18n("Add"))) == KMessageBox::Yes) {
// Merge data
auto &profile = pCore->getCurrentProfile();
//TODO MLT7: convert to Mlt::Animation
/*auto &profile = pCore->getCurrentProfile();
Mlt::Geometry geometry(current.toUtf8().data(), duration().frames(profile->fps()), profile->width(), profile->height());
Mlt::Geometry newGeometry(data.toUtf8().data(), duration().frames(profile->fps()), profile->width(), profile->height());
Mlt::GeometryItem item;
......@@ -1563,7 +1564,7 @@ QStringList ProjectClip::updatedAnalysisData(const QString &name, const QString
pos++;
geometry.insert(item);
}
return QStringList() << QString("kdenlive:clipanalysis." + name) << geometry.serialise();
return QStringList() << QString("kdenlive:clipanalysis." + name) << geometry.serialise();*/
// m_controller->setProperty("kdenlive:clipanalysis." + name, geometry.serialise());
}
// Add data with another name
......@@ -1591,7 +1592,8 @@ const QString ProjectClip::geometryWithOffset(const QString &data, int offset)
return data;
}
auto &profile = pCore->getCurrentProfile();
Mlt::Geometry geometry(data.toUtf8().data(), duration().frames(profile->fps()), profile->width(), profile->height());
// TODO MLT7: port to Mlt::Animation
/*Mlt::Geometry geometry(data.toUtf8().data(), duration().frames(profile->fps()), profile->width(), profile->height());
Mlt::Geometry newgeometry(nullptr, duration().frames(profile->fps()), profile->width(), profile->height());
Mlt::GeometryItem item;
int pos = 0;
......@@ -1602,6 +1604,8 @@ const QString ProjectClip::geometryWithOffset(const QString &data, int offset)
newgeometry.insert(item);
}
return newgeometry.serialise();
*/
return QString();
}
bool ProjectClip::isSplittable() const
......
......@@ -988,7 +988,7 @@ void ProjectItemModel::loadBinPlaylist(Mlt::Tractor *documentTractor, Mlt::Tract
Mlt::Properties retainList(mlt_properties(documentTractor->get_data("xml_retain")));
if (retainList.is_valid()) {
Mlt::Playlist playlist(mlt_playlist(retainList.get_data(BinPlaylist::binPlaylistId.toUtf8().constData())));
if (playlist.is_valid() && playlist.type() == playlist_type) {
if (playlist.is_valid() && playlist.type() == mlt_service_playlist_type) {
if (progressDialog == nullptr && playlist.count() > 0) {
// Display message on splash screen
emit pCore->loadingMessageUpdated(i18n("Loading project clips..."));
......
......@@ -7,7 +7,7 @@ endif()
set(kdenlive_SRCS
${kdenlive_SRCS}
capture/managecapturesdialog.cpp
capture/mltdevicecapture.cpp
# capture/mltdevicecapture.cpp
capture/mediacapture.cpp
PARENT_SCOPE)
......
......@@ -94,7 +94,7 @@ bool MltDeviceCapture::buildConsumer(const QString &profileName)
// OpenGL monitor
m_mltConsumer = new Mlt::Consumer(*m_mltProfile, KdenliveSettings::audiobackend().toUtf8().constData());
m_mltConsumer->set("preview_off", 1);
m_mltConsumer->set("preview_format", mlt_image_rgb24);
m_mltConsumer->set("preview_format", mlt_image_rgb);
m_showFrameEvent = m_mltConsumer->listen("consumer-frame-show", this, mlt_listener(consumer_gl_frame_show));
// m_mltConsumer->set("resize", 1);
// m_mltConsumer->set("terminate_on_pause", 1);
......@@ -155,7 +155,7 @@ void MltDeviceCapture::stop()
if (m_mltProducer) {
Mlt::Service service(m_mltProducer->parent().get_service());
mlt_service_lock(service.get_service());
if (service.type() == tractor_type) {
if (service.type() == mlt_service_tractor_type) {
isPlaylist = true;
Mlt::Tractor tractor(service);
mlt_tractor_close(tractor.get_tractor());
......@@ -196,7 +196,7 @@ void MltDeviceCapture::emitFrameUpdated(Mlt::Frame &frame)
/*
//TEST: is it better to convert the frame in a thread outside of MLT??
if (processingImage) return;
mlt_image_format format = (mlt_image_format) frame.get_int("format"); //mlt_image_rgb24;
mlt_image_format format = (mlt_image_format) frame.get_int("format"); //mlt_image_rgb;
int width = frame.get_int("width");
int height = frame.get_int("height");
unsigned char *buffer = (unsigned char *) frame.get_data("image");
......@@ -205,7 +205,7 @@ void MltDeviceCapture::emitFrameUpdated(Mlt::Frame &frame)
}
*/
mlt_image_format format = mlt_image_rgb24;
mlt_image_format format = mlt_image_rgb;
int width = 0;
int height = 0;
const uchar *image = frame.get_image(format, width, height);
......@@ -217,7 +217,7 @@ void MltDeviceCapture::emitFrameUpdated(Mlt::Frame &frame)
void MltDeviceCapture::showFrame(Mlt::Frame &frame)
{
mlt_image_format format = mlt_image_rgb24;
mlt_image_format format = mlt_image_rgb;
int width = 0;
int height = 0;
const uchar *image = frame.get_image(format, width, height);
......@@ -301,7 +301,7 @@ void MltDeviceCapture::slotCheckDroppedFrames()
void MltDeviceCapture::saveFrame(Mlt::Frame &frame)
{
mlt_image_format format = mlt_image_rgb24;
mlt_image_format format = mlt_image_rgb;
int width = 0;
int height = 0;
const uchar *image = frame.get_image(format, width, height);
......@@ -401,7 +401,7 @@ bool MltDeviceCapture::slotStartCapture(const QString &params, const QString &pa
// OpenGL monitor
previewProps->set("mlt_service", KdenliveSettings::audiobackend().toUtf8().constData());
previewProps->set("preview_off", 1);
previewProps->set("preview_format", mlt_image_rgb24);
previewProps->set("preview_format", mlt_image_rgb);
previewProps->set("terminate_on_pause", 0);
m_showFrameEvent = m_mltConsumer->listen("consumer-frame-show", this, mlt_listener(consumer_gl_frame_show));
// m_mltConsumer->set("resize", 1);
......@@ -469,7 +469,7 @@ void MltDeviceCapture::setOverlay(const QString &path)
}
Mlt::Service service(parentProd.get_service());
if (service.type() != tractor_type) {
if (service.type() != mlt_service_tractor_type) {
qCWarning(KDENLIVE_LOG) << "// TRACTOR PROBLEM";
return;
}
......
......@@ -31,6 +31,7 @@ the Free Software Foundation, either version 3 of the License, or
#include "dialogs/subtitleedit.h"
#include "dialogs/textbasededit.h"
#include "dialogs/proxytest.h"
#include "dialogs/timeremap.h"
#include <mlt++/MltRepository.h>
#include <KMessageBox>
......@@ -136,6 +137,7 @@ void Core::initGUI(bool isAppImage, const QString &MltPath, const QUrl &Url, con
m_subtitleWidget = new SubtitleEdit(m_mainWindow);
m_mixerWidget = new MixerManager(m_mainWindow);
m_textEditWidget = new TextBasedEdit(m_mainWindow);
m_timeRemapWidget = new TimeRemap(m_mainWindow);
connect(m_library, SIGNAL(addProjectClips(QList<QUrl>)), m_binWidget, SLOT(droppedUrls(QList<QUrl>)));
connect(this, &Core::updateLibraryPath, m_library, &LibraryWidget::slotUpdateLibraryPath);
connect(m_capture.get(), &MediaCapture::recordStateChanged, m_mixerWidget, &MixerManager::recordStateChanged);
......@@ -311,6 +313,11 @@ TextBasedEdit *Core::textEditWidget()
return m_textEditWidget;
}
TimeRemap *Core::timeRemapWidget()
{
return m_timeRemapWidget;
}
SubtitleEdit *Core::subtitleWidget()
{
return m_subtitleWidget;
......
......@@ -43,6 +43,7 @@ class ProjectManager;
class SubtitleEdit;
class SubtitleModel;
class TextBasedEdit;
class TimeRemap;
namespace Mlt {
class Repository;
......@@ -121,6 +122,8 @@ public:
SubtitleEdit *subtitleWidget();
/** @brief Returns a pointer to the text based editing widget. */
TextBasedEdit *textEditWidget();
/** @brief Returns a pointer to the time remapping widget. */
TimeRemap *timeRemapWidget();
/** @brief Returns a pointer to the audio mixer. */
MixerManager *mixer();
......@@ -266,6 +269,7 @@ private:
LibraryWidget *m_library{nullptr};
SubtitleEdit *m_subtitleWidget{nullptr};
TextBasedEdit *m_textEditWidget{nullptr};
TimeRemap *m_timeRemapWidget{nullptr};
MixerManager *m_mixerWidget{nullptr};
/** @brief Current project's profile path */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment