On Sun Mar 07, 2021 at 02:50:10PM +0100, Marc Espie wrote:
> This makes use of the libebur128 port I posted a few hours ago
> I've had most of this in my dir for a while, I actually got stumped on
> something stupid in shotcut.
> 
> I've built and used shotcut with this without issue. I've also built
> kdenlive, but I'm not too familiar with it.
> 
> Highlights:
> - uses external libebur
> - fix loads of warnings with clang (these patches haven been sent as
> Issue to upstream)
> 
> Please test/okay
> 

New diff to the latest version 6.26.

I would like to import mlt 7.0 to update x11/kde-applications/kdenlive.
And I would propose we import 7.0 as a new port multimedia/mlt7 and we enable
GPLv2/GPLv3 in one port?

Feedback welcome.


diff --git a/multimedia/mlt/Makefile b/multimedia/mlt/Makefile
index 1903c469e0b..e13e72ec8ed 100644
--- a/multimedia/mlt/Makefile
+++ b/multimedia/mlt/Makefile
@@ -2,15 +2,14 @@
 
 COMMENT-main =         multimedia transformations framework
 COMMENT-gpl2 =         GPLv2-licensed modules for mlt
-VERSION =              6.22.1
+VERSION =              6.26.1
 DISTNAME =             mlt-${VERSION}
 PKGNAME-main =         ${DISTNAME}
 PKGNAME-gpl2 =         mlt-gpl2-${VERSION}
-REVISION =             0
 
 # XXX versions should be kept in sync together
-SHARED_LIBS =          mlt             3.2
-SHARED_LIBS +=         mlt++           3.2
+SHARED_LIBS =          mlt             4.0
+SHARED_LIBS +=         mlt++           4.0
 
 CATEGORIES =           multimedia devel
 HOMEPAGE =             https://www.mltframework.org/
@@ -22,13 +21,13 @@ DEBUG_PACKAGES =    ${BUILD_PACKAGES}
 PERMIT_PACKAGE =       Yes
 
 WANTLIB-main += ${COMPILER_LIBCXX} SDL SDL2 SDL_image X11 avcodec avdevice
-WANTLIB-main += avfilter avformat avutil c exif fftw3 fontconfig gdk-x11-2.0
+WANTLIB-main += avfilter avformat avutil c ebur128 exif fftw3 fontconfig
 WANTLIB-main += gdk_pixbuf-2.0 glib-2.0 gobject-2.0 jack m pango-1.0
-WANTLIB-main += pangoft2-1.0 sox swresample swscale vorbisfile xml2
-WANTLIB-main += ebur128
+WANTLIB-main += pangoft2-1.0 sox swresample swscale vidstab vorbisfile
+WANTLIB-main += xml2
 
-WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Svg Qt5Widgets
-WANTLIB += Qt5Xml SDL2 exif m mlt samplerate
+WANTLIB-gpl2 += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Svg Qt5Widgets
+WANTLIB-gpl2 += Qt5Xml SDL2 m mlt samplerate
 
 MASTER_SITES =         
https://github.com/mltframework/mlt/releases/download/v${VERSION}/
 
@@ -52,7 +51,7 @@ LIB_DEPENDS-main =    audio/jack \
                        graphics/ffmpeg \
                        graphics/libexif \
                        math/fftw3 \
-                       x11/gtk+2,-main
+                       devel/pango
 
 LIB_DEPENDS-gpl2 =     ${BUILD_PKGPATH},-main \
                        ${MODQT5_LIB_DEPENDS} \
diff --git a/multimedia/mlt/distinfo b/multimedia/mlt/distinfo
index f9099be4a49..6fe3f8a191c 100644
--- a/multimedia/mlt/distinfo
+++ b/multimedia/mlt/distinfo
@@ -1,2 +1,2 @@
-SHA256 (mlt-6.22.1.tar.gz) = o9698LiBHw0gyQLMPfPQXa19P/NtHbFsCnM40NWYmZg=
-SIZE (mlt-6.22.1.tar.gz) = 1343746
+SHA256 (mlt-6.26.1.tar.gz) = ikhLu/UfM+JTEnV1MfOtLOIGBxSdIPz8tAo8HmCyC04=
+SIZE (mlt-6.26.1.tar.gz) = 1366022
diff --git a/multimedia/mlt/patches/patch-src_framework_mlt_property_c 
b/multimedia/mlt/patches/patch-src_framework_mlt_property_c
index 8df07befa6a..ff334c0c83c 100644
--- a/multimedia/mlt/patches/patch-src_framework_mlt_property_c
+++ b/multimedia/mlt/patches/patch-src_framework_mlt_property_c
@@ -7,22 +7,7 @@ locale functions from dumping core!
 Index: src/framework/mlt_property.c
 --- src/framework/mlt_property.c.orig
 +++ src/framework/mlt_property.c
