Slide 17
Slide 17 text
AVIOContext *allocIOContext(void *bridge) {
int bufferSize = 4096;
uint8_t *buffer = (uint8_t *)av_malloc(bufferSize);
return avio_alloc_context(
buffer, bufferSize, 1,
bridge, 0, golibmp4BridgeWriterWrite, golibmp4BridgeSeek
);
}
void freeIOContextBuffer(AVIOContext *ctx) {
av_free(ctx->buffer);
}
I/Oを繋ぎ合わせる
C側から関数ポインタを渡す
17