Exemple #1
0
        public unsafe Player(Connect connect, object observer)
        {
            IntPtr intptr = new IntPtr(this.GetHashCode());

            refKeeper[intptr] = this;

            libcPlayerHndl = dz_player_new(connect.libcConnectHndl);
            this.connect   = connect;

            onMetaDatacb = (libcPlayer, trackMetadata, userdata) =>
            {
                Debug.WriteLine($"trackMetadata: {trackMetadata}");
            };
            dz_player_set_metadata_cb(libcPlayerHndl, onMetaDatacb);

            onIndexProgress = (libcPlayer, progressMicroseconds, userdata) =>
            {
                OnProgressChanged(progressMicroseconds);
            };
            dz_player_set_index_progress_cb(libcPlayerHndl, onIndexProgress, 1000000);

            onRenderProgress = (libcPlayer, progressMicroseconds, userdata) =>
            {
                OnRenderChanged(progressMicroseconds);
            };
            dz_player_set_render_progress_cb(libcPlayerHndl, onRenderProgress, 1000000);
        }
Exemple #2
0
 static extern unsafe ERRORS dz_player_set_render_progress_cb(PLAYER *lpcc, libcPlayerOnRenderProgressCb cb, ulong refreshUs);