private void HandleKeyFrame(KeyFrame msg, bool dispatchKeyFrame) { if (dispatchKeyFrame && !_keyFrameReceived) { // We're not already processing a key frame, so dispatch // a call to process the data for this keyframe. RetrieveAndProcessKeyFrame(msg); // Only need the first keyframe, then rely on live data. _keyFrameReceived = true; } Driver.UpdateCurrentKeyFrame(msg.FrameNumber); _decryptor.Reset(); }
private void RetrieveAndProcessKeyFrame(KeyFrame k) { //_logger.Info("Retrieving keyframe: " + k.FrameNumber.ToString("d5")); Stream keyFrameData = _keyFrameService.GetKeyFrame(k.FrameNumber); //_logger.DebugFormat("Retrieved keyframe, {0} bytes.", keyFrameData.Length); HandleReadAdHoc(keyFrameData); }
private void TestKeyFrame(Header h) { KeyFrame msg = new KeyFrame(); msg.Deserialise(h, msg.CreatePacketType(h, Input, Input)); Assert.AreEqual(2, msg.FrameNumber); }