Changing width / height of played video file on phonon video widget



  • Hello,

    In an application when I have ui created in Qt Designer with added QStackedWidget , I create

    @
    Phonon::MediaObject *mediaObject;
    Phonon::MediaSource *mediaSource;
    Phonon::VideoWidget * videow;
    @

    and add videow to the stacked widget by :

    @
    this->ui->stackedWidget->insertWidget(0,videow);
    @

    objects creations and connections:

    @
       videow = new Phonon::VideoWidget(this);
       videow->setScaleMode(Phonon::VideoWidget::FitInView);
       videow->setFixedSize(w,h);
       this->ui->stackedWidget->insertWidget(0,videow)
       mediaObject = new Phonon::MediaObject(this);
       Phonon::createPath(mediaObject,videow);
       QString fileName = "video1.avi";
       mediaSource = new Phonon::MediaSource(fileName);
       mediaObject->setCurrentSource(*mediaSource);
       connect(videow,SIGNAL(finished()),this,SLOT(playEnded())); 
    

    @

    and then play video file by invoking

    @
    this->mediaObject->play();
    @

    When I run the program built in release mode , having above code ,
    the video file is played on Phonon::VideoWidget that is inserted into QStackedWidget but with dimensions not set by mine at the code above ( w , h ) but with source dimensions of the .avi file ( 640*480 for a case ) file.
    And I get the following warning :
    @
    Warning: driver is sending image at 640x480@

    Does anybody know what is the bug in changing playing video dimensions ?
    Does anybody know how to change display video width , height in the Phonon::VideoWidget ?

    Thanks in advance


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.