NumNamedElements() should take an enum param.

- Move TAG_ID to webp/mux.h
- Rename it to WebPChunkId
- Rename IDs to WEBP_CHUNK_<tag>
- Remove "name" param from ChunkInfo struct and related changes.
- Rename WebPMuxNumNamedElements to WebPMuxNumChunks().
- WebPMuxNumChunks() takes WebPChunkId as param.

Change-Id: Ic6546e4a9ab823b556cdbc600faa137076546a2b
This commit is contained in:
Urvang Joshi
2012-06-11 12:24:45 +05:30
parent 3697b5ceb2
commit fbdcb7ea38
7 changed files with 113 additions and 129 deletions

View File

@ -195,7 +195,7 @@ static WebPMuxError DisplayInfo(const WebPMux* mux) {
RETURN_IF_ERROR("Failed to retrieve loop count\n");
printf("Loop Count : %d\n", loop_count);
err = WebPMuxNumNamedElements(mux, "frame", &nFrames);
err = WebPMuxNumChunks(mux, WEBP_CHUNK_FRAME, &nFrames);
RETURN_IF_ERROR("Failed to retrieve number of frames\n");
printf("Number of frames: %d\n", nFrames);
@ -220,7 +220,7 @@ static WebPMuxError DisplayInfo(const WebPMux* mux) {
if (flag & TILE_FLAG) {
int nTiles;
err = WebPMuxNumNamedElements(mux, "tile", &nTiles);
err = WebPMuxNumChunks(mux, WEBP_CHUNK_TILE, &nTiles);
RETURN_IF_ERROR("Failed to retrieve number of tiles\n");
printf("Number of tiles: %d\n", nTiles);