<div dir="ltr">Hi,<br><br>Actually there are two question, but first some explenation:<br><br>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.<br><br>I have two problems:<div><br>1. I have to use function set in AVIOContext:</div><div>int (*read_packet)(void *opaque, uint8_t *buf, int buf_size)</div><div><br>But in that case I have to copy data. Is there a way to just set pointer with filled data?<br>Or some other way how to speedup that part of the code?<br></div><div>I'm storing data in queue.</div><div><br></div><div>2. I have to copy data from AVFrame into GPU, for example:</div>glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, GL_RED, GL_UNSIGNED_BYTE, m_frame->data[0]);<div><br></div><div>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.</div><div><br></div><div>Regards</div><div>Zygmunt</div>
</div>