Deleting old code and keeping new design with videoframe buffer and rw locks