as far as I noticed always people in physics have a predefined assumption that frequency is constant. whereas we know that the c is the outcom of product of wavelength and frequency. we have different wavelength and frequency iv whit light. the energy depends on both of them wavelength and frequency. if you consider the speed of light as a global constant parameter then both attribute of that must have that properties. but we know when light passes through a glass for example; it loses energy as we can measure the changes in temperature of glass that is increased. then I think the change of speed of light is because of interaction between light as an electromagnetic wave and fields inside the material would occure and frequency and wavelength both would change by 1 divided on square root of $n$ or refracting index. by the way we lose the speed but when the light enters the air again it behaves as before then we have the same speed. you van not measure the speed at the boundary condition as speed needs distance and time to be measured. then why we must suppose frequency is constant?