[Qt-interest] HOWTO: Grab Video from QMediaPlayer - Solution in Search of a Problem

Dmytro Poplavskiy dmytro.poplavskiy at nokia.com
Wed Oct 6 08:56:57 CEST 2010


Hi Josiah,

This is the correct way to receive frames from video player or camera,
but the surface implementation can be easier,
it's necessary to implement at least

QAbstractVideoSurface::supportedPixelFormats()
which return the list of formats you can handle and 
QAbstractVideoSurface::present()
to receive the frame.

It's useful to implement start() and stop() if you need
to do format specific initialization.

Some backends may support non local memory frames
(like OpenGL textures, CoreImage buffers or X11 pixmaps)
which can be used for rendering to OpenGL scene.
Currently it's only supported by QuickTime backend on Mac,
but can be used/supported on other platforms in future.

On Tue, 21 Sep 2010 06:14:56 am ext Josiah Bryan wrote:
> Josiah Bryan wrote:
> > This is just a 'solution' email - no question, no problem - just an
> > email in case someone else is trying to figure this out, hopefully this
> > may save someone some time.
> 
> I feel like an idiot - I tell *about* the code, but I forgot to *show*
> to the code! Doh!
> 
> http://code.google.com/p/dviz/source/browse/trunk/src/glvidtex/QtVideoSourc
> e.cpp
> 
> Sorry everyone.
> -Josiah


Regards
  Dmytro.



More information about the Qt-interest-old mailing list