Study of the structure of radio frequency glow discharges in CH4 and H2 by spatiotemporal optical emission spectroscopy