override public PixelsMap FrameNext() { base.FrameNext(); base.Action(); try { _cPixelsMap = _cPMDuo.Switch(nPixelsMapSyncIndex); _cTimings.TotalRenew(); if (null == _cPixelsMap) { _cPixelsMap = new PixelsMap(stMergingMethod, new Area(0, 0, stArea.nWidth, stArea.nHeight), PixelsMap.Format.ARGB32); _cPixelsMap.bKeepAlive = false; // на одни раз _cPixelsMap.nIndexTriple = nPixelsMapSyncIndex; _cPixelsMap.Allocate(); _cTimings.Restart("newpm"); } _cPixelsMap.Move(0, 0); _cTimings.Restart("move1"); _cFile.VideoFrameNext(_cPixelsMap); _cTimings.Restart("frnext"); if (_cFile.bEOF) { base.Stop(); return(null); } _cPixelsMap.Move(stArea.nLeft, stArea.nTop); _cTimings.Restart("move2"); Advance(); _cTimings.Stop("frnext", "advance", 30); } catch (Exception ex) { (new Logger()).WriteError(ex); } if (nFrameCurrent >= nDuration) { base.Stop(); } if (null != _cPixelsMap) { _cPixelsMap.nAlphaConstant = nCurrentOpacity; if (null != cMask) { _cPixelsMap.eAlpha = cMask.eMaskType; } } return(_cPixelsMap); }
override public PixelsMap FrameNext() { lock (_cSyncRoot) { base.FrameNext(); if (nFrameCurrent >= nDuration) { base.Stop(); } _cPixelsMap = _cPMDuo.Switch(nPixelsMapSyncIndex); if (null == _cPixelsMap) { _cPixelsMap = new PixelsMap(stMergingMethod, stArea, PixelsMap.Format.ARGB32); _cPixelsMap.bKeepAlive = false; // на одни раз _cPixelsMap.nIndexTriple = nPixelsMapSyncIndex; _cPixelsMap.Allocate(); } if (null != _cPixelsMap) { if (!_aPMGotDrawCurrent.Contains(_cPixelsMap.nID)) { _dtChanged = DateTime.Now; _aPMGotDrawCurrent.Add(_cPixelsMap.nID); _cPixelsMap.CopyIn(_aDrawCurrent.aBytes); } if (_cPixelsMap.nAlphaConstant != nCurrentOpacity) { _dtChanged = DateTime.Now; _cPixelsMap.nAlphaConstant = nCurrentOpacity; } if (null != cMask && _cPixelsMap.eAlpha != cMask.eMaskType) { _dtChanged = DateTime.Now; _cPixelsMap.eAlpha = cMask.eMaskType; } if (_cPixelsMap.stArea.nLeft != stArea.nLeft || _cPixelsMap.stArea.nTop != stArea.nTop) { _dtChanged = DateTime.Now; _cPixelsMap.Move(stArea.nLeft, stArea.nTop); } } return(_cPixelsMap); } }