Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        /// <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));
            }
        }
Exemplo n.º 3
0
        /// <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));
        }