Unosquare.FFmpegMediaElement.FFmpegMediaFrameCache.GetFrames C# (CSharp) Method

GetFrames() public method

Gets a maximum duration of frames at the given starting renderTime
public GetFrames ( decimal renderTime, decimal duration ) : List
renderTime decimal The render time.
duration decimal The duration.
return List
        public List<FFmpegMediaFrame> GetFrames(decimal renderTime, decimal duration)
        {
            lock (SyncLock)
            {
                var result = new List<FFmpegMediaFrame>();
                var startFrameIndex = IndexOf(renderTime, false);
                if (startFrameIndex < 0) return result;
                var endTime = renderTime + duration;

                for (var i = startFrameIndex; i < Frames.Count; i++)
                {
                    if (Frames[i].StartTime <= endTime)
                        result.Add(Frames[i]);
                    else
                        break;
                }

                return result;
            }

        }

Same methods

FFmpegMediaFrameCache::GetFrames ( decimal renderTime, int frameCount ) : List