VideoWidget API

Matthias Kretz kretz at kde.org
Tue Jul 10 12:14:05 CEST 2007


On Tuesday 10 July 2007, Richard wrote:
> The same problem arise for the first frame, should it be shown when a  
> movie is loaded, but not yet started to play? Perhaps the best choice  
> is to let the user decide upon this himself for each VideoWidget by  
> adding something like:
>
> void setFrameForState(Phonon::State state, qint64 time); // -1 = use  
> brush = default.

Hmm, I'd rather see the developer do it by replacing the videowidget with a 
widget showing something else (e.g. using QStackedWidget: a logo on stop).

I have a patch from a Kaffeine developer that adds a function to get a 
screenshot of the video. That could perhaps be extended to be able to show 
one of the first frames before the video playback is started.

e.g.

videoWidget->requestScreenShot();

void MyPlayer::screenShotReady(const QImage &image)
{
  staticImageWidget->setPixmap(QPixmap::fromImage(image));
  videoStackWidget->setCurrentWidget(staticImageWidget);
}

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/phonon-backends/attachments/20070710/c86b956a/attachment.pgp 


More information about the Phonon-backends mailing list