Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package easytag for openSUSE:Factory checked in at 2025-02-28 17:38:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/easytag (Old) and /work/SRC/openSUSE:Factory/.easytag.new.19136 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "easytag" Fri Feb 28 17:38:59 2025 rev:30 rq:1249075 version:2.4.3+161 Changes: -------- --- /work/SRC/openSUSE:Factory/easytag/easytag.changes 2024-09-27 17:12:34.353358277 +0200 +++ /work/SRC/openSUSE:Factory/.easytag.new.19136/easytag.changes 2025-02-28 17:39:46.149697009 +0100 @@ -1,0 +2,17 @@ +Thu Feb 27 17:57:08 UTC 2025 - Bjørn Lie <[email protected]> + +- Add upstream patches, lifted from debian, fix build for 32bit: + + 01_remove-pixdata.patch + + 02_fix-ogg-corruption.patch + + 03_port-to-taglib-2.patch + + 04_taglib-2-further-fix.patch +- Drop easytag-revert-open-handle-ogg.patch, + easytag-taglib-2.0.patch and ExcludeArch: i586, no longer needed. + +------------------------------------------------------------------- +Sun Feb 16 11:03:15 UTC 2025 - Bjørn Lie <[email protected]> + +- Exclude i586 as buildtarget, broken for ages with no fix in + sight. + +------------------------------------------------------------------- Old: ---- easytag-revert-open-handle-ogg.patch easytag-taglib-2.0.patch New: ---- 01_remove-pixdata.patch 02_fix-ogg-corruption.patch 03_port-to-taglib-2.patch 04_taglib-2-further-fix.patch BETA DEBUG BEGIN: Old: + 04_taglib-2-further-fix.patch - Drop easytag-revert-open-handle-ogg.patch, easytag-taglib-2.0.patch and ExcludeArch: i586, no longer needed. Old:- Drop easytag-revert-open-handle-ogg.patch, easytag-taglib-2.0.patch and ExcludeArch: i586, no longer needed. BETA DEBUG END: BETA DEBUG BEGIN: New:- Add upstream patches, lifted from debian, fix build for 32bit: + 01_remove-pixdata.patch + 02_fix-ogg-corruption.patch New: + 01_remove-pixdata.patch + 02_fix-ogg-corruption.patch + 03_port-to-taglib-2.patch New: + 02_fix-ogg-corruption.patch + 03_port-to-taglib-2.patch + 04_taglib-2-further-fix.patch New: + 03_port-to-taglib-2.patch + 04_taglib-2-further-fix.patch - Drop easytag-revert-open-handle-ogg.patch, BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ easytag.spec ++++++ --- /var/tmp/diff_new_pack.Dsb2yb/_old 2025-02-28 17:39:50.733888861 +0100 +++ /var/tmp/diff_new_pack.Dsb2yb/_new 2025-02-28 17:39:50.753889698 +0100 @@ -1,7 +1,7 @@ # # spec file for package easytag # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,10 +25,15 @@ Group: Productivity/Multimedia/Sound/Utilities URL: https://projects.gnome.org/easytag/ Source0: %{name}-%{version}.tar.zst -# PATCH-FIX-UPSTREAM easytag-revert-open-handle-ogg.patch bgo#776110 boo#1069789 [email protected] -- Revert commit causing corruption in oggfiles -Patch0: easytag-revert-open-handle-ogg.patch -# PATCH-FIX-UPSTREAM easytag-taglib-2.0.patch glgo#GNOME/easytag#92 [email protected] -- Fix build against taglib 2.0 -Patch1: easytag-taglib-2.0.patch +# PATCH-FIX-UPSTREAM 01_remove-pixdata.patch -- Don't use gdk-pixbuf-pixdata for image resources +Patch0: 01_remove-pixdata.patch +# PATCH-FIX-UPSTREAM 02_fix-ogg-corruption.patch -- Revert upstream commit which causes OGG file corruption +Patch1: 02_fix-ogg-corruption.patch +# PATCH-FIX-UPSTREAM 03_port-to-taglib-2.patch -- Port to taglib 2 +Patch2: 03_port-to-taglib-2.patch +# PATCH-FIX-UPSTREAM 04_taglib-2-further-fix.patch -- Further fix compatibility with taglib 2.x on 32-bit architecture. +Patch3: 04_taglib-2-further-fix.patch + BuildRequires: appstream-glib-devel BuildRequires: gcc-c++ BuildRequires: gtk-doc ++++++ 01_remove-pixdata.patch ++++++ From: James Cowgill <[email protected]> Date: Sat, 11 Jan 2025 14:43:16 -0500 Subject: Don't use gdk-pixbuf-pixdata for image resources Bug-Debian: https://bugs.debian.org/886137 Bug-Debian: https://bugs.debian.org/886137 --- configure.ac | 4 ---- data/org.gnome.EasyTAG.gresource.xml | 28 ++++++++++++++-------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/configure.ac b/configure.ac index f20318d..ac8b436 100644 --- a/configure.ac +++ b/configure.ac @@ -51,10 +51,6 @@ AX_GENERATE_CHANGELOG AC_SUBST([GLIB_COMPILE_RESOURCES], [`$PKG_CONFIG --variable glib_compile_resources gio-2.0`]) -AC_PATH_PROG([GDK_PIXBUF_PIXDATA], [gdk-pixbuf-pixdata]) -AS_IF([test "x$ac_cv_path_GDK_PIXBUF_PIXDATA" = "x"], - [AC_MSG_ERROR([gdk-pixbuf-pixdata is required for image resources])]) - AC_MSG_CHECKING([for glib-mkenums script]) GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` AS_IF([test "x$GLIB_MKENUMS" = "x"], diff --git a/data/org.gnome.EasyTAG.gresource.xml b/data/org.gnome.EasyTAG.gresource.xml index 21418a4..aba263b 100644 --- a/data/org.gnome.EasyTAG.gresource.xml +++ b/data/org.gnome.EasyTAG.gresource.xml @@ -15,19 +15,19 @@ <file preprocess='xml-stripblanks'>search_dialog.ui</file> <file preprocess='xml-stripblanks'>tag_area.ui</file> <file preprocess='xml-stripblanks'>toolbar.ui</file> - <file preprocess='to-pixdata'>images/all-lowercase.png</file> - <file preprocess='to-pixdata'>images/all-uppercase.png</file> - <file preprocess='to-pixdata'>images/artist-album.png</file> - <file preprocess='to-pixdata'>images/artist.png</file> - <file preprocess='to-pixdata'>images/first-letter-uppercase.png</file> - <file preprocess='to-pixdata'>images/first-letter-uppercase-word.png</file> - <file preprocess='to-pixdata'>images/freedb.png</file> - <file preprocess='to-pixdata'>images/gnudb.png</file> - <file preprocess='to-pixdata'>images/invert-selection.png</file> - <file preprocess='to-pixdata'>images/mask.png</file> - <file preprocess='to-pixdata'>images/musicbrainz.png</file> - <file preprocess='to-pixdata'>images/red-lines.png</file> - <file preprocess='to-pixdata'>images/sequence-track.png</file> - <file preprocess='to-pixdata'>images/unselect-all.png</file> + <file>images/all-lowercase.png</file> + <file>images/all-uppercase.png</file> + <file>images/artist-album.png</file> + <file>images/artist.png</file> + <file>images/first-letter-uppercase.png</file> + <file>images/first-letter-uppercase-word.png</file> + <file>images/freedb.png</file> + <file>images/gnudb.png</file> + <file>images/invert-selection.png</file> + <file>images/mask.png</file> + <file>images/musicbrainz.png</file> + <file>images/red-lines.png</file> + <file>images/sequence-track.png</file> + <file>images/unselect-all.png</file> </gresource> </gresources> ++++++ 02_fix-ogg-corruption.patch ++++++ diff --git a/src/tags/vcedit.c b/src/tags/vcedit.c index b19b920..8d3dae4 100644 --- a/src/tags/vcedit.c +++ b/src/tags/vcedit.c @@ -35,6 +35,7 @@ struct _EtOggState { /*< private >*/ + GFileInputStream *in; #ifdef ENABLE_SPEEX SpeexHeader *si; #endif @@ -125,6 +126,11 @@ vcedit_clear_internals (EtOggState *state) } #endif /* ENABLE_OPUS */ + if (state->in) + { + g_object_unref (state->in); + } + memset (state, 0, sizeof (*state)); } @@ -239,7 +245,6 @@ _blocksize (EtOggState *s, static gboolean _fetch_next_packet (EtOggState *s, - GInputStream *istream, ogg_packet *p, ogg_page *page, GError **error) @@ -269,8 +274,8 @@ _fetch_next_packet (EtOggState *s, while (ogg_sync_pageout (s->oy, page) <= 0) { buffer = ogg_sync_buffer (s->oy, CHUNKSIZE); - bytes = g_input_stream_read (istream, buffer, CHUNKSIZE, NULL, - error); + bytes = g_input_stream_read (G_INPUT_STREAM (s->in), buffer, + CHUNKSIZE, NULL, error); ogg_sync_wrote (s->oy, bytes); if(bytes == 0) @@ -303,7 +308,7 @@ _fetch_next_packet (EtOggState *s, g_assert (error == NULL || *error == NULL); ogg_stream_pagein (s->os, page); - return _fetch_next_packet (s, istream, p, page, error); + return _fetch_next_packet (s, p, page, error); } } @@ -492,13 +497,14 @@ vcedit_open (EtOggState *state, return FALSE; } + state->in = istream; state->oy = g_slice_new (ogg_sync_state); ogg_sync_init (state->oy); while(1) { buffer = ogg_sync_buffer (state->oy, CHUNKSIZE); - bytes = g_input_stream_read (G_INPUT_STREAM (istream), buffer, + bytes = g_input_stream_read (G_INPUT_STREAM (state->in), buffer, CHUNKSIZE, NULL, error); if (bytes == -1) { @@ -748,7 +754,7 @@ vcedit_open (EtOggState *state, } buffer = ogg_sync_buffer (state->oy, CHUNKSIZE); - bytes = g_input_stream_read (G_INPUT_STREAM (istream), buffer, + bytes = g_input_stream_read (G_INPUT_STREAM (state->in), buffer, CHUNKSIZE, NULL, error); if (bytes == -1) @@ -770,14 +776,11 @@ vcedit_open (EtOggState *state, /* Headers are done! */ g_assert (error == NULL || *error == NULL); - /* TODO: Handle error during stream close. */ - g_object_unref (istream); return TRUE; err: g_assert (error == NULL || *error != NULL); - g_object_unref (istream); vcedit_clear_internals (state); return FALSE; } @@ -800,7 +803,6 @@ vcedit_write (EtOggState *state, glong bytes; gboolean needflush = FALSE; gboolean needout = FALSE; - GFileInputStream *istream; GOutputStream *ostream; gchar *buf; gsize size; @@ -808,22 +810,11 @@ vcedit_write (EtOggState *state, g_return_val_if_fail (error == NULL || *error == NULL, FALSE); - istream = g_file_read (file, NULL, error); - - if (!istream) - { - g_assert (error == NULL || *error != NULL); - return FALSE; - } - - fileinfo = g_file_input_stream_query_info (istream, - G_FILE_ATTRIBUTE_STANDARD_SIZE, - NULL, error); - + fileinfo = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_SIZE, + G_FILE_QUERY_INFO_NONE, NULL, error); if (!fileinfo) { g_assert (error == NULL || *error != NULL); - g_object_unref (istream); return FALSE; } @@ -884,8 +875,7 @@ vcedit_write (EtOggState *state, } } - while (_fetch_next_packet (state, G_INPUT_STREAM (istream), &op, &ogin, - error)) + while (_fetch_next_packet (state, &op, &ogin, error)) { if (needflush) { @@ -1061,7 +1051,7 @@ vcedit_write (EtOggState *state, { /* We copy the rest of the stream (other logical streams) * through, a page at a time. */ - while (1) + while(1) { result = ogg_sync_pageout (state->oy, &ogout); @@ -1100,7 +1090,7 @@ vcedit_write (EtOggState *state, buffer = ogg_sync_buffer (state->oy, CHUNKSIZE); - bytes = g_input_stream_read (G_INPUT_STREAM (istream), buffer, + bytes = g_input_stream_read (G_INPUT_STREAM (state->in), buffer, CHUNKSIZE, NULL, error); if (bytes == -1) @@ -1118,19 +1108,11 @@ vcedit_write (EtOggState *state, } } + cleanup: ogg_stream_clear (&streamout); ogg_packet_clear (&header_comments); - if (!g_input_stream_close (G_INPUT_STREAM (istream), NULL, error)) - { - /* Ignore the _close() failure, and try the write anyway. */ - g_warning ("Error closing Ogg file for reading: %s", - (*error)->message); - g_clear_error (error); - } - - g_object_unref (istream); g_free (state->mainbuf); g_free (state->bookbuf); state->mainbuf = state->bookbuf = NULL; @@ -1164,13 +1146,41 @@ cleanup: buf = g_memory_output_stream_steal_data (G_MEMORY_OUTPUT_STREAM (ostream)); size = g_memory_output_stream_get_data_size (G_MEMORY_OUTPUT_STREAM (ostream)); + /* At least on Windows, writing to a file with an open-for-reading stream + * fails, so close the input stream before writing to the file. */ + if (!g_input_stream_close (G_INPUT_STREAM (state->in), NULL, error)) + { + /* Ignore the _close() failure, and try the write anyway. */ + g_warning ("Error closing Ogg file for reading: %s", + (*error)->message); + g_clear_error (error); + } + + g_object_unref (state->in); + state->in = NULL; + /* Write the in-memory data back out to the original file. */ if (!g_file_replace_contents (file, buf, size, NULL, FALSE, G_FILE_CREATE_NONE, NULL, NULL, error)) { + GError *tmp_error = NULL; + g_object_unref (ostream); g_free (buf); + /* Re-open the file for reading, to keep the internal state + * consistent. */ + state->in = g_file_read (file, NULL, &tmp_error); + + if (!state->in) + { + g_warning ("Error opening Ogg file for reading after write failure: %s", + tmp_error->message); + g_clear_error (&tmp_error); + g_assert (error == NULL || *error != NULL); + return FALSE; + } + g_assert (error == NULL || *error != NULL); return FALSE; } @@ -1178,6 +1188,16 @@ cleanup: g_free (buf); g_object_unref (ostream); + /* Re-open the file, now that the write has completed. */ + state->in = g_file_read (file, NULL, error); + + if (!state->in) + { + g_assert (error == NULL || *error != NULL); + return FALSE; + } + + return TRUE; } ++++++ 03_port-to-taglib-2.patch ++++++ From: =?utf-8?b?QmFsbMOzIEd5w7ZyZ3k=?= <[email protected]> Date: Wed, 21 Aug 2024 10:58:05 +0200 Subject: [PATCH] Port to taglib 2 Closes: https://gitlab.gnome.org/GNOME/easytag/-/issues/92 Forwarded: https://gitlab.gnome.org/GNOME/easytag/-/merge_requests/16 Bug-Debian: https://bugs.debian.org/1092704 --- configure.ac | 2 +- src/tags/gio_wrapper.cc | 22 +++++++++++----------- src/tags/gio_wrapper.h | 12 ++++++------ src/tags/mp4_tag.cc | 19 +++---------------- 4 files changed, 21 insertions(+), 34 deletions(-) diff --git a/configure.ac b/configure.ac index ac8b436..86832d8 100644 --- a/configure.ac +++ b/configure.ac @@ -290,7 +290,7 @@ dnl ################################################ dnl # taglib library dnl ################################################ -TAGLIB_DEPS="taglib >= 1.9.1" +TAGLIB_DEPS="taglib >= 2.0.0" AS_IF([test "x$enable_mp4" != "xno"], [PKG_CHECK_EXISTS([$TAGLIB_DEPS], [have_taglib=yes], [have_taglib=no])], [have_taglib=no]) diff --git a/src/tags/gio_wrapper.cc b/src/tags/gio_wrapper.cc index 8716331..8772d52 100644 --- a/src/tags/gio_wrapper.cc +++ b/src/tags/gio_wrapper.cc @@ -47,11 +47,11 @@ GIO_InputStream::name () const } TagLib::ByteVector -GIO_InputStream::readBlock (TagLib::ulong len) +GIO_InputStream::readBlock (ulong len) { if (error) { - return TagLib::ByteVector::null; + return TagLib::ByteVector(); } TagLib::ByteVector rv (len, 0); @@ -70,14 +70,14 @@ GIO_InputStream::writeBlock (TagLib::ByteVector const &data) void GIO_InputStream::insert (TagLib::ByteVector const &data, - TagLib::ulong start, - TagLib::ulong replace) + TagLib::offset_t start, + size_t replace) { g_warning ("%s", "Trying to write to read-only file!"); } void -GIO_InputStream::removeBlock (TagLib::ulong start, TagLib::ulong len) +GIO_InputStream::removeBlock (TagLib::offset_t start, size_t len) { g_warning ("%s", "Trying to write to read-only file!"); } @@ -200,11 +200,11 @@ GIO_IOStream::name () const } TagLib::ByteVector -GIO_IOStream::readBlock (TagLib::ulong len) +GIO_IOStream::readBlock (ulong len) { if (error) { - return TagLib::ByteVector::null; + return TagLib::ByteVector(); } gsize bytes = 0; @@ -239,8 +239,8 @@ GIO_IOStream::writeBlock (TagLib::ByteVector const &data) void GIO_IOStream::insert (TagLib::ByteVector const &data, - TagLib::ulong start, - TagLib::ulong replace) + TagLib::offset_t start, + size_t replace) { if (error) { @@ -351,9 +351,9 @@ GIO_IOStream::insert (TagLib::ByteVector const &data, } void -GIO_IOStream::removeBlock (TagLib::ulong start, TagLib::ulong len) +GIO_IOStream::removeBlock (TagLib::offset_t start, size_t len) { - if (start + len >= (TagLib::ulong)length ()) + if (start + len >= (ulong)length ()) { truncate (start); return; diff --git a/src/tags/gio_wrapper.h b/src/tags/gio_wrapper.h index e49e54d..4f99b24 100644 --- a/src/tags/gio_wrapper.h +++ b/src/tags/gio_wrapper.h @@ -33,10 +33,10 @@ public: GIO_InputStream (GFile *file_); virtual ~GIO_InputStream (); virtual TagLib::FileName name () const; - virtual TagLib::ByteVector readBlock (TagLib::ulong length); + virtual TagLib::ByteVector readBlock (ulong length); virtual void writeBlock (TagLib::ByteVector const &data); - virtual void insert (TagLib::ByteVector const &data, TagLib::ulong start = 0, TagLib::ulong replace = 0); - virtual void removeBlock (TagLib::ulong start = 0, TagLib::ulong length = 0); + virtual void insert (TagLib::ByteVector const &data, TagLib::offset_t start = 0, size_t replace = 0); + virtual void removeBlock (TagLib::offset_t start = 0, size_t length = 0); virtual bool readOnly () const; virtual bool isOpen () const; virtual void seek (long int offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning); @@ -61,10 +61,10 @@ public: GIO_IOStream (GFile *file_); virtual ~GIO_IOStream (); virtual TagLib::FileName name () const; - virtual TagLib::ByteVector readBlock (TagLib::ulong length); + virtual TagLib::ByteVector readBlock (ulong length); virtual void writeBlock (TagLib::ByteVector const &data); - virtual void insert (TagLib::ByteVector const &data, TagLib::ulong start = 0, TagLib::ulong replace = 0); - virtual void removeBlock (TagLib::ulong start = 0, TagLib::ulong len = 0); + virtual void insert (TagLib::ByteVector const &data, TagLib::offset_t start = 0, size_t replace = 0); + virtual void removeBlock (TagLib::offset_t start = 0, size_t len = 0); virtual bool readOnly () const; virtual bool isOpen () const; virtual void seek (long int offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning); diff --git a/src/tags/mp4_tag.cc b/src/tags/mp4_tag.cc index d24695c..1728189 100644 --- a/src/tags/mp4_tag.cc +++ b/src/tags/mp4_tag.cc @@ -222,7 +222,7 @@ mp4tag_read_file_tag (GFile *file, FileTag->encoded_by = g_strdup (encodedbys.front ().toCString (true)); } - const TagLib::MP4::ItemListMap &extra_items = tag->itemListMap (); + const TagLib::MP4::ItemMap &extra_items = tag->itemMap (); /* Album Artist */ #if (TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION < 10) @@ -437,25 +437,12 @@ mp4tag_write_file_tag (const ET_File *ETFile, fields.insert ("ENCODEDBY", string); } - TagLib::MP4::ItemListMap &extra_items = tag->itemListMap (); - /* Album artist. */ if (!et_str_empty (FileTag->album_artist)) { TagLib::String string (FileTag->album_artist, TagLib::String::UTF8); -#if (TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION < 10) - /* No "ALBUMARTIST" support in TagLib until 1.10; use atom directly. */ - extra_items.insert ("aART", TagLib::MP4::Item (string)); -#else fields.insert ("ALBUMARTIST", string); -#endif } -#if (TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION < 10) - else - { - extra_items.erase ("aART"); - } -#endif /*********** * Picture * @@ -491,12 +478,12 @@ mp4tag_write_file_tag (const ET_File *ETFile, TagLib::MP4::CoverArt art (f, TagLib::ByteVector((char *)data, data_size)); - extra_items.insert ("covr", + tag->setItem("covr", TagLib::MP4::Item (TagLib::MP4::CoverArtList ().append (art))); } else { - extra_items.erase ("covr"); + tag->removeItem("covr"); } tag->setProperties (fields); ++++++ 04_taglib-2-further-fix.patch ++++++ From: Boyuan Yang <[email protected]> Date: Sat, 11 Jan 2025 14:48:46 -0500 Subject: taglib-2 further fix Further fix compatibility with taglib 2.x on 32-bit architecture. --- src/tags/gio_wrapper.cc | 20 ++++++++++---------- src/tags/gio_wrapper.h | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/tags/gio_wrapper.cc b/src/tags/gio_wrapper.cc index 8772d52..8fdd9e7 100644 --- a/src/tags/gio_wrapper.cc +++ b/src/tags/gio_wrapper.cc @@ -47,7 +47,7 @@ GIO_InputStream::name () const } TagLib::ByteVector -GIO_InputStream::readBlock (ulong len) +GIO_InputStream::readBlock (size_t len) { if (error) { @@ -95,7 +95,7 @@ GIO_InputStream::isOpen () const } void -GIO_InputStream::seek (long int offset, TagLib::IOStream::Position p) +GIO_InputStream::seek (TagLib::offset_t offset, TagLib::IOStream::Position p) { if (error) { @@ -133,13 +133,13 @@ GIO_InputStream::clear () } } -long int +TagLib::offset_t GIO_InputStream::tell () const { return g_seekable_tell (G_SEEKABLE (stream)); } -long int +TagLib::offset_t GIO_InputStream::length () { if (error) @@ -161,7 +161,7 @@ GIO_InputStream::length () } void -GIO_InputStream::truncate (long int len) +GIO_InputStream::truncate (TagLib::offset_t len) { g_warning ("%s", "Trying to truncate read-only file"); } @@ -200,7 +200,7 @@ GIO_IOStream::name () const } TagLib::ByteVector -GIO_IOStream::readBlock (ulong len) +GIO_IOStream::readBlock (size_t len) { if (error) { @@ -400,7 +400,7 @@ GIO_IOStream::isOpen () const } void -GIO_IOStream::seek (long int offset, TagLib::IOStream::Position p) +GIO_IOStream::seek (TagLib::offset_t offset, TagLib::IOStream::Position p) { if (error) { @@ -434,13 +434,13 @@ GIO_IOStream::clear () g_clear_error (&error); } -long int +TagLib::offset_t GIO_IOStream::tell () const { return g_seekable_tell (G_SEEKABLE (stream)); } -long int +TagLib::offset_t GIO_IOStream::length () { long rv = -1; @@ -464,7 +464,7 @@ GIO_IOStream::length () } void -GIO_IOStream::truncate (long int len) +GIO_IOStream::truncate (TagLib::offset_t len) { if (error) { diff --git a/src/tags/gio_wrapper.h b/src/tags/gio_wrapper.h index 4f99b24..fc634ab 100644 --- a/src/tags/gio_wrapper.h +++ b/src/tags/gio_wrapper.h @@ -33,17 +33,17 @@ public: GIO_InputStream (GFile *file_); virtual ~GIO_InputStream (); virtual TagLib::FileName name () const; - virtual TagLib::ByteVector readBlock (ulong length); + virtual TagLib::ByteVector readBlock (size_t length); virtual void writeBlock (TagLib::ByteVector const &data); virtual void insert (TagLib::ByteVector const &data, TagLib::offset_t start = 0, size_t replace = 0); virtual void removeBlock (TagLib::offset_t start = 0, size_t length = 0); virtual bool readOnly () const; virtual bool isOpen () const; - virtual void seek (long int offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning); + virtual void seek (TagLib::offset_t offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning); virtual void clear (); - virtual long int tell () const; - virtual long int length (); - virtual void truncate (long int length); + virtual TagLib::offset_t tell () const; + virtual TagLib::offset_t length (); + virtual void truncate (TagLib::offset_t length); virtual const GError *getError() const; @@ -61,17 +61,17 @@ public: GIO_IOStream (GFile *file_); virtual ~GIO_IOStream (); virtual TagLib::FileName name () const; - virtual TagLib::ByteVector readBlock (ulong length); + virtual TagLib::ByteVector readBlock (size_t length); virtual void writeBlock (TagLib::ByteVector const &data); virtual void insert (TagLib::ByteVector const &data, TagLib::offset_t start = 0, size_t replace = 0); virtual void removeBlock (TagLib::offset_t start = 0, size_t len = 0); virtual bool readOnly () const; virtual bool isOpen () const; - virtual void seek (long int offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning); + virtual void seek (TagLib::offset_t offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning); virtual void clear (); - virtual long int tell () const; - virtual long int length (); - virtual void truncate (long int length); + virtual TagLib::offset_t tell () const; + virtual TagLib::offset_t length (); + virtual void truncate (TagLib::offset_t length); virtual const GError *getError() const;
