- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

# mediasource.h

Go to the documentation of this file.

    00001 /*  This file is part of the KDE project
    00002     Copyright (C) 2007 Matthias Kretz <kretz@kde.org>
    00003
    00004     This library is free software; you can redistribute it and/or
    00005     modify it under the terms of the GNU Lesser General Public
    00006     License as published by the Free Software Foundation; either
    00007     version 2.1 of the License, or (at your option) version 3, or any
    00008     later version accepted by the membership of KDE e.V. (or its
    00009     successor approved by the membership of KDE e.V.), Nokia Corporation
    00010     (or its successors, if any) and the KDE Free Qt Foundation, which shall
    00011     act as a proxy defined in Section 6 of version 3 of the license.
    00012
    00013     This library is distributed in the hope that it will be useful,
    00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00016     Lesser General Public License for more details.
    00017
    00018     You should have received a copy of the GNU Lesser General Public
    00019     License along with this library.  If not, see <http://www.gnu.org/licenses/>.
    00020
    00021 */
    00022
    00023 #ifndef PHONON_MEDIASOURCE_H
    00024 #define PHONON_MEDIASOURCE_H
    00025
    00026 #include "phonon_export.h"
    00027 #include "phononnamespace.h"
    00028 #include "objectdescription.h"
    00029 #include <QtCore/QSharedData>
    00030 #include <QtCore/QString>
    00031
    00032 QT_BEGIN_HEADER
    00033 QT_BEGIN_NAMESPACE
    00034
    00035 class QUrl;
    00036 class QIODevice;
    00037
    00038 namespace Phonon
    00039 {
    00040
    00041 class MediaSourcePrivate;
    00042 class AbstractMediaStream;
    00043
    00061 class PHONON_EXPORT MediaSource
    00062 {
    00063     friend class StreamInterface;
    00064     public:
    00070         enum Type {
    00074             Invalid = -1,
    00078             LocalFile,
    00083             Url,
    00087             Disc,
    00095             Stream,
    00103             Empty
    00104 /*          post 4.0:
    00105             / **
    00106              * Links multiple MediaSource objects together.
    00107              * /
    00108             Link
    00109 */
    00110         };
    00111
    00120         MediaSource();
    00121
    00127         MediaSource(const QString &fileName); //krazy:exclude=explicit
    00128
    00134         MediaSource(const QUrl &url); //krazy:exclude=explicit
    00135
    00144         MediaSource(Phonon::DiscType discType, const QString &deviceName = QString()); //krazy:exclude=explicit
    00145
    00146 #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
    00147
    00157         MediaSource(AbstractMediaStream *stream); //krazy:exclude=explicit
    00158
    00170         MediaSource(QIODevice *ioDevice); //krazy:exclude=explicit
    00171 #endif
    00172
    00176         //MediaSource(const AudioCaptureDevice &, const VideoCaptureDevice &);
    00177
    00181         ~MediaSource();
    00182
    00188         MediaSource(const MediaSource &rhs);
    00189
    00195         MediaSource &operator=(const MediaSource &rhs);
    00196
    00200         bool operator==(const MediaSource &rhs) const;
    00201
    00213         void setAutoDelete(bool enable);
    00214
    00220         bool autoDelete() const;
    00221
    00227         Type type() const;
    00228
    00233         QString fileName() const;
    00234
    00239         QUrl url() const;
    00240
    00245         Phonon::DiscType discType() const;
    00246
    00251         QString deviceName() const;
    00252
    00253 #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
    00254
    00258         AbstractMediaStream *stream() const;
    00259 #endif
    00260
    00261         //AudioCaptureDevice audioCaptureDevice() const;
    00262         //VideoCaptureDevice videoCaptureDevice() const;
    00263
    00264 /*      post 4.0:
    00265         MediaSource(const QList<MediaSource> &mediaList);
    00266         QList<MediaSource> substreams() const;
    00267 */
    00268
    00269     protected:
    00270         QExplicitlySharedDataPointer<MediaSourcePrivate> d;
    00271         MediaSource(MediaSourcePrivate &);
    00272 };
    00273
    00274 } // namespace Phonon
    00275
    00276 QT_END_NAMESPACE
    00277 QT_END_HEADER
    00278
    00279 #endif // PHONON_MEDIASOURCE_H