automatic version update by autodist [release 2.9.82-1mamba;Tue Apr 16 2024]
This commit is contained in:
parent
dbbdbfdbd9
commit
8a2cf5f63c
@ -1,85 +0,0 @@
|
||||
diff --git a/src/musicbrainz/MusicDNSAudioDecoder.cpp b/src/musicbrainz/MusicDNSAudioDecoder.cpp
|
||||
index 6216e5ce26cc3461b89aea560943ad7a79101af9..65a92fb43811d0cbdde5e2442880496b3417da68 100644
|
||||
--- a/src/musicbrainz/MusicDNSAudioDecoder.cpp
|
||||
+++ b/src/musicbrainz/MusicDNSAudioDecoder.cpp
|
||||
@@ -243,7 +243,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
|
||||
{
|
||||
if( !decodedFrame )
|
||||
{
|
||||
- decodedFrame = avcodec_alloc_frame();
|
||||
+ decodedFrame = av_frame_alloc();
|
||||
if( !decodedFrame )
|
||||
{
|
||||
warning() << "Unable to allocate enough memory to decode file.";
|
||||
@@ -251,7 +251,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
|
||||
break;
|
||||
}
|
||||
else
|
||||
- avcodec_get_frame_defaults( decodedFrame );
|
||||
+ av_frame_unref( decodedFrame );
|
||||
}
|
||||
|
||||
decoderRet = avcodec_decode_audio4( pCodecCtx, decodedFrame, &gotFrame, &avpkt );
|
||||
@@ -287,7 +287,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
|
||||
|
||||
avcodec_close( pCodecCtx );
|
||||
avformat_close_input( &pFormatCtx );
|
||||
- av_free( decodedFrame );
|
||||
+ av_frame_free( &decodedFrame );
|
||||
|
||||
return data->duration();
|
||||
}
|
||||
@@ -361,7 +361,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
|
||||
{
|
||||
if( !decodedFrame )
|
||||
{
|
||||
- decodedFrame = avcodec_alloc_frame();
|
||||
+ decodedFrame = av_frame_alloc();
|
||||
if( !decodedFrame )
|
||||
{
|
||||
warning() << "Unable to allocate enough memory to decode file.";
|
||||
@@ -369,7 +369,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
|
||||
break;
|
||||
}
|
||||
else
|
||||
- avcodec_get_frame_defaults( decodedFrame );
|
||||
+ av_frame_unref( decodedFrame );
|
||||
}
|
||||
|
||||
decoderRet = avcodec_decode_audio4( pCodecCtx, decodedFrame, &gotFrame, &avpkt );
|
||||
@@ -405,7 +405,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
|
||||
|
||||
avcodec_close( pCodecCtx );
|
||||
avformat_close_input( &pFormatCtx );
|
||||
- av_free( decodedFrame );
|
||||
+ av_frame_free( &decodedFrame );
|
||||
|
||||
return data->duration();
|
||||
}
|
||||
@@ -479,7 +479,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
|
||||
{
|
||||
if( !decodedFrame )
|
||||
{
|
||||
- decodedFrame = avcodec_alloc_frame();
|
||||
+ decodedFrame = av_frame_alloc();
|
||||
if( !decodedFrame )
|
||||
{
|
||||
warning() << "Unable to allocate enough memory to decode file.";
|
||||
@@ -487,7 +487,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
|
||||
break;
|
||||
}
|
||||
else
|
||||
- avcodec_get_frame_defaults( decodedFrame );
|
||||
+ av_frame_unref( decodedFrame );
|
||||
}
|
||||
|
||||
decoderRet = avcodec_decode_audio4( pCodecCtx, decodedFrame, &gotFrame, &avpkt );
|
||||
@@ -523,7 +523,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
|
||||
|
||||
avcodec_close( pCodecCtx );
|
||||
av_close_input_file( pFormatCtx );
|
||||
- av_free( decodedFrame );
|
||||
+ av_frame_free( &decodedFrame );
|
||||
|
||||
return data->duration();
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
--- a/cmake/modules/FindTaglib.cmake
|
||||
+++ b/cmake/modules/FindTaglib.cmake
|
||||
@@ -29,10 +29,10 @@
|
||||
|
||||
exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_VERSION)
|
||||
|
||||
- if(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}")
|
||||
+ if("${TAGLIB_MIN_VERSION}" VERSION_GREATER TAGLIB_VERSION)
|
||||
message(STATUS "TagLib version too old: version searched :${TAGLIB_MIN_VERSION}, found ${TAGLIB_VERSION}")
|
||||
set(TAGLIB_FOUND FALSE)
|
||||
- else(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}")
|
||||
+ else("${TAGLIB_MIN_VERSION}" VERSION_GREATER TAGLIB_VERSION)
|
||||
|
||||
exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_LIBRARIES)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
set(TAGLIB_FOUND TRUE)
|
||||
endif(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS)
|
||||
string(REGEX REPLACE " *-I" ";" TAGLIB_INCLUDES "${TAGLIB_CFLAGS}")
|
||||
- endif(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}")
|
||||
+ endif("${TAGLIB_MIN_VERSION}" VERSION_GREATER TAGLIB_VERSION)
|
||||
mark_as_advanced(TAGLIB_CFLAGS TAGLIB_LIBRARIES TAGLIB_INCLUDES)
|
||||
|
||||
else(TAGLIBCONFIG_EXECUTABLE)
|
||||
|
@ -1,201 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9dd9719555f79850d640872fd46731a926eda051..d18f5277536e05faf6f54273891be9b6c263c32b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -187,13 +187,8 @@ if( CMAKE_BUILD_TYPE_TOLOWER MATCHES debug )
|
||||
add_definitions(-Wall -Wextra)
|
||||
endif()
|
||||
|
||||
-# this needs to be here because also code in shared/ needs config.h. This is also the
|
||||
-# reason why various checks are above why they belong under if( WITH_PLAYER )
|
||||
-configure_file( shared/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/shared/config.h )
|
||||
-
|
||||
add_subdirectory( data )
|
||||
add_subdirectory( images )
|
||||
-add_subdirectory( shared )
|
||||
|
||||
if( WITH_PLAYER )
|
||||
find_package(X11)
|
||||
@@ -317,6 +312,12 @@ if( WITH_PLAYER )
|
||||
|
||||
endif()
|
||||
|
||||
+# this needs to be here because also code in shared/ needs config.h. This is also the
|
||||
+# reason why various checks are above why they belong under if( WITH_PLAYER )
|
||||
+configure_file( shared/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/shared/config.h )
|
||||
+
|
||||
+add_subdirectory( shared )
|
||||
+
|
||||
if( WITH_UTILITIES )
|
||||
add_subdirectory( utilities )
|
||||
endif()
|
||||
diff --git a/shared/config.h.cmake b/shared/config.h.cmake
|
||||
index 3478edd0d468d6beb182fd7ac0d0978c623cb002..9dde3306862a9662c0fb442a926e27572b6acd50 100644
|
||||
--- a/shared/config.h.cmake
|
||||
+++ b/shared/config.h.cmake
|
||||
@@ -19,10 +19,16 @@
|
||||
#cmakedefine QT_QTOPENGL_FOUND 1
|
||||
|
||||
/* If liblastfm is found */
|
||||
-#cmakedefine HAVE_LIBLASTFM 1
|
||||
+#cmakedefine LIBLASTFM_FOUND 1
|
||||
+#ifdef LIBLASTFM_FOUND
|
||||
+#define HAVE_LIBLASTFM 1
|
||||
+#endif
|
||||
|
||||
/* If libofa is found */
|
||||
-#cmakedefine HAVE_LIBOFA 1
|
||||
+#cmakedefine LIBOFA_FOUND 1
|
||||
+#ifdef LIBOFA_FOUND
|
||||
+#define HAVE_LIBOFA 1
|
||||
+#endif
|
||||
|
||||
/* Whether cmake build type is debug */
|
||||
#cmakedefine DEBUG_BUILD_TYPE
|
||||
diff --git a/src/musicbrainz/MusicDNSAudioDecoder.cpp b/src/musicbrainz/MusicDNSAudioDecoder.cpp
|
||||
index e8e14d540efb55f91a3fd79047d8a6171c4b52bb..5f86b16b35a5041c9e4933fc5f58da88c4565844 100644
|
||||
--- a/src/musicbrainz/MusicDNSAudioDecoder.cpp
|
||||
+++ b/src/musicbrainz/MusicDNSAudioDecoder.cpp
|
||||
@@ -133,8 +133,10 @@ MusicDNSAudioDecoder::run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *t
|
||||
Q_UNUSED(thread);
|
||||
DecodedAudioData data;
|
||||
|
||||
+#if LIBAVCODEC_VERSION_MAJOR < 59
|
||||
avcodec_register_all();
|
||||
av_register_all();
|
||||
+#endif
|
||||
|
||||
foreach( Meta::TrackPtr track, m_tracks )
|
||||
{
|
||||
@@ -173,7 +175,130 @@ MusicDNSAudioDecoder::defaultEnd(const ThreadWeaver::JobPointer& self, ThreadWea
|
||||
// Function below has separate implementation for each ffmpeg API version
|
||||
int
|
||||
MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, const int length )
|
||||
-#if LIBAVCODEC_VERSION_MAJOR >= 54 // ffmpeg 0.11
|
||||
+#if LIBAVCODEC_VERSION_MAJOR >= 59 // ffmpeg 5.0
|
||||
+{
|
||||
+ AVFormatContext *pFormatCtx = NULL;
|
||||
+ AVCodecContext *pCodecCtx = NULL;
|
||||
+ const AVCodec *pCodec = NULL;
|
||||
+ AVFrame *decodedFrame = NULL;
|
||||
+ AVPacket *packet = NULL, *avpkt = NULL;
|
||||
+ AVCodecParameters *codecpar = NULL;
|
||||
+ AVRational streamTimeBase = { 1, 1000000 };
|
||||
+ AVRational localTimeBase = { 1, 1000 };
|
||||
+
|
||||
+ int audioStream = 0;
|
||||
+ int decoderRet = 0;
|
||||
+ int planeSize = 0;
|
||||
+
|
||||
+ bool isOk = true;
|
||||
+ av_log_set_level(AV_LOG_VERBOSE);
|
||||
+
|
||||
+ if( avformat_open_input( &pFormatCtx, fileName.toLocal8Bit(), NULL, NULL ) < 0 )
|
||||
+ {
|
||||
+ warning() << QLatin1String( "Unable to open input file: " ) + fileName;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if( avformat_find_stream_info( pFormatCtx, NULL ) < 0 )
|
||||
+ {
|
||||
+ warning() << QLatin1String( "Unable to find stream info: " ) + fileName;
|
||||
+ avformat_close_input( &pFormatCtx );
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ audioStream = av_find_best_stream(pFormatCtx, AVMEDIA_TYPE_AUDIO, -1, -1, &pCodec, 0);
|
||||
+ if( audioStream < 0 )
|
||||
+ {
|
||||
+ warning() << QLatin1String( "Unable to find stream: " ) + fileName;
|
||||
+ avformat_close_input( &pFormatCtx );
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if( !pCodec )
|
||||
+ {
|
||||
+ warning() << QLatin1String( "Unable to find decoder: " ) + fileName;
|
||||
+ avformat_close_input( &pFormatCtx );
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ pCodecCtx = avcodec_alloc_context3(pCodec);
|
||||
+
|
||||
+ if( avcodec_open2( pCodecCtx, pCodec, NULL ) < 0 )
|
||||
+ {
|
||||
+ warning() << QLatin1String( "Unable to open codec " ) + fileName;
|
||||
+ avformat_close_input( &pFormatCtx );
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ streamTimeBase = pFormatCtx->streams[audioStream]->time_base;
|
||||
+ codecpar = pFormatCtx->streams[audioStream]->codecpar;
|
||||
+
|
||||
+ data->setSampleRate( codecpar->sample_rate );
|
||||
+ data->setChannels( ( codecpar->channels > 1 )? 1 : 0 );
|
||||
+
|
||||
+ avpkt = av_packet_alloc();
|
||||
+ packet = av_packet_alloc();
|
||||
+ while( !av_read_frame( pFormatCtx, packet ) && isOk )
|
||||
+ {
|
||||
+ if( packet->stream_index == audioStream )
|
||||
+ {
|
||||
+ avpkt->size = packet->size;
|
||||
+ avpkt->data = packet->data;
|
||||
+ if( !decodedFrame )
|
||||
+ {
|
||||
+ decodedFrame = av_frame_alloc();
|
||||
+ if( !decodedFrame )
|
||||
+ {
|
||||
+ warning() << "Unable to allocate enough memory to decode file.";
|
||||
+ isOk = false;
|
||||
+ break;
|
||||
+ }
|
||||
+ else
|
||||
+ av_frame_unref( decodedFrame );
|
||||
+ }
|
||||
+
|
||||
+ decoderRet = avcodec_send_packet( pCodecCtx, avpkt );
|
||||
+ if( decoderRet < 0 )
|
||||
+ {
|
||||
+ warning() << "Error while sending avcodec packet.";
|
||||
+ isOk = false;
|
||||
+ break;
|
||||
+ }
|
||||
+ do {
|
||||
+ decoderRet = avcodec_receive_frame( pCodecCtx, decodedFrame );
|
||||
+ if( decoderRet == AVERROR(AVERROR_EOF) || decoderRet == AVERROR(EAGAIN) )
|
||||
+ {
|
||||
+ break;
|
||||
+ }
|
||||
+ else if( decoderRet < 0 )
|
||||
+ {
|
||||
+ warning() << "Error while decoding.";
|
||||
+ isOk = false;
|
||||
+ break;
|
||||
+ }
|
||||
+ av_samples_get_buffer_size( &planeSize, pCodecCtx->channels, decodedFrame->nb_samples, pCodecCtx->sample_fmt, 1);
|
||||
+ for( int i = 0; i < qMin( pCodecCtx->channels, 2 ); i++ )
|
||||
+ data->appendData( const_cast<const quint8 *>( decodedFrame->extended_data[i] ), planeSize );
|
||||
+ } while( decoderRet == 0 );
|
||||
+
|
||||
+ data->addTime( av_rescale_q( packet->duration, streamTimeBase, localTimeBase ) );
|
||||
+ }
|
||||
+
|
||||
+ av_packet_unref( packet );
|
||||
+
|
||||
+ if( data->duration() >= length )
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ av_packet_unref( avpkt );
|
||||
+
|
||||
+ avcodec_close( pCodecCtx );
|
||||
+ avformat_close_input( &pFormatCtx );
|
||||
+ av_free( decodedFrame );
|
||||
+
|
||||
+ return data->duration();
|
||||
+}
|
||||
+#elif LIBAVCODEC_VERSION_MAJOR >= 54 // ffmpeg 0.11
|
||||
{
|
||||
AVFormatContext *pFormatCtx = NULL;
|
||||
AVCodecContext *pCodecCtx = NULL;
|
21
amarok.spec
21
amarok.spec
@ -1,6 +1,5 @@
|
||||
%define gittag %(echo %version | cut -d. -f5)
|
||||
Name: amarok
|
||||
Version: 2.9.71.20220415git.276ffa5a4
|
||||
Version: 2.9.82
|
||||
Release: 1mamba
|
||||
Epoch: 1
|
||||
Summary: A powerful music player for KDE
|
||||
@ -9,11 +8,8 @@ Vendor: openmamba
|
||||
Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: https://amarok.kde.org
|
||||
Source: https://github.com/KDE/amarok.git/master@%{gittag?%gittag:"dont"}/amarok-%{version}.tar.bz2
|
||||
Source: https://download.kde.org/unstable/amarok/%{version}/amarok-%{version}.tar.xz
|
||||
Patch0: amarok-2.8.0-x86_64-include-QSharedPointer.patch
|
||||
Patch1: amarok-2.8.0-libtag-1.10.patch
|
||||
Patch2: amarok-2.8.0-ffmpeg-3.0.patch
|
||||
Patch3: amarok-2.9.75-ffmpeg-5.0.patch
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
@ -69,17 +65,13 @@ BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: qt5-qtdeclarative-devel
|
||||
## AUTOBUILDREQ-END
|
||||
BuildRequires: coreutils
|
||||
#BuildRequires: libmpeg4ip-devel
|
||||
BuildRequires: ldconfig
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: libxml2-utils
|
||||
BuildRequires: libtag-devel >= 1.10
|
||||
BuildRequires: gmock-devel
|
||||
BuildRequires: liblastfm5-devel >= 1.1.0
|
||||
BuildRequires: libmygpo-qt-devel >= 1.1.0
|
||||
BuildRequires: libmariadb-devel >= 10.4.13
|
||||
BuildRequires: clamz
|
||||
BuildRequires: qtscriptgenerator
|
||||
Requires: libvisual-plugins
|
||||
@ -120,9 +112,6 @@ Amarok is a powerful music player for Linux and Unix, MacOS X and Windows with a
|
||||
#-D -T
|
||||
#:<< _EOF
|
||||
%patch 0 -p1
|
||||
#%patch1 -p1
|
||||
#%patch2 -p1
|
||||
%patch3 -p1 -b .ffmpeg-5.0
|
||||
|
||||
sed -i "s|mygpo-qt5/|mygpo-qt/|" src/services/gpodder/*.h src/services/gpodder/*.cpp
|
||||
|
||||
@ -209,6 +198,12 @@ exit 0
|
||||
%doc AUTHORS COPYING
|
||||
|
||||
%changelog
|
||||
* Tue Apr 16 2024 Automatic Build System <autodist@openmamba.org> 2.9.82-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Tue Apr 19 2022 Automatic Build System <autodist@mambasoft.it> 2.9.75-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Fri Apr 15 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 2.9.71.20220415git.276ffa5a4-1mamba
|
||||
- update to 2.9.71.20220415git.276ffa5a4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user