|
Last change
on this file since 269 was 2, checked in by Dmitry A. Kuminov, 16 years ago |
|
Initially imported qt-all-opensource-src-4.5.1 from Trolltech.
|
|
File size:
800 bytes
|
| Line | |
|---|
| 1 | #include <QtGui>
|
|---|
| 2 |
|
|---|
| 3 | #include <phonon/mediaobject.h>
|
|---|
| 4 | #include <phonon/audiooutput.h>
|
|---|
| 5 | #include <phonon/videowidget.h>
|
|---|
| 6 | #include <phonon/medianode.h>
|
|---|
| 7 | #include <phonon/path.h>
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 | int main(int argv, char **args)
|
|---|
| 11 | {
|
|---|
| 12 | QApplication app(argv, args);
|
|---|
| 13 |
|
|---|
| 14 | //![0]
|
|---|
| 15 | Phonon::MediaObject *mediaObject = new Phonon::MediaObject;
|
|---|
| 16 | Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput;
|
|---|
| 17 | Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget;
|
|---|
| 18 |
|
|---|
| 19 | Phonon::createPath(mediaObject, audioOutput);
|
|---|
| 20 | Phonon::createPath(mediaObject, videoWidget);
|
|---|
| 21 |
|
|---|
| 22 | QList<Phonon::Path> inputPaths =
|
|---|
| 23 | audioOutput->inputPaths(); // inputPaths = [ mediaObject ]
|
|---|
| 24 | QList<Phonon::Path> outputPaths =
|
|---|
| 25 | mediaObject->outputPaths(); // outputPaths = [ audioOutput, videoWidget ]
|
|---|
| 26 | //![0]
|
|---|
| 27 |
|
|---|
| 28 | return app.exec();
|
|---|
| 29 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.