Adapt video writer example to oop design