private void CreateRealTimePlayer()
        {
            Debug.Log("RealtimeVideoPlayer::CreateRealTimePlayer");

            // Only initialize if we have a connection and don't already have a player
            if (this.networkConnection == null || isPlayerCreated)
            {
                Debug.Log("RealtimeVideoPlayer::CreateRealTimePlayer - Connection=null or isPlayerCreated");
                return;
            }

            this.onCreatedCallback      = new PlayerPlugin.PlayerCreatedCallback(Player_PluginCallbackWrapper.OnCreated_Callback);
            this.onStateChangedCallback = new PlayerPlugin.StateChangedCallback(Player_PluginCallbackWrapper.OnStateChanged_Callback);

            IntPtr thisObjectPtr = GCHandle.ToIntPtr(this.thisObject);

            // Create our RealtimePlayer at the Plugin C++ layer
            PluginUtils.CheckHResult(PlayerPlugin.exCreatePlayer(
                                         this.networkConnection.Handle,
                                         this.onStateChangedCallback,
                                         this.onCreatedCallback,
                                         thisObjectPtr,
                                         ref this.playerHandle
                                         ), "RealtimeVideoPlayer::exCreatePlayer()");

            if (!isPlayerCreated)
            {
                Shutdown();
                return;
            }
        }
        public void Shutdown()
        {
            Debug.Log("RealtimeVideoPlayer::Shutdown");

            if (this.connector != null)
            {
                this.StopConnector();
            }

            if (this.isPlayerCreated)
            {
                Stop();

                CloseNetworkConnection();

                PluginUtils.CheckHResult(PlayerPlugin.exReleasePlayer(this.playerHandle), "RealtimeVideoPlayer::exReleasePlayer()");
                this.Texture_Luma           = this.Texture_Chroma = null;
                this.onCreatedCallback      = null;
                this.onStateChangedCallback = null;
                this.playerHandle           = PluginUtils.InvalidHandle;

                PlayerState = PlaybackState.None;
            }
        }