[Vorbis] Edting or Adding New Comments
Ian Malone
ibm21 at cam.ac.uk
Fri Dec 2 04:19:33 PST 2005
>
> Ian Malone <ibm21 at cam.ac.uk>
>
>> wrote: pavan kumar wrote:
>
>>
>>> Can I update the header of the already existing Ogg-Vorbis file
>>> with the new comments? When we add new entries in the header, will
>>> it not overwrite the data? does the vorbis library takes care of
>>> this? can someone also please give me the call sequence on how i
>>> can do that?
>>
>
> It depends what you mean. If you are talking about the vorbiscomment
> utility then there is a (over-)write (-w) and an append(-a) option.
> If you look at the vorbiscomment source it is built around vcedit.c
> which you can use to load and edit the comment header as you like. At
> the moment when writing comments using vcedit you must rewrite the
> entire file through if the pages containing the headers have changed
> size (because they come at the start).
>
>
> Thanks for the prompt reply. I am writing OggVorbisRecordController
> for Symbian using libogg and
> libvorbis libraries. I am not using any specific tools but using
> libvorbis to generate the vorbis headers and writing them into the file.
> From what you are saying, I understand that I need to rewrite the
> whole file(incase there is no padding) if i have to add a new entry in
> the vorbis_comments, because the headers may overwrite the data.
> Please suggest me if I am correct. Also where can i find the code
> which does this edit/overwrite
> comments? or which API in libvorbis do i need to use?
Yes that's my understanding. vcedit is under
trunk/vorbistools/vorbiscomment, the vorbiscomment source is a good
starting point.
--
imalone
More information about the Vorbis
mailing list