Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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");
        }
Ejemplo n.º 3
0
        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");
        }