Displaying 4 results from an estimated 4 matches for "get_com".
Did you mean:
get_dom
2006 Mar 08
2
libflac++ reading vorbis metadata
...:Metadata::get_streaminfo("somefile.flac", infosik);
and It's ok - no error, then I read vorbis info:
FLAC::Metadata::VorbisComment vorbis_kom(infosik);
int number_of_comments = vorbis_kom.get_num_comments();
and after that I have number_of_comments=14
when I try to read entry using get_comment method I got segfault
vorbis_kom.get_comment(number);
I was trying all numbers from 0, to 14 and it always segfaults
Is that a right way to read those informations? What I'm doing wrong?
2004 Sep 10
3
reading vorbis comments with FLAC++?
...ata_object_new (FLAC__METADATA_TYPE_STREAMINFO);
if (FLAC__metadata_get_streaminfo(path, md))
{
unsigned nc = 0, i;
FLAC::Metadata::VorbisComment vc (md);
nc = vc.get_num_comments();
for (i = 0; i <= nc; i++)
{
FLAC::Metadata::VorbisComment::Entry e;
e = vc.get_comment(i);
if (!strcmp(e.get_field_name(), "ARTIST"))
flac->artist = e.get_field_value();
else if (!strcmp(e.get_field_name(), "TITLE"))
flac->title = e.get_field_value();
}
return true;
}
else
return false;
}
When I run this...
2006 Mar 10
1
libflac++ reading vorbis metadata
...9 (Thu) ,at 23:20:50 Josh Coalson wrote:
> the vorbiscomments are not in the streaminfo. you want to do:
>
> FLAC::Metadata::VorbisComment tags;
> if (FLAC::Metadata::get_tags("somefile.flac", tags)) {
> FLAC::Metadata::VorbisComment::Entry entry =
> tags->get_comment(tags->get_num_comments-1); //e.g. last tag
> // do something with it...
> }
>
> Josh
Oki, thanks it works. However I still have some questions about all the
libflac++. If this is impossible to read vorbis info from StreamInfo why there
is constructor for VorbisComment whic...
2004 Sep 10
0
reading vorbis comments with FLAC++?
...ts ARTIST and TITLE from the file.
>
> A while back, I was popen()ing to metaflac, because I didn't want to
> mess with libFLAC. But now, it's the weekend, so I can mess around
> with
> this. Here's the code in question:
...
> When I run this code, I get a SEGV during get_comment because
> object_->data.vorbis_comment.comments is junk. Must I initialize it
> somewhere? Note that vc.get_num_comments returns 14, which I imagine
> is
> a correct number. The documentation isn't overly clear about how this
> works
> and it would be cooler if some bas...