In this case, why didn't you extract the specific frame from a tag directly. Please refer to `perldoc Audio::TagLib'. There is no need to iterate the framelist.<br><br>For your question, there is an entry in TODO. In next release I will introduce an overloaded qw(&quot;&quot;) to Audio::TagLib::String. While on the other hand, the user has to be more careful when invoking some methods without prototype.
<br><br><div><span class="gmail_quote">On 3/5/06, <b class="gmail_sendername"><a href="mailto:taglib-devel-request@kde.org">taglib-devel-request@kde.org</a></b> &lt;<a href="mailto:taglib-devel-request@kde.org">taglib-devel-request@kde.org
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Send taglib-devel mailing list submissions to<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:taglib-devel@kde.org">
taglib-devel@kde.org</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://mail.kde.org/mailman/listinfo/taglib-devel">https://mail.kde.org/mailman/listinfo/taglib-devel</a><br>or, via email, send a message with subject or body 'help' to
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:taglib-devel-request@kde.org">taglib-devel-request@kde.org</a><br><br>You can reach the person managing the list at<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:taglib-devel-owner@kde.org">taglib-devel-owner@kde.org
</a><br><br>When replying, please edit your Subject line so it is more specific<br>than &quot;Re: Contents of taglib-devel digest...&quot;<br><br><br>Today's Topics:<br><br>&nbsp;&nbsp; 1. Re: perl bindings ID3v2::Frame subclasses (Aaron VonderHaar)
<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Sat, 4 Mar 2006 12:08:43 -0800<br>From: Aaron VonderHaar &lt;<a href="mailto:gruen0aermel@gmail.com">gruen0aermel@gmail.com
</a>&gt;<br>Subject: Re: perl bindings ID3v2::Frame subclasses<br>To: <a href="mailto:taglib-devel@kde.org">taglib-devel@kde.org</a><br>Message-ID: &lt;<a href="mailto:3803EE87-F0B4-4812-B64A-4A66A86A33F9@gmail.com">3803EE87-F0B4-4812-B64A-4A66A86A33F9@gmail.com
</a>&gt;<br>Content-Type: text/plain; charset=&quot;us-ascii&quot;<br><br>Specifically, what I would like access to are the description fields<br>in TXXX and COMM frames.&nbsp;&nbsp;From what you are saying, it sounds like<br>this is not possible except by inspecting the ByteVector produced by
<br>render().&nbsp;&nbsp;If that is the case, then I think it is a serious<br>deficiency in the perl bindings API.<br><br>Thanks, --Aaron V.<br><br>On Mar 3, 2006, at 06:40, Dongxu Ma wrote:<br><br>&gt; Hmmm, I assume you'd like to access the string/text in Frame. In
<br>&gt; this case you have to invoke render or toString. The frame is just<br>&gt; a container of both data and meta info. Further, in TagLib, string/<br>&gt; text is ALWAYS wrapped as an instance of String in order to<br>
&gt; abstract the locale/encoding issue.<br>&gt;<br>&gt; Also, in C++ code, you can find:<br>&gt; ---------------------------------------------------------------<br>&gt; ### id3v2tag.h ###<br>&gt; 00033 namespace TagLib {
<br>&gt; 00034<br>&gt;<br>&gt; 00035&nbsp;&nbsp; class File;<br>&gt; 00036<br>&gt; 00038<br>&gt; 00046&nbsp;&nbsp; namespace ID3v2 {<br>&gt; 00047<br>&gt; 00048&nbsp;&nbsp;&nbsp;&nbsp; class Header;<br>&gt; 00049<br>&gt; class ExtendedHeader;<br>&gt; 00050&nbsp;&nbsp;&nbsp;&nbsp; class Footer;
<br>&gt; 00051<br>&gt;<br>&gt; 00052&nbsp;&nbsp;&nbsp;&nbsp; typedef List&lt;Frame *&gt;<br>&gt; FrameList;<br>&gt; ------------------------------------<br>&gt; The symbol is declared as a list of TagLib::ID3v2::Frame pointers,<br>&gt; while
<br>&gt; in Perl I present as an instance. Inside, the same:<br>&gt; RV contains stash -&gt; SV contains memory address<br>&gt;<br>&gt;<br>&gt; Currently, in case the return type of C++ method is virtual<br>&gt; (interface-like),
<br>&gt; I just make the same general stash. Inside C++ code, there might be<br>&gt; dynamic<br>&gt; binding. This will possibly mask some extra methods in the real<br>&gt; subclass'<br>&gt;<br>&gt; namespace. I refused to take the runtime type identification method
<br>&gt; since<br>&gt; most of the cases you just get a known namespace once you get<br>&gt; something from<br>&gt; C stack.<br>&gt; Anyone comments me if error words;-)<br>&gt;<br>&gt; On 3/3/06, <a href="mailto:taglib-devel-request@kde.org">
taglib-devel-request@kde.org</a> &lt;taglib-devel-<br>&gt; <a href="mailto:request@kde.org">request@kde.org</a> &gt; wrote:<br>&gt; Send taglib-devel mailing list submissions to<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:taglib-devel@kde.org">
taglib-devel@kde.org</a><br>&gt;<br>&gt; To subscribe or unsubscribe via the World Wide Web, visit<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="https://mail.kde.org/mailman/listinfo/taglib-devel">https://mail.kde.org/mailman/listinfo/taglib-devel
</a><br>&gt; or, via email, send a message with subject or body 'help' to<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:taglib-devel-request@kde.org">taglib-devel-request@kde.org</a><br>&gt;<br>&gt; You can reach the person managing the list at
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:taglib-devel-owner@kde.org">taglib-devel-owner@kde.org</a><br>&gt;<br>&gt; When replying, please edit your Subject line so it is more specific<br>&gt; than &quot;Re: Contents of taglib-devel digest...&quot;
<br>&gt;<br>&gt;<br>&gt; Today's Topics:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;1. perl bindings ID3v2::Frame subclasses&nbsp;&nbsp;(Aaron VonderHaar)<br>&gt;<br>&gt;<br>&gt; ----------------------------------------------------------------------<br>&gt;
<br>&gt; Message: 1<br>&gt; Date: Thu, 2 Mar 2006 20:06:41 -0800<br>&gt; From: Aaron VonderHaar &lt;<a href="mailto:gruen0aermel@gmail.com">gruen0aermel@gmail.com</a> &gt;<br>&gt; Subject: perl bindings ID3v2::Frame subclasses
<br>&gt; To: <a href="mailto:taglib-devel@kde.org">taglib-devel@kde.org</a><br>&gt; Message-ID: &lt;<a href="mailto:02F4556B-4800-4097-A5F7-D60FCDD7C6C9@gmail.com">02F4556B-4800-4097-A5F7-D60FCDD7C6C9@gmail.com</a> &gt;<br>
&gt; Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed<br>&gt;<br>&gt; I'm trying to use the Audio::TagLib perl bindings to access ID3v2-<br>&gt; specific frames, but when I iterate through the FrameList, all the
<br>&gt; frames seem to be instances of Frame and not of the correct<br>&gt; subclasses.<br>&gt;<br>&gt; my $file = Audio::TagLib::FileRef-&gt;new(&quot;test.mp3&quot;);<br>&gt; my $tag = Audio::TagLib::ID3v2::Tag-&gt;new($file-&gt;file, 0);
<br>&gt;<br>&gt; tie my @frames, ref($tag-&gt;frameList()), $tag-&gt;frameList();<br>&gt;<br>&gt; foreach my $frame (@frames) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print ref($frame), &quot;\n&quot;;&nbsp;&nbsp;### This prints<br>&gt; &quot;Audio::TagLib::ID3v2::Frame&quot; for every frame
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eval { print $frame-&gt;text(), &quot;\n&quot;; };&nbsp;&nbsp;### This fails even<br>&gt; for COMM frames<br>&gt; }<br>&gt;<br>&gt; How can I determine the class of the frame, and how can I access the<br>&gt; member functions for each subclass?
<br>&gt;<br>&gt; Thanks,<br>&gt; Aaron V.<br>&gt;<br>&gt;<br>&gt; ------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; taglib-devel mailing list<br>&gt; <a href="mailto:taglib-devel@kde.org">
taglib-devel@kde.org</a><br>&gt; <a href="https://mail.kde.org/mailman/listinfo/taglib-devel">https://mail.kde.org/mailman/listinfo/taglib-devel</a><br>&gt;<br>&gt;<br>&gt; End of taglib-devel Digest, Vol 21, Issue 2<br>&gt; *******************************************
<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Cheers, Dongxu<br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <a href="http://mail.kde.org/pipermail/taglib-devel/attachments/20060304/bd327646/attachment-0001.html">
http://mail.kde.org/pipermail/taglib-devel/attachments/20060304/bd327646/attachment-0001.html</a><br><br>------------------------------<br><br>_______________________________________________<br>taglib-devel mailing list<br>
<a href="mailto:taglib-devel@kde.org">taglib-devel@kde.org</a><br><a href="https://mail.kde.org/mailman/listinfo/taglib-devel">https://mail.kde.org/mailman/listinfo/taglib-devel</a><br><br><br>End of taglib-devel Digest, Vol 21, Issue 4
<br>*******************************************<br></blockquote></div><br><br clear="all"><br>-- <br>Cheers, Dongxu<br>__END__<br><a href="http://dongxu.wordpress.com">dongxu.wordpress.com</a><br><a href="http://search.cpan.org/~dongxu">
search.cpan.org/~dongxu</a>