~ubuntu-branches/ubuntu/natty/phonon/natty

« back to all changes in this revision

Viewing changes to gstreamer/audiooutput.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2011-01-24 10:12:11 UTC
  • mfrom: (0.5.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110124101211-w9rew7q0dmwbwhqx
Tags: 4:4.7.0really4.4.4-0ubuntu1
* New upstream release
* Xine and GStreamer backends now split out source, remove build-deps and
  binary packages from debian/control
* Remove 02_no_rpath.patch, now upstream
* Disable kubuntu04_no_va_mangle.patch, no longer applies
* Remove kubuntu_05_gst_codec_installer_window_id.diff, kubuntu_06_forward_events.diff,
  kubuntu_07_include_fix.diff, gstreamer now separate

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  This file is part of the KDE project.
2
 
 
3
 
    Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4
 
    Copyright (C) 2008 Matthias Kretz <kretz@kde.org>
5
 
 
6
 
    This library is free software: you can redistribute it and/or modify
7
 
    it under the terms of the GNU Lesser General Public License as published by
8
 
    the Free Software Foundation, either version 2.1 or 3 of the License.
9
 
 
10
 
    This library is distributed in the hope that it will be useful,
11
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
    GNU Lesser General Public License for more details.
14
 
 
15
 
    You should have received a copy of the GNU Lesser General Public License
16
 
    along with this library.  If not, see <http://www.gnu.org/licenses/>.
17
 
*/
18
 
 
19
 
#ifndef Phonon_GSTREAMER_AUDIOOUTPUT_H
20
 
#define Phonon_GSTREAMER_AUDIOOUTPUT_H
21
 
 
22
 
#include "common.h"
23
 
#include "medianode.h"
24
 
 
25
 
#include <phonon/audiooutputinterface.h>
26
 
 
27
 
QT_BEGIN_NAMESPACE
28
 
 
29
 
namespace Phonon
30
 
{
31
 
namespace Gstreamer
32
 
{
33
 
class AudioOutput : public QObject, public AudioOutputInterface, public MediaNode
34
 
{
35
 
    Q_OBJECT
36
 
    Q_INTERFACES(Phonon::AudioOutputInterface Phonon::Gstreamer::MediaNode)
37
 
public:
38
 
    AudioOutput(Backend *backend, QObject *parent);
39
 
    ~AudioOutput();
40
 
 
41
 
    qreal volume() const;
42
 
    int outputDevice() const;
43
 
    void setVolume(qreal newVolume);
44
 
    bool setOutputDevice(int newDevice);
45
 
#if (PHONON_VERSION >= PHONON_VERSION_CHECK(4, 2, 0))
46
 
    bool setOutputDevice(const AudioOutputDevice &newDevice);
47
 
#endif
48
 
 
49
 
public:
50
 
    GstElement *audioElement()
51
 
    {
52
 
        Q_ASSERT(m_audioBin);
53
 
        return m_audioBin;
54
 
    }
55
 
 
56
 
    void mediaNodeEvent(const MediaNodeEvent *event);
57
 
 
58
 
Q_SIGNALS:
59
 
    void volumeChanged(qreal newVolume);
60
 
    void audioDeviceFailed();
61
 
 
62
 
private:
63
 
 
64
 
    qreal m_volumeLevel;
65
 
    int m_device;
66
 
 
67
 
    GstElement *m_volumeElement;
68
 
    GstElement *m_audioBin;
69
 
    GstElement *m_audioSink;
70
 
    GstElement *m_conv;
71
 
};
72
 
}
73
 
} //namespace Phonon::Gstreamer
74
 
 
75
 
QT_END_NAMESPACE
76
 
 
77
 
#endif // Phonon_GSTREAMER_AUDIOOUTPUT_H