64,648
社区成员
发帖
与我相关
我的任务
分享
avio_alloc_context(unsigned char * buffer,
int buffer_size,
int write_flag,
void * opaque,
int(*)(void *opaque, uint8_t *buf, int buf_size) //读数据回调函数
int(*)(void *opaque, uint8_t *buf, int buf_size) //写数据回调函数
int64_t(*)(void *opaque, int64_t offset, int whence)
)
class Video
{
private:
read_packet(void *opaque, uint8_t *buf, int buf_size);
//剩余代码省略
};
int Video::open_input_file()
{
//...
pb = avio_alloc_context(buffer, BUF_SIZE, 0, NULL, read_packet, NULL, NULL);
//....
}