libogg2: direct access to change page header fields
Alot of the uses I've found for libogg1 (py-ogg1) have been repairing Ogg streams, extracting one logical bitstream from an Icecast archive, or other things which could take place entirely within ogg_sync_state (to get ogg_page objects), then editing the header fields of the pages to change the CONT/BOS/EOS flags, granulepos, serialno, etc. In one case, the Indymedia global radio stream at http://liveradio.indymedia.org/ is mixed on the server using Python code that takes several different sources (live, playlist, etc) and mixes them based on a schedule. This uses py-ogg1 to make the stream being sent to Icecast legal and sequential serialno's, especially when the source streams get chopped off midway. This is also useful for intentionally creating mangled test streams for testing codec software, Icecast, etc. With libogg2 moving to ogg_references instead of character buffers for the ogg_page header and body fields, this is no longer possible. ogg_reference is not currently exposed, nor are there functions for editing these values, so the only way to edit this data would be to send the ogg_page objects into a second ogg_sync_state buffer then use ogg_sync_bufferout before editing the fields, then into a third ogg_sync_state buffer to turn it back into an ogg_page. Bug 484 ( http://bugs.xiph.org/show_bug.cgi?id=484 ), the declaired but not defined ogg_page_getbuffer, may make this easier. But it would still involve re-importing the edited data into another ogg_sync_state buffer. It should be noted that, without the ability to edit the ogg_page header/body contents, having ogg_page_checksum_set exposed serves no purpose.