[ogg-dev] libogg++ release 1.1.0

yorn at gmx.net yorn at gmx.net
Thu Jun 4 23:37:34 PDT 2009


Hey Elaine

we may have done double work :-/ (look at the oggvideotools) I started as an ogg library project for c++, but didn't get it to a public stage up until now. However, my focus is more on the streaming, muxing and serialising of specific streams (I did not reemplement the libogg facilities as they are). 

So you can do something like (from oggDump):

/* create repository handler (actually a filehandler) */
MediaRepository* repo = new FileRepository(filename,MediaUnit::read);

/* create a packet serializer */
StreamSerializer* serializer = new StreamSerializer();

/* open and initialize the serializer */
serializer->open(repo);

/* get stream configurations of all available streams */
std::vector<StreamConfig> streamConfigList;
serializer.getStreamConfig(streamConfigList);
 
/* run through the file and dump all packets */
double time;
OggPacket packet;
int dumplevel = 3;

while(serializer.available()) {
  time = serializer.getNextPacket(packet);
  streamout << "Packet at: "<<time<<" ms\n";
  packet.print(dumplevel);
}
 


More information about the ogg-dev mailing list