aboutsummaryrefslogtreecommitdiffstats
path: root/doc/codesnippets
diff options
context:
space:
mode:
authorChristian Tismer <ctismer@gmail.com>2015-07-04 16:25:13 +0200
committerChristian Tismer <ctismer@gmail.com>2015-07-04 16:25:13 +0200
commit5d15b87de6fb45367a46dd25a8a95822f6a9c635 (patch)
tree5daf706d99a6e1c40096ef9fce1747d91c320889 /doc/codesnippets
parentde09fdd1a317bd57f6cb3ff104c5b6a6a7b782fc (diff)
remove all traces of phonon
Diffstat (limited to 'doc/codesnippets')
-rw-r--r--doc/codesnippets/doc/src/snippets/audioeffects.cpp42
-rw-r--r--doc/codesnippets/doc/src/snippets/code/doc_src_phonon-api.qdoc192
-rw-r--r--doc/codesnippets/doc/src/snippets/medianodesnippet.cpp29
-rw-r--r--doc/codesnippets/doc/src/snippets/phonon.cpp96
-rw-r--r--doc/codesnippets/doc/src/snippets/phonon/samplebackend/main.cpp115
-rw-r--r--doc/codesnippets/doc/src/snippets/phononeffectparameter.cpp35
-rw-r--r--doc/codesnippets/doc/src/snippets/phononobjectdescription.cpp40
-rw-r--r--doc/codesnippets/doc/src/snippets/videomedia.cpp19
-rw-r--r--doc/codesnippets/doc/src/snippets/volumeslider.cpp29
-rw-r--r--doc/codesnippets/snippets/phonon.cpp39
-rw-r--r--doc/codesnippets/snippets/phonon/samplebackend/main.cpp66
11 files changed, 0 insertions, 702 deletions
diff --git a/doc/codesnippets/doc/src/snippets/audioeffects.cpp b/doc/codesnippets/doc/src/snippets/audioeffects.cpp
deleted file mode 100644
index 855b1a2f3..000000000
--- a/doc/codesnippets/doc/src/snippets/audioeffects.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-#include <QtWidgets>
-
-#include <phonon/audiooutput.h>
-#include <phonon/mediaobject.h>
-#include <phonon/backendcapabilities.h>
-#include <phonon/effect.h>
-#include <phonon/effectwidget.h>
-
-
-int main(int argv, char **args)
-{
- QApplication app(argv, args);
- app.setApplicationName("Audio effect tester");
-
- Phonon::MediaObject *mediaObject = new Phonon::MediaObject;
- mediaObject->setCurrentSource(QString("/home/gvatteka/Music/Lumme-Badloop.ogg"));
-
- Phonon::AudioOutput *audioOutput =
- new Phonon::AudioOutput(Phonon::MusicCategory);
-
-//! [0]
- QList<Phonon::EffectDescription> effectDescriptions =
- Phonon::BackendCapabilities::availableAudioEffects();
- Phonon::EffectDescription effectDescription = effectDescriptions.at(4);
-
- Phonon::Path path = Phonon::createPath(mediaObject, audioOutput);
-
-//! [1]
- Phonon::Effect *effect = new Phonon::Effect(effectDescription);
- path.insertEffect(effect);
-//! [0]
-
- Phonon::EffectWidget *effectWidget = new Phonon::EffectWidget(effect);
- effectWidget->show();
-//! [1]
-
- mediaObject->play();
-
- effectWidget->setWindowTitle("Effect Name: " + effectDescription.name());
-
- app.exec();
-}
diff --git a/doc/codesnippets/doc/src/snippets/code/doc_src_phonon-api.qdoc b/doc/codesnippets/doc/src/snippets/code/doc_src_phonon-api.qdoc
deleted file mode 100644
index 3f0771e37..000000000
--- a/doc/codesnippets/doc/src/snippets/code/doc_src_phonon-api.qdoc
+++ /dev/null
@@ -1,192 +0,0 @@
-//! [0]
-class PushStream (AbstractMediaStream):
- def __init__(self, parent = None):
- AbstractMediaStream.__init(self, parent)
- self.timer = QTimer(self)
- self.setStreamSize(self.getMediaStreamSize())
-
- self.timer.timeout.connect(self.moreData)
- self.timer.setInterval(0)
-
- @Slot()
- def moreData(self):
- data = self.getMediaData()
- if data.isEmpty():
- self.endOfData()
- else:
- self.writeData(data)
-
- def needData(self):
- self.timer.start()
- self.moreData()
-
- def enoughData(self):
- self.timer.stop()
-//! [0]
-
-
-//! [1]
-class PushStream (AbstractMediaStream):
- def __init__(self, parent = None):
- AbstractMediaStream.__init(self, parent)
- self.setStreamSize(self.getMediaStreamSize())
-
- @Slot()
- def needData(self):
- data = self.getMediaData()
- if data.isEmpty():
- self.endOfData()
- else:
- self.writeData(data)
-//! [1]
-
-
-//! [2]
-self.seekStream(0)
-//! [2]
-
-
-//! [3]
-m = MediaObject()
-fileName = "/home/foo/bar.ogg"
-url = QUrl("http://www.example.com/stream.mp3")
-someBuffer = QBuffer()
-m.setCurrentSource(fileName)
-m.setCurrentSource(url)
-m.setCurrentSource(someBuffer)
-m.setCurrentSource(Phonon.Cd)
-//! [3]
-
-
-//! [4]
-player = VideoPlayer(Phonon.VideoCategory, parentWidget)
-player.finished.connect(player.deleteLater)
-player.play(url)
-//! [4]
-
-
-//! [5]
-audioPlayer.load(url)
-audioPlayer.play()
-//! [5]
-
-
-//! [6]
-media = MediaObject(self)
-media.finished.connect(self.slotFinished)
-media.setCurrentSource("/home/username/music/filename.ogg")
-
-# ...
-
-media.play()
-//! [6]
-
-
-//! [7]
-media.setCurrentSource(":/sounds/startsound.ogg")
-media.enqueue("/home/username/music/song.mp3")
-media.enqueue(":/sounds/endsound.ogg")
-//! [7]
-
-
-//! [8]
- media.setCurrentSource(":/sounds/startsound.ogg")
- media.aboutToFinish.connect(lambda : media.enqueue("/home/username/music/song.mp3"))
-//! [8]
-
-
-//! [9]
-x = 200
-media.setTickInterval(x)
-assert(x == producer.tickInterval())
-//! [9]
-
-
-//! [10]
-x = 200
-media.setTickInterval(x)
-assert(x >= producer.tickInterval() and x <= * producer.tickInterval())
-//! [10]
-
-
-//! [11]
-//! [12]
- self.media.hasVideoChanged[bool].connect(hasVideoChanged)
- self.media.setCurrentSource("somevideo.avi")
- self.media.hasVideo() # returns false
-
- @Slot(bool)
- def hasVideoChanged(self, b):
- # b == true
- media.hasVideo() # returns true
-//! [12]
-//! [11]
-
-//! [13]
-self.setMetaArtist(media.metaData("ARTIST"))
-self.setMetaAlbum(media.metaData("ALBUM"))
-self.setMetaTitle(media.metaData("TITLE"))
-self.setMetaDate(media.metaData("DATE"))
-self.setMetaGenre(media.metaData("GENRE"))
-self.setMetaTrack(media.metaData("TRACKNUMBER"))
-self.setMetaComment(media.metaData("DESCRIPTION"))
-//! [13]
-
-
-//! [14]
-url = QUrl("http://www.example.com/music.ogg")
-media.setCurrentSource(url)
-//! [14]
-
-
-//! [15]
-progressBar.setRange(0, 100) # this is the default
-self.media.bufferStatus[int].connect(progressBar.setValue)
-//! [15]
-
-
-//! [16]
-BackendCapabilities.notifier.capabilitiesChanged.connect(...)
-//! [16]
-
-
-//! [17]
-cb = QComboBox(parentWidget)
-model = ObjectDescriptionModel(cb)
-model.setModelData(BackendCapabilities.availableAudioOutputDevices())
-cb.setModel(model)
-cb.setCurrentIndex(0) # select first entry
-//! [17]
-
-
-//! [18]
-cbIndex = cb.currentIndex()
-selectedDevice = model.modelData(cbIndex)
-//! [18]
-
-
-//! [19]
-path = Phonon.createPath(...)
-effect = Effect(this)
-path.insertEffect(effect)
-//! [19]
-
-
-//! [20]
-media = MediaObject()
-output = AudioOutput(Phonon.MusicCategory)
-path = Phonon.createPath(media, output)
-assert(path.isValid()) # for this simple case the path should always be
- # valid - there are unit tests to ensure it
-# insert an effect
-effectList = BackendCapabilities.availableAudioEffects()
-if effectList:
- effect = path.insertEffect(effectList[0])
-//! [20]
-
-
-//! [21]
-media = MediaObject(parent)
-vwidget = VideoWidget(parent)
-Phonon.createPath(media, vwidget)
-//! [21]
diff --git a/doc/codesnippets/doc/src/snippets/medianodesnippet.cpp b/doc/codesnippets/doc/src/snippets/medianodesnippet.cpp
deleted file mode 100644
index ba8fd8dcb..000000000
--- a/doc/codesnippets/doc/src/snippets/medianodesnippet.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <QtWidgets>
-
-#include <phonon/mediaobject.h>
-#include <phonon/audiooutput.h>
-#include <phonon/videowidget.h>
-#include <phonon/medianode.h>
-#include <phonon/path.h>
-
-
-int main(int argv, char **args)
-{
- QApplication app(argv, args);
-
-//![0]
- Phonon::MediaObject *mediaObject = new Phonon::MediaObject;
- Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput;
- Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget;
-
- Phonon::createPath(mediaObject, audioOutput);
- Phonon::createPath(mediaObject, videoWidget);
-
- QList<Phonon::Path> inputPaths =
- audioOutput->inputPaths(); // inputPaths = [ mediaObject ]
- QList<Phonon::Path> outputPaths =
- mediaObject->outputPaths(); // outputPaths = [ audioOutput, videoWidget ]
-//![0]
-
- return app.exec();
-}
diff --git a/doc/codesnippets/doc/src/snippets/phonon.cpp b/doc/codesnippets/doc/src/snippets/phonon.cpp
deleted file mode 100644
index b40fd94ae..000000000
--- a/doc/codesnippets/doc/src/snippets/phonon.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-Window::Window()
-{
- {
-//![0]
- Phonon::MediaObject *music =
- Phonon::createPlayer(Phonon::MusicCategory,
- Phonon::MediaSource("/path/mysong.wav"));
- music->play();
-//![0]
- }
-
- {
- QWidget *parentWidget = new QWidget;
- QUrl url("Myfancymusic");
-//![1]
- Phonon::VideoPlayer *player =
- new Phonon::VideoPlayer(Phonon::VideoCategory, parentWidget);
- player->play(url);
-//![1]
- }
-
- {
-//![2]
- Phonon::MediaObject *mediaObject = new Phonon::MediaObject(this);
- mediaObject->setCurrentSource(Phonon::MediaSource("/mymusic/barbiegirl.wav"));
- Phonon::AudioOutput *audioOutput =
- new Phonon::AudioOutput(Phonon::MusicCategory, this);
- Phonon::Path path = Phonon::createPath(mediaObject, audioOutput);
-//![2]
-
-//![3]
- Phonon::Effect *effect =
- new Phonon::Effect(
- Phonon::BackendCapabilities::availableAudioEffects()[0], this);
- path.insertEffect(effect);
-//![3]
- }
-
- {
-//![4]
- Phonon::MediaObject *mediaObject = new Phonon::MediaObject(this);
-
- Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget(this);
- Phonon::createPath(mediaObject, videoWidget);
-
- Phonon::AudioOutput *audioOutput =
- new Phonon::AudioOutput(Phonon::VideoCategory, this);
- Phonon::createPath(mediaObject, audioOutput);
-//![4]
-//![5]
- mediaObject->play();
-//![5]
- }
-}
diff --git a/doc/codesnippets/doc/src/snippets/phonon/samplebackend/main.cpp b/doc/codesnippets/doc/src/snippets/phonon/samplebackend/main.cpp
deleted file mode 100644
index 724ef5ce9..000000000
--- a/doc/codesnippets/doc/src/snippets/phonon/samplebackend/main.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-//! [snippet]
-QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const QList<QVariant> &args)
-{
- switch (c) {
- case MediaObjectClass:
- return new MediaObject(parent);
- case VolumeFaderEffectClass:
- return new VolumeFaderEffect(parent);
- case AudioOutputClass:
- return new AudioOutput(parent);
- case AudioDataOutputClass:
- return new AudioDataOutput(parent);
- case VisualizationClass:
- return new Visualization(parent);
- case VideoDataOutputClass:
- return new VideoDataOutput(parent);
- case EffectClass:
- return new Effect(args[0].toInt(), parent);
- case VideoWidgetClass:
- return new VideoWidget(qobject_cast<QWidget *>(parent));
- }
- return 0;
-}
-
-QSet<int> Backend::objectDescriptionIndexes(ObjectDescriptionType type) const
-{
- QSet<int> set;
- switch(type)
- {
- case Phonon::AudioOutputDeviceType:
- // use AudioDeviceEnumerator to list ALSA and OSS devices
- set << 10000 << 10001;
- break;
- case Phonon::AudioCaptureDeviceType:
- set << 20000 << 20001;
- break;
- case Phonon::VideoOutputDeviceType:
- break;
- case Phonon::VideoCaptureDeviceType:
- set << 30000 << 30001;
- break;
- case Phonon::VisualizationType:
- case Phonon::AudioCodecType:
- case Phonon::VideoCodecType:
- case Phonon::ContainerFormatType:
- break;
- case Phonon::EffectType:
- set << 0x7F000001;
- break;
- }
- return set;
-}
-
-QHash<QByteArray, QVariant> Backend::objectDescriptionProperties(ObjectDescriptionType type, int index) const
-{
- QHash<QByteArray, QVariant> ret;
- switch (type) {
- case Phonon::AudioOutputDeviceType:
- switch (index) {
- case 10000:
- ret.insert("name", QLatin1String("internal Soundcard"));
- break;
- case 10001:
- ret.insert("name", QLatin1String("USB Headset"));
- ret.insert("icon", KIcon("usb-headset"));
- ret.insert("available", false);
- break;
- }
- break;
- case Phonon::AudioCaptureDeviceType:
- switch (index) {
- case 20000:
- ret.insert("name", QLatin1String("Soundcard"));
- ret.insert("description", QLatin1String("first description"));
- break;
- case 20001:
- ret.insert("name", QLatin1String("DV"));
- ret.insert("description", QLatin1String("second description"));
- break;
- }
- break;
- case Phonon::VideoOutputDeviceType:
- break;
- case Phonon::VideoCaptureDeviceType:
- switch (index) {
- case 30000:
- ret.insert("name", QLatin1String("USB Webcam"));
- ret.insert("description", QLatin1String("first description"));
- break;
- case 30001:
- ret.insert("name", QLatin1String("DV"));
- ret.insert("description", QLatin1String("second description"));
- break;
- }
- break;
- case Phonon::VisualizationType:
- break;
- case Phonon::AudioCodecType:
- break;
- case Phonon::VideoCodecType:
- break;
- case Phonon::ContainerFormatType:
- break;
- case Phonon::EffectType:
- switch (index) {
- case 0x7F000001:
- ret.insert("name", QLatin1String("Delay"));
- ret.insert("description", QLatin1String("Simple delay effect with time, feedback and level controls."));
- break;
- }
- break;
- }
- return ret;
-}
-//! [snippet]
diff --git a/doc/codesnippets/doc/src/snippets/phononeffectparameter.cpp b/doc/codesnippets/doc/src/snippets/phononeffectparameter.cpp
deleted file mode 100644
index d849ef04e..000000000
--- a/doc/codesnippets/doc/src/snippets/phononeffectparameter.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <QtWidgets>
-
-#include <phonon/backendcapabilities.h>
-#include <phonon/phononnamespace.h>
-#include <phonon/effect.h>
-#include <phonon/effectparameter.h>
-#include <phonon/effectwidget.h>
-
-
-int main(int argv, char **args)
-{
- QApplication app(argv, args);
- app.setApplicationName("effectsnippets");
-
- QList<Phonon::EffectDescription> effects =
- Phonon::BackendCapabilities::availableAudioEffects();
-
- Phonon::Effect *effect = new Phonon::Effect(effects.at(3));
-
-//![0]
- QList<Phonon::EffectParameter> parameters = effect->parameters();
-
- foreach(Phonon::EffectParameter parameter, parameters) {
- // Do something with parameter
- }
-//![0]
-
-//![1]
- Phonon::EffectWidget *effectWidget = new Phonon::EffectWidget(effect);
-//![1]
-
- effectWidget->show();
-
- return app.exec();
-}
diff --git a/doc/codesnippets/doc/src/snippets/phononobjectdescription.cpp b/doc/codesnippets/doc/src/snippets/phononobjectdescription.cpp
deleted file mode 100644
index 7e7d483f1..000000000
--- a/doc/codesnippets/doc/src/snippets/phononobjectdescription.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <QtWidgets>
-
-#include <phonon/phononnamespace.h>
-#include <phonon/audiooutput.h>
-#include <phonon/seekslider.h>
-#include <phonon/mediaobject.h>
-#include <phonon/volumeslider.h>
-#include <phonon/backendcapabilities.h>
-#include <phonon/effect.h>
-#include <phonon/effectparameter.h>
-#include <phonon/objectdescriptionmodel.h>
-#include <QList>
-
-int main(int argv, char **args)
-{
- QApplication app(argv, args);
-
-//![0]
- QList<Phonon::EffectDescription> effectDescriptions =
- Phonon::BackendCapabilities::availableAudioEffects();
-
-//![1]
- QList<Phonon::AudioOutputDevice> audioOutputDevices =
- Phonon::BackendCapabilities::availableAudioOutputDevices();
-
-//![1]
- foreach (Phonon::EffectDescription effectDescription, effectDescriptions) {
- Phonon::Effect *effect = new Phonon::Effect(effectDescription);
-
- // ... Do something with the effect, like insert it into a media graph
- }
-
- Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput;
-
- audioOutput->setOutputDevice(audioOutputDevices[0]);
-//![0]
-
- return app.exec();
-
-}
diff --git a/doc/codesnippets/doc/src/snippets/videomedia.cpp b/doc/codesnippets/doc/src/snippets/videomedia.cpp
deleted file mode 100644
index 12550c861..000000000
--- a/doc/codesnippets/doc/src/snippets/videomedia.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-#include <QtWidgets>
-#include <phonon>
-
-
-int main(int argv, char **args)
-{
- QApplication app(argv, args);
-
- Phonon::VideoPlayer *player = new Phonon::VideoPlayer(Phonon::VideoCategory, 0);
-
-//![0]
- player->mediaObject()->isSeekable();
-//![0]
-
- return app.exec();
-}
-
diff --git a/doc/codesnippets/doc/src/snippets/volumeslider.cpp b/doc/codesnippets/doc/src/snippets/volumeslider.cpp
deleted file mode 100644
index cb85fbd9b..000000000
--- a/doc/codesnippets/doc/src/snippets/volumeslider.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <QtWidgets>
-
-#include <phonon/audiooutput.h>
-#include <phonon/mediaobject.h>
-#include <phonon/volumeslider.h>
-
-int main(int argv, char **args)
-{
- QApplication app(argv, args);
- app.setApplicationName("Volume slider tester");
-
- Phonon::MediaObject *mediaObject = new Phonon::MediaObject;
- mediaObject->setCurrentSource(QString("/home/gvatteka/Music/Lumme-Badloop.ogg"));
-
-//! [0]
- Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory);
- Phonon::createPath(mediaObject, audioOutput);
-
- Phonon::VolumeSlider *volumeSlider = new Phonon::VolumeSlider;
- volumeSlider->setAudioOutput(audioOutput);
-//! [0]
-
- mediaObject->play();
-
- volumeSlider->show();
-
- return app.exec();
-}
-
diff --git a/doc/codesnippets/snippets/phonon.cpp b/doc/codesnippets/snippets/phonon.cpp
deleted file mode 100644
index 950fe249b..000000000
--- a/doc/codesnippets/snippets/phonon.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-
-//![0]
-music = Phonon.createPlayer(Phonon.MusicCategory, Phonon.MediaSource("/path/mysong.wav"))
-music.play()
-//![0]
-
-parentWidget = QWidget()
-url = QUrl("Myfancymusic")
-
-//![1]
-player = Phonon.VideoPlayer(Phonon.VideoCategory, parentWidget)
-player.play(url)
-//![1]
-
-//![2]
-mediaObject = Phonon.MediaObject(self)
-mediaObject.setCurrentSource(Phonon.MediaSource("/mymusic/barbiegirl.wav"))
-audioOutput = Phonon.AudioOutput(Phonon.MusicCategory, self)
-path = Phonon.createPath(mediaObject, audioOutput)
-//![2]
-
-//![3]
-effect = Phonon.Effect(Phonon.BackendCapabilities.availableAudioEffects()[0], self)
-path.insertEffect(effect)
-//![3]
-
-//![4]
-mediaObject = Phonon.MediaObject(self)
-
-videoWidget = Phonon.VideoWidget(self)
-Phonon.createPath(mediaObject, videoWidget)
-
-audioOutput = Phonon.AudioOutput(Phonon.VideoCategory, self)
-Phonon.createPath(mediaObject, audioOutput)
-//![4]
-
-//![5]
-mediaObject.play()
-//![5]
diff --git a/doc/codesnippets/snippets/phonon/samplebackend/main.cpp b/doc/codesnippets/snippets/phonon/samplebackend/main.cpp
deleted file mode 100644
index 555f93b41..000000000
--- a/doc/codesnippets/snippets/phonon/samplebackend/main.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-
-//! [snippet]
-def createObject(self, c, parent, args):
- if c == BackendInterface.MediaObjectClass:
- return MediaObject(parent)
- elif c == BackendInterface.VolumeFaderEffectClass:
- return VolumeFaderEffect(parent)
- elif c == BackendInterface.AudioOutputClass:
- return AudioOutput(parent)
- elif c == BackendInterface.AudioDataOutputClass:
- return AudioDataOutput(parent)
- elif c == BackendInterface.VisualizationClass:
- return Visualization(parent)
- elif c == BackendInterface.VideoDataOutputClass:
- return VideoDataOutput(parent)
- elif c == BackendInterface.EffectClass:
- return Effect(args[0].toInt(), parent)
- elif c == BackendInterface.VideoWidgetClass:
- return VideoWidget(parent)
- return None
-
-def objectDescriptionIndexes(self, type_):
- retval = set()
-
- if type_ == Phonon.AudioOutputDeviceType:
- # use AudioDeviceEnumerator to list ALSA and OSS devices
- retval.add(10000)
- retval.add(10001)
- elif type_ == Phonon.AudioCaptureDeviceType:
- retval.add(20000)
- retval.add(20001)
- elif type_ == Phonon.VideoCaptureDeviceType:
- retval.add(30000)
- retval.add(30001)
- elif type_ == Phonon.EffectType:
- retval.add(0x7F000001)
- return retval
-
-def objectDescriptionProperties(self, type_, index):
- ret = {}
- if type_ == Phonon.AudioOutputDeviceType:
- if index == 10000:
- ret["name"] = "internal Soundcard"
- elif index == 10001:
- ret["name"] = "USB Headset"
- ret["available"] = False
- elif type_ == Phonon.AudioCaptureDeviceType:
- if index == 20000:
- ret["name"] = "Soundcard"
- ret["description"] = "first description"
- elif index == 20001:
- ret["name"] = "DV"
- ret["description"] = "second description"
- elif type_ == Phonon.VideoCaptureDeviceType:
- elif index == 30000:
- ret["name"] = "USB Webcam"
- ret["description"] = "first description"
- elif index == 30001:
- ret["name"] = "DV"))
- ret["description"] = "second description"
- elif type_ == Phonon.EffectType:
- if index == 0x7F000001:
- ret["name"] = "Delay"
- ret["description"] = "Simple delay effect with time, feedback and level controls."
- return ret
-//! [snippet]