Thomas Eschenbacher
2004-Sep-10 16:45 UTC
[Flac-dev] usage of C++ StreamMetadata interface
Josh Coalson wrote:> [...] > why do you need one? all the fields are available though method > calls.just an example: I created an object of the type "FLAC::Metadata::VorbisComment". How will this find it's way to "FLAC::Stream::Encoder.set_metadata()" ??? Thomas
--- Josh Coalson <xflac@yahoo.com> wrote:> --- Thomas Eschenbacher <Thomas.Eschenbacher@gmx.de> wrote: > > Josh Coalson wrote: > > > [...] > > > why do you need one? all the fields are available though method > > > calls. > > > > just an example: > > > > I created an object of the type "FLAC::Metadata::VorbisComment". > > > > How will this find it's way to > > "FLAC::Stream::Encoder.set_metadata()" ??? > > I see, yep that's a problem. there should be versions of > FLAC::Encoder::*::set_metadata() that take a list of > FLAC::Metadata objects also.OK, I added a set_metadata(FLAC::Metadata::Prototype **metadata, unsigned num_blocks) to all the encoder interfaces which takes an array of pointers to metadata objects; as with the other method, the caller has to free the objects after initializing the encoder. Josh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
--- Thomas Eschenbacher <Thomas.Eschenbacher@gmx.de> wrote:> Josh Coalson wrote: > > [...] > > why do you need one? all the fields are available though method > > calls. > > just an example: > > I created an object of the type "FLAC::Metadata::VorbisComment". > > How will this find it's way to > "FLAC::Stream::Encoder.set_metadata()" ???I see, yep that's a problem. there should be versions of FLAC::Encoder::*::set_metadata() that take a list of FLAC::Metadata objects also. it's easy enough to fix by modifying the API to expose the pointer. if that's not possible, the workaround may be something like class VorbisComment: public FLAC::Metadata::VorbisComment { public: ::FLAC__StreamMetadata *getObject() { return object_; } }; to dig it out. Josh __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail