PDA

View Full Version : Phonon::VideoWidget Problem with AspectRatio



tituslup
23rd July 2008, 09:57
Hello,

I have a problem in setting a video media object at correct aspect ratio:



Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget(widget);
videoWidget->setScaleMode(Phonon::VideoWidget::FitInView);

Phonon::MediaObject *mediaObject = new Phonon::MediaObject(widget);
Phonon::Path path = Phonon::createPath(mediaObject, videoWidget);
mediaObject->enqueue(Phonon::MediaSource("movie.avi"));
videoWidget->setGeometry(0,0,500,500);
videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatio4_3 );
videoWidget->hide();

// ... some unrelated code

videoWidget->show();
//videoWidget->setScaleMode(Phonon::VideoWidget::FitInView);
//videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatio4_3 );
mediaObject->play();


For the first video widget, it works correctly, but when creating additional video widgets, the aspect ratio is ignored (actually, sometime it is, sometimes it isn't). I use the same movie for all calls. It didn't work even when i tried to set the scale mode and the aspect ratio again, after the show() call (the commeted lines).

jpn
27th July 2008, 17:04
Sounds like a bug to me. I'd consider sending a bug report.