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("") 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> <<a href="mailto:taglib-devel-request@kde.org">taglib-devel-request@kde.org
</a>> 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> <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> <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> <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> <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 "Re: Contents of taglib-devel digest..."<br><br><br>Today's Topics:<br><br> 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 <<a href="mailto:gruen0aermel@gmail.com">gruen0aermel@gmail.com
</a>><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: <<a href="mailto:3803EE87-F0B4-4812-B64A-4A66A86A33F9@gmail.com">3803EE87-F0B4-4812-B64A-4A66A86A33F9@gmail.com
</a>><br>Content-Type: text/plain; charset="us-ascii"<br><br>Specifically, what I would like access to are the description fields<br>in TXXX and COMM frames. From what you are saying, it sounds like<br>this is not possible except by inspecting the ByteVector produced by
<br>render(). 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>> Hmmm, I assume you'd like to access the string/text in Frame. In
<br>> this case you have to invoke render or toString. The frame is just<br>> a container of both data and meta info. Further, in TagLib, string/<br>> text is ALWAYS wrapped as an instance of String in order to<br>
> abstract the locale/encoding issue.<br>><br>> Also, in C++ code, you can find:<br>> ---------------------------------------------------------------<br>> ### id3v2tag.h ###<br>> 00033 namespace TagLib {
<br>> 00034<br>><br>> 00035 class File;<br>> 00036<br>> 00038<br>> 00046 namespace ID3v2 {<br>> 00047<br>> 00048 class Header;<br>> 00049<br>> class ExtendedHeader;<br>> 00050 class Footer;
<br>> 00051<br>><br>> 00052 typedef List<Frame *><br>> FrameList;<br>> ------------------------------------<br>> The symbol is declared as a list of TagLib::ID3v2::Frame pointers,<br>> while
<br>> in Perl I present as an instance. Inside, the same:<br>> RV contains stash -> SV contains memory address<br>><br>><br>> Currently, in case the return type of C++ method is virtual<br>> (interface-like),
<br>> I just make the same general stash. Inside C++ code, there might be<br>> dynamic<br>> binding. This will possibly mask some extra methods in the real<br>> subclass'<br>><br>> namespace. I refused to take the runtime type identification method
<br>> since<br>> most of the cases you just get a known namespace once you get<br>> something from<br>> C stack.<br>> Anyone comments me if error words;-)<br>><br>> On 3/3/06, <a href="mailto:taglib-devel-request@kde.org">
taglib-devel-request@kde.org</a> <taglib-devel-<br>> <a href="mailto:request@kde.org">request@kde.org</a> > wrote:<br>> Send taglib-devel mailing list submissions to<br>> <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>> <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>> <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>> <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 "Re: Contents of taglib-devel digest..."
<br>><br>><br>> Today's Topics:<br>><br>> 1. perl bindings ID3v2::Frame subclasses (Aaron VonderHaar)<br>><br>><br>> ----------------------------------------------------------------------<br>>
<br>> Message: 1<br>> Date: Thu, 2 Mar 2006 20:06:41 -0800<br>> From: Aaron VonderHaar <<a href="mailto:gruen0aermel@gmail.com">gruen0aermel@gmail.com</a> ><br>> Subject: perl bindings ID3v2::Frame subclasses
<br>> To: <a href="mailto:taglib-devel@kde.org">taglib-devel@kde.org</a><br>> Message-ID: <<a href="mailto:02F4556B-4800-4097-A5F7-D60FCDD7C6C9@gmail.com">02F4556B-4800-4097-A5F7-D60FCDD7C6C9@gmail.com</a> ><br>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed<br>><br>> I'm trying to use the Audio::TagLib perl bindings to access ID3v2-<br>> specific frames, but when I iterate through the FrameList, all the
<br>> frames seem to be instances of Frame and not of the correct<br>> subclasses.<br>><br>> my $file = Audio::TagLib::FileRef->new("test.mp3");<br>> my $tag = Audio::TagLib::ID3v2::Tag->new($file->file, 0);
<br>><br>> tie my @frames, ref($tag->frameList()), $tag->frameList();<br>><br>> foreach my $frame (@frames) {<br>> print ref($frame), "\n"; ### This prints<br>> "Audio::TagLib::ID3v2::Frame" for every frame
<br>> eval { print $frame->text(), "\n"; }; ### This fails even<br>> for COMM frames<br>> }<br>><br>> How can I determine the class of the frame, and how can I access the<br>> member functions for each subclass?
<br>><br>> Thanks,<br>> Aaron V.<br>><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 2<br>> *******************************************
<br>><br>><br>><br>> --<br>> 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>