Updating link to change in openSUSE:Factory/vlc revision 143
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/vlc?expand=0&rev=ab1a93fbdfb307cac5e04b283996cbe3
This commit is contained in:
parent
807c978a07
commit
04e7a7718d
171
vlc-taglib-2.0.patch
Normal file
171
vlc-taglib-2.0.patch
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
From ec29dfca1e59530dd412d779e0b045079b72ffb6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vikram Kangotra <vikramkangotra8055@gmail.com>
|
||||||
|
Date: Sat, 3 Feb 2024 02:52:52 +0530
|
||||||
|
Subject: [PATCH] Taglib: Use ID3v2Tag() instead of tag() for RIFF::WAV::File
|
||||||
|
|
||||||
|
`WriteMetaToId3v2` expects a `ID3v2::Tag` instead of `Tag`, but Since TagLib v2.0,
|
||||||
|
`RIFF::WAV::File::tag()` returns a `Tag` instead of `ID3v2::Tag`, hence replace
|
||||||
|
the usage of `tag()` method with `ID3v2Tag()`.
|
||||||
|
|
||||||
|
https://github.com/taglib/taglib/blob/master/taglib/riff/wav/wavfile.h#L124
|
||||||
|
|
||||||
|
Additionally, to resolve the compilation error, the function signatures of
|
||||||
|
`insert` and `removeBlock` have been adjusted to align with the base class
|
||||||
|
functions.
|
||||||
|
---
|
||||||
|
modules/meta_engine/taglib.cpp | 40 ++++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 40 insertions(+)
|
||||||
|
|
||||||
|
Index: vlc-3.0.20/modules/meta_engine/taglib.cpp
|
||||||
|
===================================================================
|
||||||
|
--- vlc-3.0.20.orig/modules/meta_engine/taglib.cpp
|
||||||
|
+++ vlc-3.0.20/modules/meta_engine/taglib.cpp
|
||||||
|
@@ -125,7 +125,11 @@ VLCTagLib::ExtResolver<T>::ExtResolver(c
|
||||||
|
template <class T>
|
||||||
|
File *VLCTagLib::ExtResolver<T>::createFile(FileName fileName, bool, AudioProperties::ReadStyle) const
|
||||||
|
{
|
||||||
|
+#if defined(_WIN32) && TAGLIB_VERSION >= VERSION_INT(2, 0, 0)
|
||||||
|
+ std::string filename = fileName.toString().to8Bit(true);
|
||||||
|
+#else
|
||||||
|
std::string filename = std::string(fileName);
|
||||||
|
+#endif
|
||||||
|
std::size_t namesize = filename.size();
|
||||||
|
|
||||||
|
if (namesize > ext.length())
|
||||||
|
@@ -180,12 +184,16 @@ public:
|
||||||
|
return m_stream->psz_location;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0)
|
||||||
|
+ ByteVector readBlock(size_t length)
|
||||||
|
+#else
|
||||||
|
ByteVector readBlock(ulong length)
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
ByteVector res(length, 0);
|
||||||
|
ssize_t i_read = vlc_stream_Read( m_stream, res.data(), length);
|
||||||
|
if (i_read < 0)
|
||||||
|
- return ByteVector::null;
|
||||||
|
+ return {};
|
||||||
|
else if ((size_t)i_read != length)
|
||||||
|
res.resize(i_read);
|
||||||
|
return res;
|
||||||
|
@@ -196,11 +204,19 @@ public:
|
||||||
|
// Let's stay Read-Only for now
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0)
|
||||||
|
+ void insert(const ByteVector&, offset_t, size_t)
|
||||||
|
+#else
|
||||||
|
void insert(const ByteVector&, ulong, ulong)
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0)
|
||||||
|
+ void removeBlock(offset_t, size_t)
|
||||||
|
+#else
|
||||||
|
void removeBlock(ulong, ulong)
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -214,7 +230,11 @@ public:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0)
|
||||||
|
+ void seek(offset_t offset, Position p)
|
||||||
|
+#else
|
||||||
|
void seek(long offset, Position p)
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
uint64_t pos = 0;
|
||||||
|
switch (p)
|
||||||
|
@@ -237,12 +257,20 @@ public:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0)
|
||||||
|
+ offset_t tell() const
|
||||||
|
+#else
|
||||||
|
long tell() const
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
return m_previousPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0)
|
||||||
|
+ offset_t length()
|
||||||
|
+#else
|
||||||
|
long length()
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
uint64_t i_size;
|
||||||
|
if (vlc_stream_GetSize( m_stream, &i_size ) != VLC_SUCCESS)
|
||||||
|
@@ -250,7 +278,11 @@ public:
|
||||||
|
return i_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0)
|
||||||
|
+ void truncate(offset_t)
|
||||||
|
+#else
|
||||||
|
void truncate(long)
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -465,7 +497,7 @@ static void ReadMetaFromASF( ASF::Tag* t
|
||||||
|
static void ReadMetaFromBasicTag(const Tag* tag, vlc_meta_t *dest)
|
||||||
|
{
|
||||||
|
#define SET( accessor, meta ) \
|
||||||
|
- if( !tag->accessor().isNull() && !tag->accessor().isEmpty() ) \
|
||||||
|
+ if( !tag->accessor().isEmpty() ) \
|
||||||
|
vlc_meta_Set##meta( dest, tag->accessor().toCString(true) )
|
||||||
|
#define SETINT( accessor, meta ) \
|
||||||
|
if( tag->accessor() ) \
|
||||||
|
@@ -806,15 +838,15 @@ static void ReadMetaFromMP4( MP4::Tag* t
|
||||||
|
{
|
||||||
|
MP4::Item list;
|
||||||
|
#define SET( keyName, metaName ) \
|
||||||
|
- if( tag->itemListMap().contains(keyName) ) \
|
||||||
|
+ if( tag->contains(keyName) ) \
|
||||||
|
{ \
|
||||||
|
- list = tag->itemListMap()[keyName]; \
|
||||||
|
+ list = tag->item(keyName); \
|
||||||
|
vlc_meta_Set##metaName( p_meta, list.toStringList().front().toCString( true ) ); \
|
||||||
|
}
|
||||||
|
#define SET_EXTRA( keyName, metaName ) \
|
||||||
|
- if( tag->itemListMap().contains(keyName) ) \
|
||||||
|
- { \
|
||||||
|
- list = tag->itemListMap()[keyName]; \
|
||||||
|
+ if( tag->contains(keyName) ) \
|
||||||
|
+ { \
|
||||||
|
+ list = tag->item(keyName); \
|
||||||
|
vlc_meta_AddExtra( p_meta, metaName, list.toStringList().front().toCString( true ) ); \
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -824,9 +856,9 @@ static void ReadMetaFromMP4( MP4::Tag* t
|
||||||
|
#undef SET
|
||||||
|
#undef SET_EXTRA
|
||||||
|
|
||||||
|
- if( tag->itemListMap().contains("covr") )
|
||||||
|
+ if( tag->contains("covr") )
|
||||||
|
{
|
||||||
|
- MP4::CoverArtList list = tag->itemListMap()["covr"].toCoverArtList();
|
||||||
|
+ MP4::CoverArtList list = tag->item("covr").toCoverArtList();
|
||||||
|
const char *psz_format = list[0].format() == MP4::CoverArt::PNG ? "image/png" : "image/jpeg";
|
||||||
|
|
||||||
|
msg_Dbg( p_demux_meta, "Found embedded art (%s) is %i bytes",
|
||||||
|
@@ -1337,7 +1369,11 @@ static int WriteMeta( vlc_object_t *p_th
|
||||||
|
if( RIFF::AIFF::File* riff_aiff = dynamic_cast<RIFF::AIFF::File*>(f.file()) )
|
||||||
|
WriteMetaToId3v2( riff_aiff->tag(), p_item );
|
||||||
|
else if( RIFF::WAV::File* riff_wav = dynamic_cast<RIFF::WAV::File*>(f.file()) )
|
||||||
|
+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0)
|
||||||
|
+ WriteMetaToId3v2( riff_wav->ID3v2Tag(), p_item );
|
||||||
|
+#else
|
||||||
|
WriteMetaToId3v2( riff_wav->tag(), p_item );
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
else if( TrueAudio::File* trueaudio = dynamic_cast<TrueAudio::File*>(f.file()) )
|
||||||
|
{
|
11
vlc.changes
11
vlc.changes
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 27 08:39:03 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
- Add vlc-taglib-2.0.patch: Fix build against taglib 2.0 (based on
|
||||||
|
upstream commit ec29dfca, d2663d6c, ac59d0ba, c404fdb2).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 20 13:26:01 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
- Use %patch -P N instead of deprecated %patchN.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Feb 2 09:50:53 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
|
Fri Feb 2 09:50:53 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
|
||||||
|
|
||||||
|
17
vlc.spec
17
vlc.spec
@ -53,6 +53,8 @@ Patch2: vlc-lua-5.3.patch
|
|||||||
Patch4: fix-build-with-fdk-2.0.patch
|
Patch4: fix-build-with-fdk-2.0.patch
|
||||||
# PATCH-FIX-UPSTREAM -- Backport libplacebo v5 compatibility patch to vlc v3
|
# PATCH-FIX-UPSTREAM -- Backport libplacebo v5 compatibility patch to vlc v3
|
||||||
Patch5: vlc-libplacebo-5.patch
|
Patch5: vlc-libplacebo-5.patch
|
||||||
|
# PATCH-FIX-UPSTREAM vlc-taglib-2.0.patch dimstar@opensuse.org -- Fix build against taglib 2.0
|
||||||
|
Patch6: vlc-taglib-2.0.patch
|
||||||
# PATCH-FEATURE-OPENSUSE vlc-projectM-qt5.patch -- Build against projectM-qt5; openSUSE provides projectM as -qt and -qt5 variant
|
# PATCH-FEATURE-OPENSUSE vlc-projectM-qt5.patch -- Build against projectM-qt5; openSUSE provides projectM as -qt and -qt5 variant
|
||||||
Patch100: vlc-projectM-qt5.patch
|
Patch100: vlc-projectM-qt5.patch
|
||||||
# PATCH-FIX-UPSTREAM -- Use OpenCV C++ API
|
# PATCH-FIX-UPSTREAM -- Use OpenCV C++ API
|
||||||
@ -395,25 +397,26 @@ OpenCV based video filters and a face detection example.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1
|
%patch -P 1 -p1
|
||||||
%patch4 -p1
|
%patch -P 4 -p1
|
||||||
|
%patch -P 6 -p1
|
||||||
%if 0%{?suse_version} > 1320 && 0%{?suse_version} < 1550 && 0%{?sle_version} < 150200
|
%if 0%{?suse_version} > 1320 && 0%{?suse_version} < 1550 && 0%{?sle_version} < 150200
|
||||||
%patch100 -p1
|
%patch -P 100 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch103 -p1
|
%patch -P 103 -p1
|
||||||
|
|
||||||
# a52_init() < 0.8.0 doesn't take any arguments
|
# a52_init() < 0.8.0 doesn't take any arguments
|
||||||
if pkg-config --max-version 0.8 liba52; then
|
if pkg-config --max-version 0.8 liba52; then
|
||||||
%patch0 -p1
|
%patch -P 0 -p1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### And LUA 5.3.1 has some more API changes
|
### And LUA 5.3.1 has some more API changes
|
||||||
if pkg-config --atleast-version 5.3.1 lua; then
|
if pkg-config --atleast-version 5.3.1 lua; then
|
||||||
%patch2 -p1
|
%patch -P 2 -p1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if pkg-config --atleast-version 5 libplacebo; then
|
if pkg-config --atleast-version 5 libplacebo; then
|
||||||
%patch5 -p1
|
%patch -P 5 -p1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# We do not rely on contrib but make use of system libraries
|
# We do not rely on contrib but make use of system libraries
|
||||||
|
Loading…
x
Reference in New Issue
Block a user