File kdenlive-libmlt7.patch of Package kde3-kdenlive
diff -Naru kdenlive_orig/cmake/modules/FindLIBMLT.cmake kdenlive/cmake/modules/FindLIBMLT.cmake
--- kdenlive_orig/cmake/modules/FindLIBMLT.cmake 2007-11-28 16:12:04.000000000 +0900
+++ kdenlive/cmake/modules/FindLIBMLT.cmake 2023-09-02 10:56:34.885568047 +0900
@@ -9,14 +9,14 @@
FIND_PATH(LIBMLT_INCLUDE_DIR
NAMES framework/mlt.h
- PATHS ${MLT_PATH}/include/mlt /usr/local/include/mlt /usr/include/mlt
+ PATHS ${MLT_PATH}/include/mlt /usr/local/include/mlt /usr/include/mlt /usr/include/mlt-7
NO_DEFAULT_PATH
)
MESSAGE(STATUS "Found MLT INCLUDES: ${LIBMLT_INCLUDE_DIR}")
FIND_LIBRARY(LIBMLT_LIBRARY
- NAMES mlt
+ NAMES mlt mlt-7
PATHS ${MLT_PATH}/lib /usr/lib /usr/local/lib
NO_DEFAULT_PATH
)
diff -Naru kdenlive_orig/cmake/modules/FindLIBMLTPLUS.cmake kdenlive/cmake/modules/FindLIBMLTPLUS.cmake
--- kdenlive_orig/cmake/modules/FindLIBMLTPLUS.cmake 2007-11-28 16:12:04.000000000 +0900
+++ kdenlive/cmake/modules/FindLIBMLTPLUS.cmake 2023-09-02 11:00:23.011270957 +0900
@@ -5,14 +5,14 @@
FIND_PATH(LIBMLTPLUS_INCLUDE_DIR
NAMES mlt++/Mlt.h
- PATHS ${MLT_PATH}/include /usr/local/include /usr/include
+ PATHS ${MLT_PATH}/include /usr/local/include /usr/include /usr/include/mlt-7
NO_DEFAULT_PATH
)
MESSAGE(STATUS "Found MLT++ INCLUDES: ${LIBMLTPLUS_INCLUDE_DIR}")
FIND_LIBRARY(LIBMLTPLUS_LIBRARY
- NAMES mlt++
+ NAMES mlt++ mlt++-7
PATHS ${MLT_PATH}/lib /usr/lib /usr/local/lib
NO_DEFAULT_PATH
)
diff -Naru kdenlive_orig/kdenlive/kdenlive.cpp kdenlive/kdenlive/kdenlive.cpp
--- kdenlive_orig/kdenlive/kdenlive.cpp 2008-07-08 19:38:44.000000000 +0900
+++ kdenlive/kdenlive/kdenlive.cpp 2023-09-02 11:38:37.932187054 +0900
@@ -313,7 +313,7 @@
{
KdenliveSettings::setRendererpath(KStandardDirs::findExe("inigo"));
}
- QString profilePath = KdenliveSettings::mltpath() + "/share/mlt/profiles/";
+ QString profilePath = KdenliveSettings::mltpath() + "/share/mlt-7/profiles/";
QStringList profilesList = QDir(profilePath).entryList("*", QDir::Files);
if (profilesList.isEmpty()) {
@@ -322,7 +322,7 @@
if (!profilePath.isEmpty()) {
profilePath = profilePath.section('/', 0, -3);
KdenliveSettings::setMltpath(profilePath);
- profilePath.append("/share/mlt/profiles/");
+ profilePath.append("/share/mlt-7/profiles/");
QStringList profilesList = QDir(profilePath).entryList("*", QDir::Files);
}
diff -Naru kdenlive_orig/kdenlive/krender.cpp kdenlive/kdenlive/krender.cpp
--- kdenlive_orig/kdenlive/krender.cpp 2008-07-08 19:38:44.000000000 +0900
+++ kdenlive/kdenlive/krender.cpp 2023-09-02 11:16:08.325811341 +0900
@@ -268,7 +268,7 @@
{
QPixmap pix(width, height);
- mlt_image_format format = mlt_image_rgb24a;
+ mlt_image_format format = mlt_image_rgba;
if (border) {
width = width -2;
height = height -2;
@@ -298,7 +298,7 @@
}
Mlt::Producer *mlt_producer = m_mltProducer->cut(frame_position, frame_position + 1);
Mlt::Filter m_convert(*m_mltProfile, "avcolour_space");
- m_convert.set("forced", mlt_image_rgb24a);
+ m_convert.set("forced", mlt_image_rgba);
mlt_producer->attach(m_convert);
Mlt::Frame *frame = mlt_producer->get_frame();
@@ -347,7 +347,7 @@
}
Mlt::Filter m_convert(*m_mltProfile, "avcolour_space");
- m_convert.set("forced", mlt_image_rgb24a);
+ m_convert.set("forced", mlt_image_rgba);
m_producer.attach(m_convert);
m_producer.seek(frame_position);
Mlt::Frame * frame = m_producer.get_frame();
@@ -368,7 +368,7 @@
return;
}
Mlt::Filter m_convert(*m_mltProfile, "avcolour_space");
- m_convert.set("forced", mlt_image_rgb24a);
+ m_convert.set("forced", mlt_image_rgba);
m_producer.attach(m_convert);
m_producer.seek(frame_position);
@@ -477,7 +477,7 @@
filePropertyMap["duration"] = QString::number(producer.get_playtime());
Mlt::Filter m_convert(*m_mltProfile, "avcolour_space");
- m_convert.set("forced", mlt_image_rgb24a);
+ m_convert.set("forced", mlt_image_rgba);
producer.attach(m_convert);
Mlt::Frame * frame = producer.get_frame();
@@ -945,7 +945,7 @@
QPixmap pix(width, height);
Mlt::Filter m_convert(*m_mltProfile, "avcolour_space");
- m_convert.set("forced", mlt_image_rgb24a);
+ m_convert.set("forced", mlt_image_rgba);
m_mltProducer->attach(m_convert);
Mlt::Frame * frame = m_mltProducer->get_frame();
m_mltProducer->detach(m_convert);
@@ -1044,7 +1044,7 @@
void KRender::mltCutClip(int track, GenTime position)
{
Mlt::Service service(m_mltProducer->parent().get_service());
- if (service.type() != tractor_type) kdWarning()<<"// TRACOR PROBLEM"<<endl;
+ if (service.type() != mlt_service_tractor_type) kdWarning()<<"// TRACOR PROBLEM"<<endl;
Mlt::Tractor tractor(service);
Mlt::Producer trackProducer(tractor.track(track));
@@ -1058,7 +1058,7 @@
void KRender::mltRemoveClip(int track, GenTime position)
{
Mlt::Service service(m_mltProducer->parent().get_service());
- if (service.type() != tractor_type) kdWarning()<<"// TRACOR PROBLEM"<<endl;
+ if (service.type() != mlt_service_tractor_type) kdWarning()<<"// TRACOR PROBLEM"<<endl;
Mlt::Tractor tractor(service);
Mlt::Producer trackProducer(tractor.track(track));
@@ -1276,10 +1276,10 @@
void KRender::mltResizeClipStart(int track, GenTime pos, GenTime moveEnd, GenTime moveStart, GenTime in, GenTime out)
{
Mlt::Service service(m_mltProducer->parent().get_service());
- if (service.type() == playlist_type) kdDebug()<<"// PLAYLIST TYPE"<<endl;
- if (service.type() == tractor_type) kdDebug()<<"// TRACOT TYPE"<<endl;
- if (service.type() == multitrack_type) kdDebug()<<"// MULTITRACK TYPE"<<endl;
- if (service.type() == producer_type) kdDebug()<<"// PROD TYPE"<<endl;
+ if (service.type() == mlt_service_playlist_type) kdDebug()<<"// PLAYLIST TYPE"<<endl;
+ if (service.type() == mlt_service_tractor_type) kdDebug()<<"// TRACOT TYPE"<<endl;
+ if (service.type() == mlt_service_multitrack_type) kdDebug()<<"// MULTITRACK TYPE"<<endl;
+ if (service.type() == mlt_service_producer_type) kdDebug()<<"// PROD TYPE"<<endl;
int moveFrame = (moveEnd - moveStart).frames(m_fps);
diff -Naru kdenlive_orig/kdenlive/kthumb.cpp kdenlive/kdenlive/kthumb.cpp
--- kdenlive_orig/kdenlive/kthumb.cpp 2008-07-08 19:38:44.000000000 +0900
+++ kdenlive/kdenlive/kthumb.cpp 2023-09-02 11:29:32.081731187 +0900
@@ -100,8 +100,8 @@
if ( mlt_frame->is_valid() )
{
double m_framesPerSecond = mlt_producer_get_fps( m_producer.get_producer() ); //mlt_frame->get_double( "fps" );
- int m_samples = mlt_sample_calculator( m_framesPerSecond, m_frequency, mlt_frame_get_position(mlt_frame->get_frame()) );
- mlt_audio_format m_audioFormat = mlt_audio_pcm;
+ int m_samples = mlt_audio_calculate_frame_samples( m_framesPerSecond, m_frequency, mlt_frame_get_position(mlt_frame->get_frame()) );
+ mlt_audio_format m_audioFormat = mlt_audio_s16;
int16_t* m_pcm = mlt_frame->get_audio(m_audioFormat, m_frequency, m_channels, m_samples );
@@ -157,11 +157,11 @@
return QPixmap();
}
Mlt::Filter m_convert(profile, "avcolour_space");
- m_convert.set("forced", mlt_image_rgb24a);
+ m_convert.set("forced", mlt_image_rgba);
m_producer.attach(m_convert);
m_producer.seek(frame);
Mlt::Frame * m_frame = m_producer.get_frame();
- mlt_image_format format = mlt_image_rgb24a;
+ mlt_image_format format = mlt_image_rgba;
width = width - 2;
height = height - 2;
if (m_frame && m_frame->is_valid()) {
@@ -188,11 +188,11 @@
return;
}
Mlt::Filter m_convert(profile, "avcolour_space");
- m_convert.set("forced", mlt_image_rgb24a);
+ m_convert.set("forced", mlt_image_rgba);
m_producer.attach(m_convert);
m_producer.seek(frame);
Mlt::Frame * m_frame = m_producer.get_frame();
- mlt_image_format format = mlt_image_rgb24a;
+ mlt_image_format format = mlt_image_rgba;
width = width - 2;
height = height - 2;
if (m_frame && m_frame->is_valid()) {
@@ -220,11 +220,11 @@
return;
}
Mlt::Filter m_convert(profile, "avcolour_space");
- m_convert.set("forced", mlt_image_rgb24a);
+ m_convert.set("forced", mlt_image_rgba);
m_producer.attach(m_convert);
m_producer.seek(startframe);
Mlt::Frame * m_frame = m_producer.get_frame();
- mlt_image_format format = mlt_image_rgb24a;
+ mlt_image_format format = mlt_image_rgba;
width = width - 2;
height = height - 2;
diff -Naru kdenlive_orig/kdenlive/trackviewvideobackgrounddecorator.cpp kdenlive/kdenlive/trackviewvideobackgrounddecorator.cpp
--- kdenlive_orig/kdenlive/trackviewvideobackgrounddecorator.cpp 2008-07-08 19:38:44.000000000 +0900
+++ kdenlive/kdenlive/trackviewvideobackgrounddecorator.cpp 2023-09-02 11:07:50.310716736 +0900
@@ -109,9 +109,9 @@
}
m_producer.seek(startFrame);
Mlt::Filter m_convert(*profile, "avcolour_space");
- m_convert.set("forced", mlt_image_rgb24a);
+ m_convert.set("forced", mlt_image_rgba);
m_producer.attach(m_convert);
- mlt_image_format format = mlt_image_rgb24a;
+ mlt_image_format format = mlt_image_rgba;
painter.setPen(Qt::red);
for (int pos = startFrame; pos < startFrame + nbFrames; pos++) {
m_producer.seek(pos);
diff -Naru kdenlive_orig/thumbcreator/westleythumbcreator.cpp kdenlive/thumbcreator/westleythumbcreator.cpp
--- kdenlive_orig/thumbcreator/westleythumbcreator.cpp 2007-08-14 00:26:48.000000000 +0900
+++ kdenlive/thumbcreator/westleythumbcreator.cpp 2023-09-02 11:06:49.347337438 +0900
@@ -58,11 +58,11 @@
}
Mlt::Filter m_convert("avcolour_space");
- m_convert.set("forced", mlt_image_rgb24a);
+ m_convert.set("forced", mlt_image_rgba);
prod.attach(m_convert);
Mlt::Frame * frame = prod.get_frame();
- mlt_image_format format = mlt_image_rgb24a;
+ mlt_image_format format = mlt_image_rgba;
if (frame && frame->is_valid()) {
int frame_width = mlt_properties_get_int( frame->get_properties(), "width");