我试图在Windows7 64x和C#+ VS 2010 express上使用最新的SDK(2011年6月)从一张blackmagic强度专业卡中捕获720p.
我已经成功编译并运行了一个在YUV捕获帧的程序,但是在56帧之后捕获停止(回调函数停止被调用).我想知道我是否在这里错过了一些简单的东西?特别是考虑到我几乎就在那里 - 我得到的帧数正确,内容正确,但只有很短的时间.
还有一些可能相关的其他信息:
这是代码:
public partial class MainWindow : Window , IDeckLinkInputCallback
{
private IDeckLinkIterator _deckLinkIterator;
private List<IDeckLink> _deckLinkList = new List<IDeckLink>();
private IDeckLink _currentDevice=null;
private IDeckLinkInput _deckLinkInput = null;
private int _width=1280;
private int _height=720;
private WriteableBitmap _writeableBitmap =null;
IntPtr _tempRGBData;
byte[] _tempRGBDataBytes;
DispatcherTimer _timer = new DispatcherTimer();
public MainWindow()
{
InitializeComponent();
}
Random _random = new Random();
void _timer_Tick(object sender, EventArgs e)
{
_random.NextBytes(_tempRGBDataBytes);
_writeableBitmap.WritePixels(new Int32Rect(0, 0, _width, _height),_tempRGBData, …Run Code Online (Sandbox Code Playgroud)