Name Description Size
nestegg.h @mainpage @section intro Introduction This is the documentation for the <tt>libnestegg</tt> C API. <tt>libnestegg</tt> is a demultiplexing library for <a href="http://www.webmproject.org/code/specs/container/">WebM</a> media files. @section example Example code @code nestegg * demux_ctx; nestegg_init(&demux_ctx, io, NULL, -1); nestegg_packet * pkt; while ((r = nestegg_read_packet(demux_ctx, &pkt)) > 0) { unsigned int track; nestegg_packet_track(pkt, &track); // This example decodes the first track only. if (track == 0) { unsigned int chunk, chunks; nestegg_packet_count(pkt, &chunks); // Decode each chunk of data. for (chunk = 0; chunk < chunks; ++chunk) { unsigned char * data; size_t data_size; nestegg_packet_data(pkt, chunk, &data, &data_size); example_codec_decode(codec_ctx, data, data_size); } } nestegg_free_packet(pkt); } nestegg_destroy(demux_ctx); @endcode 24274