File: https://github.com/videolan/vlc/tree/master/doc/libvlc /sdl_opengl_player.cpp
Platform: Windows
OS: Win7 x64
LibVLC:4.0.0 Dev Nightly Build
This example doesn’t work well as expect.
sdl_opengl_player using of CPU is about 30% When Playing mp4 file 1080p@30Hz with an Intel i5 laptop, However, it is only about 3% for the released player(also the same with simplest player using LibVLC). As we know all the OpenGL works on GPU,there seems no extra CPU works comparing with a usually player. Does the SDL WINDOW consume such more CPU?
FIRST(1):For video it isn’t smooth, the picture is “pause” and the sound is going on.
Log Info:
main generic debug: using hw decoder module "dxva2"
main decoder debug: vout change: chroma
main video output debug: deinterlace -1, mode auto, is_needed 0
main video output debug: Opening vout display wrapper
main generic debug: looking for vout display module matching "gl": 12
candidates
main generic debug: looking for opengl module matching "vgl": 2 candidates
main generic debug: using opengl module "vgl"
main generic debug: looking for glinterop module matching "any": 2 candidates
main generic debug: no glinterop modules matched
gl gl debug: PBO support enabled
gl gl debug:
=== Vertex shader for fourcc: I420 ===
…………………………
…………………………
…………………………
avcodec decoder debug: available hardware decoder output format 174 (d3d11)
avcodec decoder debug: available software decoder output format 0 (yuv420p)
avcodec decoder debug: reusing decoder output format 53
main decoder debug: Received first picture
main input debug: Buffering 100%
main input debug: Stream buffering done (1250 ms in 456 ms)
main input debug: Decoder wait done in 0 ms
main input error: ES_OUT_SET_(GROUP_)PCR is called 9 ms late (pts_delay increased to 1009 ms)
main input debug: ES_OUT_RESET_PCR called
main input debug: Buffering 0%
main input debug: Buffering 24%
main input debug: Buffering 49%
avcodec decoder debug: available hardware decoder output format 119 (cuda)
main input debug: Buffering 74%
avcodec decoder debug: available hardware decoder output format 53 (dxva2_vld)
main input debug: Buffering 99%
main input debug: Stream buffering done (1250 ms in 160 ms)
avcodec decoder debug: available hardware decoder output format 118 (d3d11va_vld)
avcodec decoder debug: available hardware decoder output format 174 (d3d11)
avcodec decoder debug: available software decoder output format 0 (yuv420p)
avcodec decoder debug: reusing decoder output format 53
main decoder debug: Received first picture
main input debug: Decoder wait done in 194 ms
main video output warning: picture is too late to be displayed (missing 204 ms)
main video output warning: picture is too late to be displayed (missing 195 ms)
main video output warning: picture is too late to be displayed (missing 180 ms)
main video output warning: picture is too late to be displayed (missing 155 ms)
main video output warning: picture is too late to be displayed (missing 131 ms)
main input error: ES_OUT_SET_(GROUP_)PCR is called 976 ms late (pts_delay increased to 1739 ms)
main video output warning: picture is too late to be displayed (missing 494 ms)
main input debug: ES_OUT_RESET_PCR called
main decoder debug: Received first picture
main input debug: Buffering 0%
main input debug: Buffering 14%
avcodec decoder debug: available hardware decoder output format 119 (cuda)
avcodec decoder debug: available hardware decoder output format 53 (dxva2_vld)
avcodec decoder debug: available hardware decoder output format 118 (d3d11va_vld)
avcodec decoder debug: available hardware decoder output format 174 (d3d11)
Second(2): For some video like this sound is OK and no video shown but Black.
0x000007FEFDACA06D (KernelBase.dll)at (in Player.exe ) exception:
0x20474343 (refer: 0x0000000027F26800)。
main input debug: control type=27
main subpicture warning: original picture size is undefined
main input debug: control type=27
main input debug: control type=27
main video output warning: picture is too late to be displayed (missing 150ms)
main video output warning: picture is too late to be displayed (missing 171 ms)
main video output warning: picture is too late to be displayed (missing 201 ms)
main video output warning: picture is too late to be displayed (missing 210 ms)
main video output warning: picture is too late to be displayed (missing 195 ms)
main video output warning: picture is too late to be displayed (missing 209 ms)
main video output warning: picture is too late to be displayed (missing 201 ms)
main video output warning: picture is too late to be displayed (missing 232 ms)
main decoder debug: vout change: multiview
main video output debug: requested window size: 3840x1080
Thread 0x4548 is exit,Returen 0 (0x0)。
main video output debug: deinterlace -1, mode auto, is_needed 0
0x000007FEEA6D9B0D (libvlccore.dll)at (in Player.exe ) exception:
0xC0000005: Read location 0x000000002717FA08 when conflict occur.