<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.13.3">
</HEAD>
<BODY>
The file access in abstraction works in TagLib# because .NET has a generic IO.Stream class that makes it easy to accept any VFS that provides a stream. I know very little about C++ streaming/files, but if it's possible to accept use a generic stream, it would be relatively easy to add abstraction to TagLib, but if that's not possible, the entire file handling system would need to be rewritten so an abstractor could deal with every, seek, tell, read, write, etc action.<BR>
<BR>
Either way, I know there's been concern and interest about seeing this implemented, especially with people who want to play music off networks, so I think this feature should be looked at.<BR>
<BR>
- Brian Nickel (TagLib#)<BR>
<BR>
On Thu, 2006-12-07 at 03:40 -0500, William Pitcock wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Hi,</FONT>

<FONT COLOR="#000000">In audacious 1.3, we have a stream-based I/O system called NewVFS (it's </FONT>
<FONT COLOR="#000000">exposed through the old vfs_* APIs in BMP, but that's irrelevant). At </FONT>
<FONT COLOR="#000000">present, I see no easy way to abstract TagLib::File in a way that it can </FONT>
<FONT COLOR="#000000">be treated by TagLib as compatible with TagLib::File (gcc simply chokes </FONT>
<FONT COLOR="#000000">and says that there is an invalid attempt to use TagLib::File::File() when </FONT>
<FONT COLOR="#000000">defining a new class that is virtual of TagLib::File).</FONT>

<FONT COLOR="#000000">Am I missing anything, or is this functionality simply unavailable? Is it </FONT>
<FONT COLOR="#000000">possible to do this?</FONT>

<FONT COLOR="#000000">Searching around on Google, I found a port to Mono called TagLib#. I was </FONT>
<FONT COLOR="#000000">hoping that it was simply a glue/wrapper code, and that it might have </FONT>
<FONT COLOR="#000000">documentation on abstracting Taglib's I/O, but sadly, I discovered that it </FONT>
<FONT COLOR="#000000">was a full port. TagLib# lets you do it by changing the creator of </FONT>
<FONT COLOR="#000000">TagLib::FileRef or something (I didn't look very closely when I discovered </FONT>
<FONT COLOR="#000000">it was 100% C#).</FONT>

<FONT COLOR="#000000">TagLib is a very good library for just getting into the file and getting </FONT>
<FONT COLOR="#000000">at the metadata, and in general, we are satisfied with TagLib's </FONT>
<FONT COLOR="#000000">performance. It would be a shame to have to find another reliable id3v[12] </FONT>
<FONT COLOR="#000000">tagging library (libid3 is broken, writing unicode frames to id3v2.3 </FONT>
<FONT COLOR="#000000">structures, which is wrong as id3v2.3 is latin1 only). However, on the </FONT>
<FONT COLOR="#000000">other hand, we do want to support our stream layer as much as possible in </FONT>
<FONT COLOR="#000000">1.3.</FONT>

<FONT COLOR="#000000">Anyway, if anybody has any pointers on how to make Taglib::File do what we </FONT>
<FONT COLOR="#000000">need, I'd definately appreciate it. I've tried to subclass like I </FONT>
<FONT COLOR="#000000">mentioned earlier, but ran into a dead end.</FONT>

<FONT COLOR="#000000">   -- William</FONT>
<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">taglib-devel mailing list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:taglib-devel@kde.org">taglib-devel@kde.org</A></FONT>
<FONT COLOR="#000000"><A HREF="https://mail.kde.org/mailman/listinfo/taglib-devel">https://mail.kde.org/mailman/listinfo/taglib-devel</A></FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>