Results 1 to 2 of 2

Thread: Phonon::VideoWidget Problem with AspectRatio

  1. #1
    Join Date
    Apr 2008
    Location
    Cluj-Napoca, Romania
    Posts
    10
    Thanks
    5
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Phonon::VideoWidget Problem with AspectRatio

    Hello,

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

    Qt Code:
    1. Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget(widget);
    2. videoWidget->setScaleMode(Phonon::VideoWidget::FitInView);
    3.  
    4. Phonon::MediaObject *mediaObject = new Phonon::MediaObject(widget);
    5. Phonon::Path path = Phonon::createPath(mediaObject, videoWidget);
    6. mediaObject->enqueue(Phonon::MediaSource("movie.avi"));
    7. videoWidget->setGeometry(0,0,500,500);
    8. videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatio4_3);
    9. videoWidget->hide();
    10.  
    11. // ... some unrelated code
    12.  
    13. videoWidget->show();
    14. //videoWidget->setScaleMode(Phonon::VideoWidget::FitInView);
    15. //videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatio4_3);
    16. mediaObject->play();
    To copy to clipboard, switch view to plain text mode 

    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).

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Phonon::VideoWidget Problem with AspectRatio

    Sounds like a bug to me. I'd consider sending a bug report.
    J-P Nurmi

Similar Threads

  1. Replies: 16
    Last Post: 7th March 2006, 15:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.