public void Update() { if (Renderers.Count == 0) { Debug.Log($"Renderers == 0 ; Stream {StreamId} {_texturePtr} {_texture} {TexturePtr}"); } if (Width != _width || Height != _height || Rotation != _rotation || TexturePtr != _texturePtr) { Debug.Log($"Create TexturePtr: {_texturePtr}={TexturePtr} ({IntPtr.Zero})\n" + $"{Width}={_width},{Height}={_height},{Rotation}={_rotation}\n" + $"{StreamId}"); CreateTexture(); UpdateRenderers(); VideoStreamChanged?.Invoke(this, new VideoStreamChangedEventArgs { Width = Width, Height = Height, Rotation = Rotation, }); } UpdateImpl(); }
private void RegisterVideoStreamChangedCallback() { _videoStreamChangedCallback = (width, height, fps, bitrate, _) => { Log.Debug(PlayerLog.Tag, $"height={height}, width={width}, fps={fps}, bitrate={bitrate}"); VideoStreamChanged?.Invoke(this, new VideoStreamChangedEventArgs(height, width, fps, bitrate)); }; NativePlayer.SetVideoStreamChangedCb(Handle, _videoStreamChangedCallback). ThrowIfFailed(this, "Failed to set the video stream changed callback"); }
private void RegisterVideoStreamChangedCallback() { _videoStreamChangedCallback = (width, height, fps, bitrate, _) => { Log.Debug(PlayerLog.Tag, "height : " + height + ", width : " + width + ", fps : " + fps + ", bitrate : " + bitrate); VideoStreamChanged?.Invoke(this, new VideoStreamChangedEventArgs(height, width, fps, bitrate)); }; NativePlayer.SetVideoStreamChangedCb(Handle, _videoStreamChangedCallback). ThrowIfFailed("Failed to set the video stream changed callback"); }