Beispiel #1
0
        private void initializeNdiFrame()
        {
            int bufferSize = _VideoBuffer.Height * _VideoBuffer.Stride * 3 / 2;

            if (_VideoBufferAllocated)
            {
                Marshal.FreeHGlobal(_VideoBufferPtr);
            }

            _VideoBufferPtr       = Marshal.AllocHGlobal(bufferSize);
            _VideoBufferAllocated = true;

            _NdiVideoFrame = new NDI.VideoFrame(
                _VideoBufferPtr,
                _RequestedWidth,
                _RequestedHeight,
                _VideoBuffer.Stride,
                (NDIlib.FourCC_type_e)InputFormat.FourCC,
                (float)_VideoBuffer.Width / _VideoBuffer.Height,
                _FrameRateNumerator,
                _FrameRateDenominator,
                NDIlib.frame_format_type_e.frame_format_type_progressive);
        }
Beispiel #2
0
 public void Send(VideoFrame videoFrame)
 {
     Send(ref videoFrame._ndiVideoFrame);
 }