<DIV>Hi Ian,</DIV> <DIV> </DIV> <DIV>Thanks for the prompt reply.</DIV> <DIV>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.</DIV> <DIV>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. <BR>Please suggest me if I am correct. </DIV> <DIV>Also where can i find the code which does this edit/overwrite comments? or which API in libvorbis do i need to use?</DIV> <DIV> </DIV> <DIV>regards,</DIV> <DIV>Pavan.</DIV> <DIV> </DIV> <DIV><BR><B><I>Ian Malone <ibm21@cam.ac.uk></I></B> wrote:</DIV> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">pavan kumar wrote:<BR>> Hi All,<BR>>
<BR>> Can I update the header of the already existing Ogg-Vorbis file with<BR>> the new comments? When we add new entries in the header, will it not<BR>> overwrite the data? does the vorbis library takes care of this? can<BR>> someone also please give me the call sequence on how i can do that?<BR>> <BR>> Thanks in advance.<BR>> <BR>> regards, Pavan.<BR>> <BR>> <BR><BR>It depends what you mean. If you are talking about the vorbiscomment<BR>utility then there is a (over-)write (-w) and an append(-a) option.<BR>If you look at the vorbiscomment source it is built around vcedit.c<BR>which you can use to load and edit the comment header as you like.<BR>At the moment when writing comments using vcedit you must rewrite<BR>the entire file through if the pages containing the headers have<BR>changed size (because they come at the start).<BR><BR>There is provision to add padding so that you can maintain the page<BR>size and so only need to rewrite the start of
files which are padded,<BR>but it's not currently done. Also, for reasons I don't quite<BR>understand, vcedit does a packet copy on the remainder of the stream<BR>rather than the simpler page copy.<BR><BR>-- <BR>imalone<BR>_______________________________________________<BR>Vorbis mailing list<BR>Vorbis@xiph.org<BR>http://lists.xiph.org/mailman/listinfo/vorbis<BR></BLOCKQUOTE> <DIV><BR></DIV><p>
                <hr size=1>
Enjoy this Diwali with Y! India <a href="http://in.promos.yahoo.com/fabmall/index.html">Click here</a>