Kinetic analysis of reversible solid-gas reactions in films: application to the decomposition of CaCO3 and BaCO3 carbonates