[Libav-user] Is there a way to not copy data to/from buffers?
Actually there are two question, but first some explenation:
I have to use AVIOContext to read data from stream, and I have to show decoded video from stream as fast it is possible. I'm using h264_cuvid to get hardware acceleration and video frames are rendered in OpenGL.
I have two problems:
1. I have to use function set in AVIOContext:
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size)
But in that case I have to copy data. Is there a way to just set pointer with filled data? Or some other way how to speedup that part of the code?
I'm storing data in queue.
2. I have to copy data from AVFrame into GPU, for example: