Creating a simple video controller
In this recipe we'll learn how to create a simple video controller using the built-in GUI functionalities of Cinder.
We'll control movie playback, if the movie loops or not, the speed rate, volume, and the position.
Getting ready
You must have Apple's QuickTime installed and a movie file in a format compatible with QuickTime.
To learn how to load and display a movie please refer to the previous recipe Loading and displaying Video.
How to do it…
We will create a simple interface using Cinder params
classes to control a video.
Include the necessary files to work with Cinder
params
(QuickTime and OpenGl) by adding the following at the top of the source file:#include "cinder/gl/gl.h" #include "cinder/gl/Texture.h" #include "cinder/qtime/QuickTime.h" #include "cinder/params/Params.h" #include "cinder/Utilities.h"
Add the
using
statements before the application's class declaration to simplify calling Cinder commands as shown in the following code lines:using namespace...