问题描述
使用图片框进行流式传输时,性能会下降。我正在寻找一个支持4k 30fps的库。我认为Opengl将支持它。我在下面分享了我的代码。我需要一个性能更高的查看器,而不是Picturebox。 Opengl可以使用此示例吗?
我有一个C ++ dll。我将4k 30fps的数据从gstreamer转换为位图,然后将其打印到屏幕上。
pt = DLLWrapper.WrapperSingleCameras(0)从流中返回4k30fps帧作为指针。
pt = DLLWrapper.WrapperSingleCameras(0);
BitmapSingleImage = new Bitmap(rsSplitWidth,rsSplitHeight,rsSplitWidth,System.Drawing.Imaging.PixelFormat.Format8bppIndexed,(IntPtr)pt);
ColorPalette _palette = BitmapSingleImage.Palette;
System.Drawing.Color[] _entries = _palette.Entries;
for (int m = 0; m < 256; m++)
{
System.Drawing.Color b = new System.Drawing.Color();
b = System.Drawing.Color.FromArgb((byte)m,(byte)m,(byte)m);
_entries[m] = b;
}
BitmapSingleImage.Palette = _palette;
videosGUI.videoPictureBox.Image = BitmapSingleImage;
videosGUI.videoPictureBox.Refresh();
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)