Crystal structure and electronic properties of bulk and thin film brownmillerite oxides