[Qt-interest] help with QtMultimedia

Anders Bakken anders.bakken at myriadgroup.com
Wed Jul 21 19:42:40 CEST 2010


On Wed, Jul 21, 2010 at 04:06:40AM +0100, Dmytro Poplavskiy wrote:
> Hello Anders,
>
> On Wednesday 21 July 2010 07:59:51 ext Anders Bakken wrote:
> > Apologies if this has been answered before but I couldn't find it by
> > grep'ing through the archives.
> >
> > There seems not to be a whole lot of examples regarding QtMultimedia:
> >
> > I have the following use case:
> >
> > I want to process live video coming in (in MP4 format but I can possibly
> > change that) on a stream and I want to access the raw data of each
> > decoded frame to do some analysis. E.g. in RGBA or YUV or whichever
> > format it comes.
> >
> > Are there APIs in QtMultimedia that could facilitate this kind of
> > operation? Are there any examples?
>
> It's possible to get access to video frames without displaying them using
> QVideoRendererControl.
>
> You have to implement QAbstractVideoSurface (which returns the list of
> video formats you support and receives the video frames)
> and pass it to QVideoRendererControl::setSurface().
>
> The media player backend will pass the video frames to your surface with
> QAbstractVideoSurface::present().
>
> We don't have the good example for this case yet, QGraphicsVideoItem and
> QVideoWidget  do this, but because of their complexity it's not the best
> example.
>
> The code may look like this:
>
> QVideoRendererControl* rendererControl =
>       player->service()->requestControl<QVideoRendererControl*>();
>
> if (rendererControl)
>     rendererControl->setSurface(surface);
>
> player->setMedia(...); //stream uri
> player->play();
>
> Regards
>   Dmytro.

Hi Dmytro

Thanks. I'll give it a shot.

regards

--
Anders Bakken

This message, including attachments, is intended solely for the addressee indicated in this message and is strictly confidential or otherwise privileged. If you are not the intended recipient (or responsible for delivery of the message to such person) : - (1) please immediately (i) notify the sender by reply email and (ii) delete this message and attachments, - (2) any use, copy or dissemination of this transmission is strictly prohibited. If you or your employer does not consent to Internet email messages of this kind, please advise Myriad Group AG by reply e-mail immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by Myriad Group AG unless otherwise indicated by an authorized representative independent of this message.




More information about the Qt-interest-old mailing list