Hi,
how can you implement a loop over a media file with MediaObject?
I followed the documentation:
        mediaObject.aboutToFinish.connect(this, 'audioFinished()')
        mediaObject.play()

    private audioFinished() {
                println("audioFinished()")
                QApplication.invokeLater({
                        println("mediaObject.play()")

                        // case 1, but with the slot finished
                        //mediaObject.setCurrentSource(new
                        //              
MediaSource(outputFile.getAbsolutePath()))
                        //mediaObject.play()

                        // case 2, with the slot aboutToFinish
                        mediaObject.enqueue(
                                new MediaSource(outputFile.getAbsolutePath()))
                        //mediaObject.play() // to I need to call play() here?
                })
        
    }

I tried two ways, one with mediaObject.enqueue() and the slot aboutToFinish 
and the other with mediaObject.setCurrentSource() and the slot finished. Only 
the one with mediaObject.setCurrentSource() (case 1) works. Case 1 works, but 
you have a short pause in between the playback. Case 2 don't work at all, i.e. 
the first media source is played and nothing more. The slots are used/called 
as expected.

PS: The syntax is correct, it's groovy.
Using Qt Jambi, 4.5.2_01
-- 
Erwin Mueller, [email protected]
http://www.global-scaling-institute.de/
http://www.deventm.org
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to