Today after more then 6 hours of compiling I finally succeeded in building my 
own Qt Jambi for Mac OS X (Qt 4.4 snapshot of March 27). Thanks a lot Eskil for 
all the usefull information and help, but... my own Qt Jambi has the same 
problem as the 4.4 preview version: I can't play movies in a graphics view. But 
it seems there is now another problem. I can now see that the MovieWidget is 
added to the graphics view (which was not the case before), because that area 
in 
my scene has now a grey color. So I believe that the widget is added to the 
scene, but when I start my movie, the movie is not visible. My sound is playing 
but the area of my video widget on my scene is still grey.

This is what I do...


*** BEGIN OF MY CODE ***
source = new MediaSource(fileName);

mediaObject = new MediaObject();
mediaObject.setCurrentSource(source);

audioOutput = new AudioOutput(Category.VideoCategory);
videoWidget = new VideoWidget();

Phonon.createPath(mediaObject, audioOutput);
Phonon.createPath(mediaObject, videoWidget);

videoWidget.setVisible(false);
videoWidget.setSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed);

audioOutput.setVolume(volume / 100f); // Volume is a value from 1 to 100

// Now I do some resizing of my videowidget by setting the geometry

// Add the widget to the graphics view
proxyWidget = context.getScene().addWidget(videoWidget);
proxyWidget.setZValue(1);

*** END OF THE CREATION OF A VIDEOWIDGET ***


When I want to start or stop the movie, I do the following:

*** START THE MOVIE ***
mediaObject.seek(0);
mediaObject.play();
videoWidget.setVisible(true);

*** STOP THE MOVIE ***
videoWidget.setVisible(false);
mediaObject.stop();


_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to