Bombsquad.DynamicMedia.Implementations.Transformation.CompositeMediaTransformer.TransformStream C# (CSharp) Method

TransformStream() public method

public TransformStream ( Stream stream, Stream &transformedStream ) : MediaTransformResult
stream System.IO.Stream
transformedStream System.IO.Stream
return MediaTransformResult
        public MediaTransformResult TransformStream(Stream stream, out Stream transformedStream)
        {
            transformedStream = stream;
            var worstResult = MediaTransformResult.Success;

            foreach (var transformer in _transformers)
            {
                var mediaTransformResult = transformer.TransformStream(transformedStream, out transformedStream);
                if(mediaTransformResult > worstResult)
                {
                    worstResult = mediaTransformResult;
                }
            }

            return worstResult;
        }