Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SharpGL with libmpv only voice no pictures #36

Open
lyg1949 opened this issue Jul 24, 2020 · 0 comments
Open

SharpGL with libmpv only voice no pictures #36

lyg1949 opened this issue Jul 24, 2020 · 0 comments

Comments

@lyg1949
Copy link

lyg1949 commented Jul 24, 2020

I use libmpv with SharpGL in a wpf desktop app.

no crash ,no error ,just no video only voice.

os: win7 x64 and win10 x64
visual studio 2019

did i miss something?

public MainWindow()
        {
            InitializeComponent();
            renderUpdateCallback = this.renderUpdate;
            GC.KeepAlive(renderUpdateCallback);
            mpvHandle = libmpv.mpv_create();
            libmpv.mpv_initialize(mpvHandle);
      }


private void OpenGLControl1_OpenGLInitialized(object sender, SharpGL.WPF.OpenGLRoutedEventArgs args)
        {
            createRender();
            libmpv.mpv_render_context_set_update_callback(mpvGLContext, renderUpdateCallback, IntPtr.Zero);
            libmpv.mpv_set_option_string(mpvHandle,"vo", "opengl-cb");
            libmpv.mpv_set_option_string(mpvHandle, "hwdec", "auto");
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant