Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(729)

Side by Side Diff: third_party/libwebp/webp/demux.h

Issue 22802020: libwebp: upstream animation cherry-picks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 Google Inc. All Rights Reserved. 1 // Copyright 2012 Google Inc. All Rights Reserved.
2 // 2 //
3 // Use of this source code is governed by a BSD-style license 3 // Use of this source code is governed by a BSD-style license
4 // that can be found in the COPYING file in the root of the source 4 // that can be found in the COPYING file in the root of the source
5 // tree. An additional intellectual property rights grant can be found 5 // tree. An additional intellectual property rights grant can be found
6 // in the file PATENTS. All contributing project authors may 6 // in the file PATENTS. All contributing project authors may
7 // be found in the AUTHORS file in the root of the source tree. 7 // be found in the AUTHORS file in the root of the source tree.
8 // ----------------------------------------------------------------------------- 8 // -----------------------------------------------------------------------------
9 // 9 //
10 // Demux API. 10 // Demux API.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 #ifndef WEBP_WEBP_DEMUX_H_ 47 #ifndef WEBP_WEBP_DEMUX_H_
48 #define WEBP_WEBP_DEMUX_H_ 48 #define WEBP_WEBP_DEMUX_H_
49 49
50 #include "./mux_types.h" 50 #include "./mux_types.h"
51 51
52 #if defined(__cplusplus) || defined(c_plusplus) 52 #if defined(__cplusplus) || defined(c_plusplus)
53 extern "C" { 53 extern "C" {
54 #endif 54 #endif
55 55
56 #define WEBP_DEMUX_ABI_VERSION 0x0100 // MAJOR(8b) + MINOR(8b) 56 #define WEBP_DEMUX_ABI_VERSION 0x0101 // MAJOR(8b) + MINOR(8b)
57 57
58 // Note: forward declaring enumerations is not allowed in (strict) C and C++, 58 // Note: forward declaring enumerations is not allowed in (strict) C and C++,
59 // the types are left here for reference. 59 // the types are left here for reference.
60 // typedef enum WebPDemuxState WebPDemuxState; 60 // typedef enum WebPDemuxState WebPDemuxState;
61 // typedef enum WebPFormatFeature WebPFormatFeature; 61 // typedef enum WebPFormatFeature WebPFormatFeature;
62 typedef struct WebPDemuxer WebPDemuxer; 62 typedef struct WebPDemuxer WebPDemuxer;
63 typedef struct WebPIterator WebPIterator; 63 typedef struct WebPIterator WebPIterator;
64 typedef struct WebPChunkIterator WebPChunkIterator; 64 typedef struct WebPChunkIterator WebPChunkIterator;
65 65
66 //------------------------------------------------------------------------------ 66 //------------------------------------------------------------------------------
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 int fragment_num; 129 int fragment_num;
130 int num_fragments; 130 int num_fragments;
131 int x_offset, y_offset; // offset relative to the canvas. 131 int x_offset, y_offset; // offset relative to the canvas.
132 int width, height; // dimensions of this frame or fragment. 132 int width, height; // dimensions of this frame or fragment.
133 int duration; // display duration in milliseconds. 133 int duration; // display duration in milliseconds.
134 WebPMuxAnimDispose dispose_method; // dispose method for the frame. 134 WebPMuxAnimDispose dispose_method; // dispose method for the frame.
135 int complete; // true if 'fragment' contains a full frame. partial images 135 int complete; // true if 'fragment' contains a full frame. partial images
136 // may still be decoded with the WebP incremental decoder. 136 // may still be decoded with the WebP incremental decoder.
137 WebPData fragment; // The frame or fragment given by 'frame_num' and 137 WebPData fragment; // The frame or fragment given by 'frame_num' and
138 // 'fragment_num'. 138 // 'fragment_num'.
139 int has_alpha; // True if the frame or fragment contains transparency.
140 WebPMuxAnimBlend blend_method; // Blend operation for the frame.
139 141
140 uint32_t pad[4]; // padding for later use. 142 uint32_t pad[2]; // padding for later use.
141 void* private_; // for internal use only. 143 void* private_; // for internal use only.
142 }; 144 };
143 145
144 // Retrieves frame 'frame_number' from 'dmux'. 146 // Retrieves frame 'frame_number' from 'dmux'.
145 // 'iter->fragment' points to the first fragment on return from this function. 147 // 'iter->fragment' points to the first fragment on return from this function.
146 // Individual fragments may be extracted using WebPDemuxSetFragment(). 148 // Individual fragments may be extracted using WebPDemuxSetFragment().
147 // Setting 'frame_number' equal to 0 will return the last frame of the image. 149 // Setting 'frame_number' equal to 0 will return the last frame of the image.
148 // Returns false if 'dmux' is NULL or frame 'frame_number' is not present. 150 // Returns false if 'dmux' is NULL or frame 'frame_number' is not present.
149 // Call WebPDemuxReleaseIterator() when use of the iterator is complete. 151 // Call WebPDemuxReleaseIterator() when use of the iterator is complete.
150 // NOTE: 'dmux' must persist for the lifetime of 'iter'. 152 // NOTE: 'dmux' must persist for the lifetime of 'iter'.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // WebPDemuxDelete(). 207 // WebPDemuxDelete().
206 WEBP_EXTERN(void) WebPDemuxReleaseChunkIterator(WebPChunkIterator* iter); 208 WEBP_EXTERN(void) WebPDemuxReleaseChunkIterator(WebPChunkIterator* iter);
207 209
208 //------------------------------------------------------------------------------ 210 //------------------------------------------------------------------------------
209 211
210 #if defined(__cplusplus) || defined(c_plusplus) 212 #if defined(__cplusplus) || defined(c_plusplus)
211 } // extern "C" 213 } // extern "C"
212 #endif 214 #endif
213 215
214 #endif /* WEBP_WEBP_DEMUX_H_ */ 216 #endif /* WEBP_WEBP_DEMUX_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698