public static IProducer <T> CreateComponent <T>(this IFrameSource <T> frameSource, Pipeline pipeline, TimeSpan samplingInterval) { var initialFrame = frameSource.GetFrame(); return(Generators.Sequence(pipeline, initialFrame, _ => { var frame = frameSource.GetFrame(); return frame; }, samplingInterval)); }
/// <summary> /// Encodes a specified range of frames obtained from the specified frame source. /// </summary> /// <param name="frameSource"></param> /// <param name="start"></param> /// <param name="count"></param> public void Encode(IFrameSource frameSource, long start, long count) { Contract.Requires(frameSource != null); var end = start + count; for (long i = start; i < end; ++i) { this.EncodeFrame(frameSource.GetFrame(i)); } }
/// <summary> /// Encodes a specified range of frames obtained from the specified frame source. /// </summary> /// <param name="frameSource"></param> /// <param name="start"></param> /// <param name="count"></param> public void Encode(IFrameSource frameSource, long start, long count) { Contract.Requires(frameSource != null); var end = start + count; for (long i = start; i < end; ++i) this.EncodeFrame(frameSource.GetFrame(i)); }