In situ monitoring of epitaxial ferroelectric thin-film growth