MCPcopy Create free account
hub / github.com/AOMediaCodec/libavif / avifCodecEncodeOutputAddSample

Function avifCodecEncodeOutputAddSample

src/write.c:138–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138avifResult avifCodecEncodeOutputAddSample(avifCodecEncodeOutput * encodeOutput, const uint8_t * data, size_t len, avifBool sync)
139{
140 avifEncodeSample * sample = (avifEncodeSample *)avifArrayPush(&encodeOutput->samples);
141 AVIF_CHECKERR(sample, AVIF_RESULT_OUT_OF_MEMORY);
142 const avifResult result = avifRWDataSet(&sample->data, data, len);
143 if (result != AVIF_RESULT_OK) {
144 avifArrayPop(&encodeOutput->samples);
145 return result;
146 }
147 sample->sync = sync;
148 return AVIF_RESULT_OK;
149}
150
151void avifCodecEncodeOutputDestroy(avifCodecEncodeOutput * encodeOutput)
152{

Callers 7

aomCodecEncodeImageFunction · 0.85
aomCodecEncodeFinishFunction · 0.85
dequeue_frameFunction · 0.85
rav1eCodecEncodeImageFunction · 0.85
rav1eCodecEncodeFinishFunction · 0.85
avmCodecEncodeImageFunction · 0.85
avmCodecEncodeFinishFunction · 0.85

Calls 3

avifArrayPushFunction · 0.85
avifRWDataSetFunction · 0.85
avifArrayPopFunction · 0.85

Tested by

no test coverage detected