mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 06:24:27 +02:00
GetVersion() methods for mux and demux
Also use the same in example binaries. Change-Id: Id4bb4c4231a6b8fe9ed4370a6f46567c52a04a17
This commit is contained in:
@ -21,6 +21,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DMUX_MAJ_VERSION 0
|
||||
#define DMUX_MIN_VERSION 1
|
||||
#define DMUX_REV_VERSION 0
|
||||
|
||||
typedef struct {
|
||||
size_t start_; // start location of the data
|
||||
size_t end_; // end location
|
||||
@ -88,6 +92,12 @@ static const ChunkParser kMasterChunks[] = {
|
||||
{ { '0', '0', '0', '0' }, NULL, NULL },
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
int WebPGetDemuxVersion(void) {
|
||||
return (DMUX_MAJ_VERSION << 16) | (DMUX_MIN_VERSION << 8) | DMUX_REV_VERSION;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// MemBuffer
|
||||
|
||||
|
@ -24,6 +24,10 @@ extern "C" {
|
||||
//------------------------------------------------------------------------------
|
||||
// Defines and constants.
|
||||
|
||||
#define MUX_MAJ_VERSION 0
|
||||
#define MUX_MIN_VERSION 1
|
||||
#define MUX_REV_VERSION 0
|
||||
|
||||
// Chunk object.
|
||||
typedef struct WebPChunk WebPChunk;
|
||||
struct WebPChunk {
|
||||
|
@ -36,6 +36,12 @@ const ChunkInfo kChunks[] = {
|
||||
{ NIL_TAG, WEBP_CHUNK_NIL, UNDEFINED_CHUNK_SIZE }
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
int WebPGetMuxVersion(void) {
|
||||
return (MUX_MAJ_VERSION << 16) | (MUX_MIN_VERSION << 8) | MUX_REV_VERSION;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Life of a chunk object.
|
||||
|
||||
|
@ -62,6 +62,12 @@ typedef enum WebPFormatFeature WebPFormatFeature;
|
||||
typedef struct WebPIterator WebPIterator;
|
||||
typedef struct WebPChunkIterator WebPChunkIterator;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Returns the version number of the demux library, packed in hexadecimal using
|
||||
// 8bits for each of major/minor/revision. E.g: v2.5.7 is 0x020507.
|
||||
WEBP_EXTERN(int) WebPGetDemuxVersion(void);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Life of a Demux object
|
||||
|
||||
|
@ -87,6 +87,12 @@ enum WebPChunkId {
|
||||
WEBP_CHUNK_NIL
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Returns the version number of the mux library, packed in hexadecimal using
|
||||
// 8bits or each of major/minor/revision. E.g: v2.5.7 is 0x020507.
|
||||
WEBP_EXTERN(int) WebPGetMuxVersion(void);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Life of a Mux object
|
||||
|
||||
|
Reference in New Issue
Block a user