private static void FrameCallBack(in FrameRequest request)
{ //自定义数据来源
Bitmap localBitmap = new Bitmap(320, 420, 120, PixelFormat.Format32bppArgb, IntPtr.Zero);
var dataBitmap = localBitmap.LockBits(new Rectangle(Point.Empty, new Size(localBitmap.Width, localBitmap.Width)), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
var vrgbFrame = new Argb32VideoFrame
{
data = dataBitmap.Scan0,
height = (uint)localBitmap.Height,
width = (uint)localBitmap.Width,
stride = dataBitmap.Stride,
};
request.CompleteRequest(in vrgbFrame);
localBitmap.UnlockBits(dataBitmap);
}
C# WebRTC方法
最新推荐文章于 2024-10-11 07:54:05 发布