I want to develop a video playback tool (playing video files up to a resolution of 2k) using OpenGl. At the moment I`m not totally sure which parts of OpenGl I have to use to achieve a really good “real-time experience” without a lot of dropouts during the playback. Beside the video playback the application should be able to add subtitles which are not originally in the video file and the application should be running on Windows 7, Windows 8 as well as Mac OS X.
My first general question is if there are any improvements using OpenGl in combination with OpenCl? For example, is it faster to use OpenCL for rendering the subtitles (or any future upcoming video effects like interlacing)?
Using OpenGl it seems to me that the use of texture object as well as framebuffer objects are the best way to go. I will copy the video frame (texture) to the first framebuffer object by dma. The second framebuffer object contains the same video frame as well as another texture object for the subtitle. With this situation I can switch on and off the subtitles during the playback immediately.
Are there any options provided by OpenGl to know when the video frame gets displayed on the screen?
thanks in advance