I'm trying to create an extension looks like camera split , but I'm not getting it

You might have a look at the source code for the Procam extension for ideas.

I am not sure if it is possible to duplicate the live feed from the camera, though.