define type of a stream based on stream information