Exemplo n.º 1
0
        private void InitalizeMpvDynamic()
        {
            mOpenGLES.MakeCurrent(mRenderSurface);

            mpv = new Mpv();
            mpv.OpenGLCallbackInitialize(null, MyProcAddress, IntPtr.Zero);
            mpv.OpenGLCallbackSetUpdate(DrawNextFrame, IntPtr.Zero);
            mpv.ExecuteCommand("loadfile", "http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_h264.mov");
        }
Exemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();

            _mpv = new Mpv(Handle);
            _mpv.LoadConfig("mpv.conf");
            _mpv.Initialize();

            var args = Environment.GetCommandLineArgs();
            if( args.Length > 1 )
            {
                _mpv.LoadFile(args[1]);
                Text = args[1];
            }

            #if DEBUG
                //HACK - breaking here seems to fix an access violation when running in Debug mode.
                //Not sure why (race condition in MSVCRT?) but it doesn't happen in Release mode, so whatever.
                Debugger.Break();
            #endif
        }