taglib-devel Digest, Vol 21, Issue 4

Dongxu Ma dongxu.ma at gmail.com
Mon Mar 6 03:34:23 CET 2006


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.

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.

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



--
Cheers, Dongxu
__END__
dongxu.wordpress.com
search.cpan.org/~dongxu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/taglib-devel/attachments/20060306/e459df13/attachment.html 


More information about the taglib-devel mailing list