Accepting request 1156343 from multimedia:apps
OBS-URL: https://build.opensuse.org/request/show/1156343 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qmmp?expand=0&rev=91
This commit is contained in:
commit
122795eb19
123
qmmp-taglib2.patch
Normal file
123
qmmp-taglib2.patch
Normal file
@ -0,0 +1,123 @@
|
||||
--- a/src/plugins/Input/archive/archivetagreader.cpp
|
||||
+++ b/src/plugins/Input/archive/archivetagreader.cpp
|
||||
@@ -42,7 +42,11 @@
|
||||
return m_fileName.constData();
|
||||
#endif
|
||||
}
|
||||
+#if TAGLIB_MAJOR_VERSION >= 2
|
||||
+ virtual TagLib::ByteVector readBlock(size_t length) override
|
||||
+#else
|
||||
virtual TagLib::ByteVector readBlock(unsigned long length) override
|
||||
+#endif
|
||||
{
|
||||
char data[length];
|
||||
qint64 l = m_input->read(data, length);
|
||||
@@ -55,10 +59,17 @@
|
||||
}
|
||||
virtual void writeBlock(const TagLib::ByteVector &) override
|
||||
{}
|
||||
+#if TAGLIB_MAJOR_VERSION >= 2
|
||||
+ virtual void insert(const TagLib::ByteVector &, TagLib::offset_t, size_t) override
|
||||
+ {}
|
||||
+ virtual void removeBlock(TagLib::offset_t, size_t) override
|
||||
+ {}
|
||||
+#else
|
||||
virtual void insert(const TagLib::ByteVector &, unsigned long, unsigned long) override
|
||||
{}
|
||||
virtual void removeBlock(unsigned long, unsigned long) override
|
||||
{}
|
||||
+#endif
|
||||
virtual bool readOnly() const override
|
||||
{
|
||||
return true;
|
||||
|
||||
--- a/src/plugins/Input/flac/decoder_flac.cpp
|
||||
+++ b/src/plugins/Input/flac/decoder_flac.cpp
|
||||
@@ -295,7 +295,11 @@
|
||||
p.remove("flac://");
|
||||
p.remove(QRegularExpression("#\\d+$"));
|
||||
TagLib::FileStream stream(QStringToFileName(p), true);
|
||||
+#if TAGLIB_MAJOR_VERSION >= 2
|
||||
+ TagLib::FLAC::File fileRef(&stream);
|
||||
+#else
|
||||
TagLib::FLAC::File fileRef(&stream, TagLib::ID3v2::FrameFactory::instance());
|
||||
+#endif
|
||||
//looking for cuesheet comment
|
||||
TagLib::Ogg::XiphComment *tag = fileRef.xiphComment();
|
||||
TagLib::FLAC::Properties *ap = fileRef.audioProperties();
|
||||
|
||||
--- a/src/plugins/Input/flac/decoderflacfactory.cpp
|
||||
+++ b/src/plugins/Input/flac/decoderflacfactory.cpp
|
||||
@@ -97,7 +97,11 @@
|
||||
|
||||
if(filePath.endsWith(".flac", Qt::CaseInsensitive))
|
||||
{
|
||||
+#if TAGLIB_MAJOR_VERSION >= 2
|
||||
+ flacFile = new TagLib::FLAC::File(&stream);
|
||||
+#else
|
||||
flacFile = new TagLib::FLAC::File(&stream, TagLib::ID3v2::FrameFactory::instance());
|
||||
+#endif
|
||||
tag = flacFile->xiphComment();
|
||||
ap = flacFile->audioProperties();
|
||||
}
|
||||
|
||||
|
||||
--- a/src/plugins/Input/flac/flacmetadatamodel.cpp
|
||||
+++ b/src/plugins/Input/flac/flacmetadatamodel.cpp
|
||||
@@ -41,7 +41,11 @@
|
||||
if(m_path.endsWith(".flac", Qt::CaseInsensitive))
|
||||
{
|
||||
m_stream = new TagLib::FileStream(QStringToFileName(m_path), readOnly);
|
||||
+#if TAGLIB_MAJOR_VERSION >= 2
|
||||
+ TagLib::FLAC::File *f = new TagLib::FLAC::File(m_stream);
|
||||
+#else
|
||||
TagLib::FLAC::File *f = new TagLib::FLAC::File(m_stream, TagLib::ID3v2::FrameFactory::instance());
|
||||
+#endif
|
||||
m_tag = f->xiphComment();
|
||||
m_file = f;
|
||||
setDialogHints(dialogHints() | MetaDataModel::IsCueEditable);
|
||||
|
||||
|
||||
--- a/src/plugins/Input/mpeg/decodermpegfactory.cpp
|
||||
+++ b/src/plugins/Input/mpeg/decodermpegfactory.cpp
|
||||
@@ -220,7 +220,11 @@
|
||||
return QList<TrackInfo*>() << info;
|
||||
|
||||
TagLib::FileStream stream(QStringToFileName(path), true);
|
||||
+#if TAGLIB_MAJOR_VERSION >= 2
|
||||
+ TagLib::MPEG::File fileRef(&stream);
|
||||
+#else
|
||||
TagLib::MPEG::File fileRef(&stream, TagLib::ID3v2::FrameFactory::instance());
|
||||
+#endif
|
||||
|
||||
if (parts & TrackInfo::MetaData)
|
||||
{
|
||||
@@ -348,6 +352,11 @@
|
||||
break;
|
||||
case TagLib::MPEG::Header::Version2_5:
|
||||
info->setValue(Qmmp::FORMAT_NAME, QString("MPEG-2.5 layer %1").arg(fileRef.audioProperties()->layer()));
|
||||
+ break;
|
||||
+#if TAGLIB_MAJOR_VERSION >= 2
|
||||
+ case TagLib::MPEG::Header::Version4:
|
||||
+ info->setValue(Qmmp::FORMAT_NAME, QString("MPEG-4 layer %1").arg(fileRef.audioProperties()->layer()));
|
||||
+#endif
|
||||
}
|
||||
info->setDuration(fileRef.audioProperties()->lengthInMilliseconds());
|
||||
}
|
||||
|
||||
|
||||
|
||||
--- a/src/plugins/Input/mpeg/mpegmetadatamodel.cpp
|
||||
+++ b/src/plugins/Input/mpeg/mpegmetadatamodel.cpp
|
||||
@@ -41,7 +41,11 @@
|
||||
MetaDataModel(readOnly, MetaDataModel::IsCoverEditable)
|
||||
{
|
||||
m_stream = new TagLib::FileStream(QStringToFileName(path), readOnly);
|
||||
+#if TAGLIB_MAJOR_VERSION >= 2
|
||||
+ m_file = new TagLib::MPEG::File(m_stream);
|
||||
+#else
|
||||
m_file = new TagLib::MPEG::File(m_stream, TagLib::ID3v2::FrameFactory::instance());
|
||||
+#endif
|
||||
m_tags << new MpegFileTagModel(using_rusxmms, m_file, TagLib::MPEG::File::ID3v1);
|
||||
m_tags << new MpegFileTagModel(using_rusxmms, m_file, TagLib::MPEG::File::ID3v2);
|
||||
m_tags << new MpegFileTagModel(using_rusxmms, m_file, TagLib::MPEG::File::APE);
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 8 08:43:34 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Add qmmp-taglib2.patch: Fix build against taglib 2.0. Patch taken
|
||||
from https://sourceforge.net/p/qmmp-dev/code/11255/
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 29 09:29:18 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package qmmp
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -31,6 +31,8 @@ URL: https://qmmp.ylsoftware.com/
|
||||
Source: https://qmmp.ylsoftware.com/files/%{name}/%{mver}/%{name}-%{version}.tar.bz2
|
||||
# PATCH-FEATURE-OPENSUSE qmmp-default_pulse.patch reddwarf@opensuse.org -- Use PulseAudio instead of ALSA by default.
|
||||
Patch0: %{name}-default-pulse.patch
|
||||
# PATCH-FIX-UPSTREAM qmmp-taglib2.patch -- Fix build with taglib 2.0 (https://sourceforge.net/p/qmmp-dev/code/11255/)
|
||||
Patch1: qmmp-taglib2.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: hicolor-icon-theme
|
||||
|
Loading…
Reference in New Issue
Block a user