How does H265 video streaming media player libEasyPlayer-RTSP obtain YUV data through data rendering video?

The video rendering of the streaming media player libEasyPlayer-RTSP developed by TSINGSEE Qingxi Video on the mobile phone is the video frame obtained after decoding, which needs to be decomposed into the values ​​of Y, U, and V, and then sent to OpenGL for rendering. Here is a rendering that is passed by default. The handle of the video is the HWND handle.

Can I get the rendering data of Y, U, V without passing in the HWND handle? Therefore, here we tried not to use the HWND handle but to use data rendering, but the desired data was not obtained through the data rendering, resulting in the interface video not being rendered successfully. We first guessed that the function call had a problem, so we did the following Troubleshoot:

Check the code first and call the EasyPlayer_OpenStream function to enter the function:

85.png

Then continue to look down, will use EasyRTSPClient to pull the stream, initialize and set the url and related operations. And start two threads, one for decoding and the other for rendering the video using the window handle.

86.png

If you don't want to render the video, just comment out the _lpDisplayThread line of code, but the data of this function callback does not have the decoded data format. So we still have to check down and enter the _lpDisplayThread thread function to find the rendering part.

There are many function codes in _lpDisplayThread, we only need to find the code related to rendering video. The code contains data such as yuv and converted RGB32 data.

Through the following video rendering method, comment out the code, the video will not be rendered, and the callback is also in the normal data format.

87.png

If you want to know more about EasyPlayer data rendering, you can refer to: EasyPlayer-RTMP-iOS uses YUV to render the screen .

Guess you like

Origin blog.csdn.net/TsingSee/article/details/114998242