[Libav-user] Is there a way to not copy data to/from buffers?
zygmuntptak at gmail.com
Fri Aug 11 18:59:33 EEST 2017
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:
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, GL_RED,
Is there a way to ommit that part, cuvid should have already that data in
GPU, would be nice to somehow get texture id directly and show it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user