Phonon VideoPlayer in Qt Jambi – Screencast

Hi!
I made this short screencast to show you some of the Phonon functionalities inside Qt Jambi. Enjoy:

-left my internal mic. on, sorry for the background noise-
The code is pretty self-explanatory, you should point with MediaSource to a media file (audio/video):

package org.qtjambi;

import com.trolltech.qt.gui.*;
import com.trolltech.qt.phonon.*;

public class Demo extends QWidget {

private VideoPlayer vp = new VideoPlayer();
private QPushButton play = new QPushButton("Play");
private MediaSource ms = new MediaSource("demo.ogv");

public Demo() {
setWindowTitle("Phonon Demo");
QVBoxLayout qvb = new QVBoxLayout();

vp.load(ms);
play.clicked.connect(vp, "play()");

qvb.addWidget(vp);
qvb.addWidget(play);

setLayout(qvb);
}

public static void main(String [] args) {
QApplication.initialize(args);
Demo demo = new Demo();
demo.show();
QApplication.exec();
}

}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s