Closed alexmercerind closed 2 years ago
Personally, I suspect those multiple scary:
[libmpv_render] Loading failed.
But, it should work. If not, why not & what should I do to fix?
There's a [libmpv_render/dxva2-egl] Failed to create EGL surface
in the logs. Likely from https://github.com/mpv-player/mpv/blob/69f21d5e74ad791b40767e0a5e809c6dcbf2971a/video/out/opengl/hwdec_dxva2egl.c#L274-L277. But there's no particular reason for it to fail.
So #10212 seems to guide a little, no more seeing [libmpv_render] Loading failed.
under d3d11-egl
. I enforced this using --gpu-hwdec-interop
. Maybe this wasn't the issue in first place.
But, I'm still confused why it is freezed completely.
So, there are no errors. It's just that mpv_render_context_set_update_callback
isn't invoking the passed callback for some reason.
Spinning a detached frame constantly calling mpv_render_context_render
actually makes video show up in the UI & nothing freezes.
What could be reason of mpv_render_context_set_update_callback
not working.
Moral of the story: read docs carefully.
First off, I'm trying to render mpv video output using ANGLE. I'm not much sure about anything in this regard.
In theory, everything is working, no visible errors from ANGLE or Direct3D11 APIs. But, the screen is just blank black. And
mpv
just gets "stuck" after logging this.All the code is available here: https://github.com/alexmercerind/flutter-windows-ANGLE-OpenGL-Direct3D-Interop/tree/mpv.
More specifically, this section includes all the mpv specific calls: https://github.com/alexmercerind/flutter-windows-ANGLE-OpenGL-Direct3D-Interop/blob/8b5f1f51f3a13c1509d120859089e75c5794928b/windows/flutter_windows_angle_d3d_texture_plugin.cpp#L347-L385.
Log file
Full Logs: log.txt
Please ignore
glActiveTexture: 00007FFCD8E63880
logs, those were added for a check.Thanks a lot!