timestamp video samples to the pipeline clock
- only draw cursor if it is visible as well
- use CG api instead of NS api where possible to align with other areas of the code
- changes to casts; no functional change