-@@ -90,8 +90,12 @@ struct mlt_property_s
- mlt_property mlt_property_init( )
- {
-       mlt_property self = calloc( 1, sizeof( *self ) );
--      if ( self )
--              pthread_mutex_init( &self->mutex, NULL );
-+      if ( self ) {
-+              pthread_mutexattr_t attr;
-+              pthread_mutexattr_init(&attr);
-+              pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
-+              pthread_mutex_init( &self->mutex, &attr );
-+      }
-       return self;
- }
- 
-@@ -311,7 +315,7 @@ static int time_clock_to_frames( mlt_property self, co
+@@ -315,7 +315,7 @@ static int time_clock_to_frames( mlt_property self, co
        s = copy;
        pos = strrchr( s, ':' );
  
@@ -31,7 +16,25 @@ Index: src/framework/mlt_property.c
        char *orig_localename = NULL;
        if ( locale )
        {
-@@ -353,7 +357,7 @@ static int time_clock_to_frames( mlt_property self, co
+@@ -331,7 +331,7 @@ static int time_clock_to_frames( mlt_property self, co
+ #endif
+ 
+       if ( pos ) {
+-#if defined(__GLIBC__) || defined(__APPLE__) || defined(HAVE_STRTOD_L)
++#if defined(__GLIBC__) || defined(__APPLE__) || defined(HAVE_STRTOD_L) && 
!defined(__OpenBSD__)
+               if ( locale )
+                       seconds = strtod_l( pos + 1, NULL, locale );
+               else
+@@ -349,7 +349,7 @@ static int time_clock_to_frames( mlt_property self, co
+               }
+       }
+       else {
+-#if defined(__GLIBC__) || defined(__APPLE__) || defined(HAVE_STRTOD_L)
++#if defined(__GLIBC__) || defined(__APPLE__) || defined(HAVE_STRTOD_L) && 
!defined(__OpenBSD__)
+               if ( locale )
+                       seconds = strtod_l( s, NULL, locale );
+               else
+@@ -357,7 +357,7 @@ static int time_clock_to_frames( mlt_property self, co
                        seconds = strtod( s, NULL );
        }
  
@@ -40,7 +43,12 @@ Index: src/framework/mlt_property.c
        if ( locale ) {
                // Restore the current locale
                setlocale( LC_NUMERIC, orig_localename );
-@@ -529,7 +533,7 @@ static double mlt_property_atof( mlt_property self, do
+@@ -529,11 +529,11 @@ static double mlt_property_atof( mlt_property self, do
+               char *end = NULL;
+               double result;
+ 
+-#if defined(__GLIBC__) || defined(__APPLE__) || defined(HAVE_STRTOD_L)
++#if defined(__GLIBC__) || defined(__APPLE__) || defined(HAVE_STRTOD_L) && 
!defined(__OpenBSD__)
                if ( locale )
                        result = strtod_l( value, &end, locale );
                else
@@ -49,7 +57,7 @@ Index: src/framework/mlt_property.c
                char *orig_localename = NULL;
                if ( locale ) {
                        // Protect damaging the global locale from a temporary 
locale on another thread.
-@@ -547,7 +551,7 @@ static double mlt_property_atof( mlt_property self, do
+@@ -551,7 +551,7 @@ static double mlt_property_atof( mlt_property self, do
                if ( end && end[0] == '%' )
                        result /= 100.0;
  
@@ -58,7 +66,7 @@ Index: src/framework/mlt_property.c
                if ( locale ) {
                        // Restore the current locale
                        setlocale( LC_NUMERIC, orig_localename );
-@@ -775,7 +779,7 @@ char *mlt_property_get_string_l_tf( mlt_property self,
+@@ -779,7 +779,7 @@ char *mlt_property_get_string_l_tf( mlt_property self,
        }
        else if ( ! ( self->types & mlt_prop_string ) )
        {
@@ -67,7 +75,7 @@ Index: src/framework/mlt_property.c
                // TODO: when glibc gets sprintf_l, start using it! For now, 
hack on setlocale.
                // Save the current locale
  #if defined(__APPLE__)
-@@ -821,7 +825,7 @@ char *mlt_property_get_string_l_tf( mlt_property self,
+@@ -825,7 +825,7 @@ char *mlt_property_get_string_l_tf( mlt_property self,
                        self->types |= mlt_prop_string;
                        self->prop_string = self->serialiser( self->data, 
self->length );
                }
@@ -76,7 +84,7 @@ Index: src/framework/mlt_property.c
                // Restore the current locale
                setlocale( LC_NUMERIC, orig_localename );
                free( orig_localename );
-@@ -1033,7 +1037,7 @@ static void time_clock_from_frames( int frames, double
+@@ -1037,7 +1037,7 @@ static void time_clock_from_frames( int frames, double
  
  char *mlt_property_get_time( mlt_property self, mlt_time_format format, 
double fps, locale_t locale )
  {
@@ -85,7 +93,7 @@ Index: src/framework/mlt_property.c
        char *orig_localename = NULL;
  #endif
        int frames = 0;
-@@ -1046,7 +1050,7 @@ char *mlt_property_get_time( mlt_property self, mlt_ti
+@@ -1050,7 +1050,7 @@ char *mlt_property_get_time( mlt_property self, mlt_ti
        if ( format == mlt_time_frames )
                return mlt_property_get_string_l( self, locale );
  
@@ -94,7 +102,7 @@ Index: src/framework/mlt_property.c
        // Use the specified locale
        if ( locale )
        {
-@@ -1105,7 +1109,7 @@ char *mlt_property_get_time( mlt_property self, mlt_ti
+@@ -1109,7 +1109,7 @@ char *mlt_property_get_time( mlt_property self, mlt_ti
        else // Use smpte drop frame by default
                time_smpte_from_frames( frames, fps, self->prop_string, 1 );
  
@@ -103,7 +111,12 @@ Index: src/framework/mlt_property.c
        // Restore the current locale
        if ( locale )
        {
-@@ -1149,7 +1153,7 @@ static int is_property_numeric( mlt_property self, loc
+@@ -1149,11 +1149,11 @@ static int is_property_numeric( mlt_property self, loc
+       {
+               char *p = NULL;
+ 
+-#if defined(__GLIBC__) || defined(__APPLE__) || defined(HAVE_STRTOD_L)
++#if defined(__GLIBC__) || defined(__APPLE__) || defined(HAVE_STRTOD_L) && 
!defined(__OpenBSD__)
                if ( locale )
                        strtod_l( self->prop_string, &p, locale );
                else
@@ -112,7 +125,7 @@ Index: src/framework/mlt_property.c
                char *orig_localename = NULL;
                if ( locale ) {
                        // Protect damaging the global locale from a temporary 
locale on another thread.
-@@ -1165,7 +1169,7 @@ static int is_property_numeric( mlt_property self, loc
+@@ -1169,7 +1169,7 @@ static int is_property_numeric( mlt_property self, loc
  
                strtod( self->prop_string, &p );
  
@@ -121,7 +134,7 @@ Index: src/framework/mlt_property.c
                if ( locale ) {
                        // Restore the current locale
                        setlocale( LC_NUMERIC, orig_localename );
-@@ -1650,7 +1654,7 @@ mlt_rect mlt_property_get_rect( mlt_property self, loc
+@@ -1654,7 +1654,7 @@ mlt_rect mlt_property_get_rect( mlt_property self, loc
                char *p = NULL;
                int count = 0;
  
@@ -130,7 +143,16 @@ Index: src/framework/mlt_property.c
                char *orig_localename = NULL;
                if ( locale ) {
                        // Protect damaging the global locale from a temporary 
locale on another thread.
-@@ -1702,7 +1706,7 @@ mlt_rect mlt_property_get_rect( mlt_property self, loc
+@@ -1671,7 +1671,7 @@ mlt_rect mlt_property_get_rect( mlt_property self, loc
+               while ( *value )
+               {
+                       double temp;
+-#if defined(__GLIBC__) || defined(__APPLE__) || defined(HAVE_STRTOD_L)
++#if defined(__GLIBC__) || defined(__APPLE__) || defined(HAVE_STRTOD_L) && 
!defined(__OpenBSD__)
+                       if ( locale )
+                               temp = strtod_l( value, &p, locale );
+             else
+@@ -1706,7 +1706,7 @@ mlt_rect mlt_property_get_rect( mlt_property self, loc
                        count ++;
                }
  
diff --git 
a/multimedia/mlt/patches/patch-src_modules_avformat_producer_avformat_c 
b/multimedia/mlt/patches/patch-src_modules_avformat_producer_avformat_c
deleted file mode 100644
index 127fa84962e..00000000000
--- a/multimedia/mlt/patches/patch-src_modules_avformat_producer_avformat_c
+++ /dev/null
@@ -1,23 +0,0 @@
-$OpenBSD: patch-src_modules_avformat_producer_avformat_c,v 1.2 2020/08/24 
14:09:54 rsadowski Exp $
-
-Index: src/modules/avformat/producer_avformat.c
---- src/modules/avformat/producer_avformat.c.orig
-+++ src/modules/avformat/producer_avformat.c
-@@ -778,10 +778,13 @@ static int producer_open(producer_avformat self, mlt_p
- 
-       if ( !self->is_mutex_init )
-       {
--              pthread_mutex_init( &self->audio_mutex, NULL );
--              pthread_mutex_init( &self->video_mutex, NULL );
--              pthread_mutex_init( &self->packets_mutex, NULL );
--              pthread_mutex_init( &self->open_mutex, NULL );
-+              pthread_mutexattr_t attr;
-+              pthread_mutexattr_init(&attr);
-+              pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
-+              pthread_mutex_init( &self->audio_mutex, &attr );
-+              pthread_mutex_init( &self->video_mutex, &attr );
-+              pthread_mutex_init( &self->packets_mutex, &attr );
-+              pthread_mutex_init( &self->open_mutex, &attr );
-               self->is_mutex_init = 1;
-       }
- 
diff --git a/multimedia/mlt/patches/patch-src_modules_qt_Makefile 
b/multimedia/mlt/patches/patch-src_modules_qt_Makefile
index 1370d8697a5..de9fee9dc30 100644
--- a/multimedia/mlt/patches/patch-src_modules_qt_Makefile
+++ b/multimedia/mlt/patches/patch-src_modules_qt_Makefile
@@ -3,7 +3,7 @@ XXX Dirty hack
 Index: src/modules/qt/Makefile
 --- src/modules/qt/Makefile.orig
 +++ src/modules/qt/Makefile
-@@ -34,6 +34,10 @@ ifdef USE_FFTW
+@@ -37,6 +37,10 @@ ifdef USE_FFTW
        CFLAGS += -DUSE_FFTW
  endif
  
diff --git a/multimedia/mlt/pkg/PLIST-main b/multimedia/mlt/pkg/PLIST-main
index d62b8f2f692..efbb17d1e90 100644
--- a/multimedia/mlt/pkg/PLIST-main
+++ b/multimedia/mlt/pkg/PLIST-main
@@ -74,6 +74,7 @@ lib/mlt/
 @so lib/mlt/libmltplus.so
 @so lib/mlt/libmltsdl.so
 @so lib/mlt/libmltsox.so
+@so lib/mlt/libmltvidstab.so
 @so lib/mlt/libmltvmfx.so
 @so lib/mlt/libmltvorbis.so
 @so lib/mlt/libmltxml.so
@@ -93,6 +94,7 @@ share/mlt/core/filter_audiomap.yml
 share/mlt/core/filter_audiowave.yml
 share/mlt/core/filter_brightness.yml
 share/mlt/core/filter_channelcopy.yml
+share/mlt/core/filter_choppy.yml
 share/mlt/core/filter_crop.yml
 share/mlt/core/filter_data_show.yml
 share/mlt/core/filter_fieldorder.yml
@@ -194,9 +196,11 @@ share/mlt/plus/filter_lift_gamma_gain.yml
 share/mlt/plus/filter_loudness.yml
 share/mlt/plus/filter_loudness_meter.yml
 share/mlt/plus/filter_lumakey.yml
+share/mlt/plus/filter_pillar_echo.yml
 share/mlt/plus/filter_rgblut.yml
 share/mlt/plus/filter_sepia.yml
 share/mlt/plus/filter_spot_remover.yml
+share/mlt/plus/filter_strobe.yml
 share/mlt/plus/filter_text.yml
 share/mlt/plus/filter_timer.yml
 share/mlt/plus/producer_blipflash.yml
@@ -207,6 +211,7 @@ share/mlt/presets/consumer/
 share/mlt/presets/consumer/avformat/
 share/mlt/presets/consumer/avformat/AAC
 share/mlt/presets/consumer/avformat/ALAC
+share/mlt/presets/consumer/avformat/AV1
 share/mlt/presets/consumer/avformat/FLAC
 share/mlt/presets/consumer/avformat/Flash
 share/mlt/presets/consumer/avformat/GIF
@@ -416,7 +421,9 @@ share/mlt/profiles/vcd_pal
 share/mlt/profiles/vertical_hd_30
 share/mlt/profiles/vertical_hd_60
 share/mlt/qt/
+share/mlt/qt/filter_qtcrop.yml
 share/mlt/qt/filter_qtext.yml
+share/mlt/qt/filter_typewriter.yml
 share/mlt/sdl/
 share/mlt/sdl/consumer_sdl.yml
 share/mlt/sdl/consumer_sdl_audio.yml
@@ -426,6 +433,9 @@ share/mlt/sdl/producer_sdl_image.yml
 share/mlt/sox/
 share/mlt/sox/filter_sox.yml
 share/mlt/sox/filter_sox_effect.yml
+share/mlt/vid.stab/
+share/mlt/vid.stab/filter_deshake.yml
+share/mlt/vid.stab/filter_vidstab.yml
 share/mlt/vmfx/
 share/mlt/vmfx/filter_chroma.yml
 share/mlt/vmfx/filter_chroma_hold.yml

Reply via email to