Hi everyone~
First of all, I would like to thank those who help us use such a good image encoder.
I'm curious about the flow control of the muxing of the animation webp.
As you all know, in order to get the muxed data, we have to call the WebPAnimEncoderAssemble() function to get the data and save it in a file.
I checked that it works normally when I do what is shown in the documentation.
However, there is a problem here. In the environment I tested, it takes a lot of time to process WebPAnimEncoderAssemble() as below, obtains data, and write to the file as below.
Other threads have to wait a long time to work on the file.
For your information, I wanted to make a 20-minute animation for the test.
example1)
------------------------------------------------------------------------------------------------------------------------------------------
WebPAnimEncoderOptions enc_options;
WebPAnimEncoderOptionsInit(&enc_options);
// Tune 'enc_options' as needed.
WebPAnimEncoder* enc = WebPAnimEncoderNew(width, height, &enc_options);
while(<there are more frames>) {
WebPConfig config;
WebPConfigInit(&config);
// Tune 'config' as needed.
WebPAnimEncoderAdd(enc, frame, timestamp_ms, &config);
}
WebPAnimEncoderAdd(enc, NULL, timestamp_ms, NULL);
WebPAnimEncoderAssemble(enc, webp_data);
WebPAnimEncoderDelete(enc);
write(fd, webp_data.bytes, webp_data.size);
-------------------------------------------------------------------------------------------------------------------------------------------
Can I bring the muxed data one by one and save it to the file? It should be an Animated webp file.
Is there anyone who knows how I want to do it?