目录

OH_PackingOptionsForSequence

typedef struct OH_PackingOptionsForSequence OH_PackingOptionsForSequence

Overview

OH_PackingOptionsForSequence is a GIF sequence encoding option struct encapsulated at the native layer. It cannot be manipulated directly; instead, functions shall be called to create and release the struct and to operate on its specific fields.

The OH_PackingOptionsForSequence_Create function is used to create an OH_PackingOptionsForSequence object.

The OH_PackingOptionsForSequence_Release function is used to release an OH_PackingOptionsForSequence object.

Usage restrictions: OH_PackingOptionsForSequence is used to configure encoding parameters when a PixelMap sequence is encoded into the GIF format. It must be passed to OH_ImagePackerNative_PackToDataFromPixelmapSequence or OH_ImagePackerNative_PackToFileFromPixelmapSequence.

Resource management: After OH_PackingOptionsForSequence is used, OH_PackingOptionsForSequence_Release shall be called to release it. Once released, it must not be passed into image sequence encoding APIs or its field getter and setter APIs. Arrays passed in through OH_PackingOptionsForSequence_SetDelayTimeList and OH_PackingOptionsForSequence_SetDisposalTypes are not copied. The caller must ensure that the array data remains valid while the OH_PackingOptionsForSequence object is in use. Releasing the OH_PackingOptionsForSequence object does not release these arrays.

The content and operation methods of the OH_PackingOptionsForSequence struct are as follows.

Field Type Field Name Field Description Field Getter Function Field Setting Function
uint32_t frameCount Number of frames specified for encoding. It must be greater than 0 during encoding. OH_PackingOptionsForSequence_GetFrameCount OH_PackingOptionsForSequence_SetFrameCount
int32_t * delayTimeList Array of delay times for images during encoding. Each delay time in the array must be greater than 0 and not exceed 65535, in units of 10 milliseconds (ms). OH_PackingOptionsForSequence_GetDelayTimeList OH_PackingOptionsForSequence_SetDelayTimeList
uint32_t * disposalTypes Array of transition frame modes for images during encoding. Each value in the array must be less than or equal to 3. For the meaning of each value, see OH_PackingOptionsForSequence_SetDisposalTypes. OH_PackingOptionsForSequence_GetDisposalTypes OH_PackingOptionsForSequence_SetDisposalTypes
uint32_t loopCount Number of times the image loops during encoding. The value range is [0, 65535]. OH_PackingOptionsForSequence_GetLoopCount OH_PackingOptionsForSequence_SetLoopCount

Since: 18

Related module: Image_NativeModule

Header file: image_packer_native.h