~oem-solutions-group/unity-2d/phonon

« back to all changes in this revision

Viewing changes to gstreamer/audiodataoutput.h

  • Committer: Alex Chiang
  • Date: 2011-04-12 15:51:11 UTC
  • Revision ID: achiang@canonical.com-20110412155111-n3oq9x9w9f2yt4xk
* New upstream release
* Switch to source format 3.0 (quilt)
* Bump the Breaks version too. I really should have test installed that.
* Bump version number so that the phonon packages are installable
* Sync with Debian, now packaging separately from Qt since QtWebKit is also packaged separately
* Bump version number to match ours
* Bump Qt build-depends to 4.7
* Update symbol file for armel, fixes FTBFS.
* New upstream release:
 - fixes crash when opening PDF document (Closes: #580802);
* Add debian/watch.
* Update patches:
  - refresh 01 and 02;
  - adapt 03 to upstream changes;
  - remove 04, was stolen from upstream.
* Use dh_xine, version libxine-dev build dependency to >= 1.1.16.3
  (Closes: #575115).
* Update libphonon4 symbol file.
* Add ${misc:Depends} to phonon-backend-null.
* Update libphonon-dev.install: ship new style CamelCase headers in
  /usr/include/phonon.
* Make libphonon-dev depend on libqt4-dev.
* Manually create /usr/include/qt4/phonon symlink on upgrades.
  See #404850 why dpkg does not create it by itself.
* Urgency high as the bug leaves Phonon undiscoverable by KDE
  FindPhonon.cmake after upgrade and the buggy libphonon-dev is already in
  testing.
* phonon-backend-gstreamer: depend on gstreamer0.10-alsa only on Linux
  architectures, as ALSA is available only there. (Closes: #578255)
* Upload to unstable.
* New upstream release (4.4.0).
* Add 04_skip_pa_detection_if_no_glib_loop.diff patch which fixes phonon
  hang if GLib loop is disabled in Qt.
* Refresh patches.
* Update libphonon4 symbol file.
* Update libphonon-dev.install: add pulsesupport.h.
* Override lintian "phonon-backend-null: empty-binary-package".
* Add explicit debian/source/format as lintian suggests.
* New upstream release (using really-style version number).
* Build Phonon from kdesupport again:
  - Add phonon, phonon-dbg, libphonon4 and libphonon-dev packages.
* Remove patches:
  - 02_disable_phonon_build.diff - dropped.
  - 03_r950739_fullscreen_hidecursor.diff - stolen upstream.
  - 05_924144_encoding_local_files_fix.diff - stolen upstream.
  - 06_983650_play_filenames_with_hash.diff - stolen upstream.
  - 07_feature_backport_xine_equalizer.diff - stolen upstream.
* Update debian/control:
  - Bump build dependencies (debhelper and pkg-kde-tools).
  - Add libpulse-dev build dependency.
  - Remove libphonon-dev build dependency.
  - Bump Standards-Version from 3.8.2 to 3.8.4 (no changes needed).
* Remove myself from Uploaders.
* Change my email address to modax@debian.org in Uploaders field.
* Fix Vcs-Browser URL.
* Improve descriptions.
* Downgrade Qt build dependency to 4.5.
* Bump version to 4:4.6.0really4.3.80 to be higher than the last
  release of the Phonon libraries with the qt4-x11 source package.
* Convert libphonon4.symbols to new pkg-kde-tools 0.6 style, adjust
  for 4.3.80 release.
* Do not install "experimental" headers to libphonon-dev.
* Add libphonon4 lintian overrides for
  {shlibs,symbols}-declares-dependency-on-other-package warnings.
* Add 02_no_rpath.patch patch to disable /usr/lib RPATH by default.
* Add DEP-3 patch header to 01_phonon-inc.patch.
* Tweak copyright file a bit so lintian stops thinking it's of
  old-dh-make style. Also bump years of packaging copyright.
* Add phonon-backends-dbg to phonon-dbg Conflicts and Replaces.
* Do not version dependency on the phonon metapackage.
* Use strict interdependencies among backends and libphonon4.
* Build depend on dpkg-dev 1.15.5.
* Make libphonon4 break phonon-backend-xine (<< 4:4.6.0really4.3.80).
* Fix installing of include headers so that others can also find them.
+++ Changes by Modestas Vainius:
* Rename source package to phonon-backends.
* Add phonon-backends-dbg debug package.
* Add patch (06_983650_play_filenames_with_hash.diff) to fix playback of
  files with hash (#) symbol in their name (Closes: #546271).
* Backport Xine equalizer support from Phonon trunk (patch
  07_feature_backport_xine_equalizer.diff).
+++ Changes by Modestas Vainius:
* Install backends to /usr/lib/qt4 (Closes: #539623). Otherwise pure Qt4
  applications cannot find any backends.
+++ Changes by Sune Vuorela:
* Backport a bugfix from upstream to fix encoding issues with filenames.
* Fix not-installed file and remove trailing whitespaces
+++ Changes by Fathi Boudra:
* Add gstreamer0.10-alsa dependency to phonon-backend-gstreamer.
  (Closes: #532490)
+++ Changes by Modestas Vainius:
* Add 03_r950739_fullscreen_hidecursor.diff patch which makes it possible
  to hide mouse cursor in fullscreen mode when xine backend is in use.
* Build Phonon from Qt sources:
  - Add myself to Uploaders field.
  - Add 02_disable_phonon_build.diff to avoid Phonon build.
  - Add versioned libphonon-dev build dependency.
  - Bump Standards-Version from 3.8.1 to 3.8.2 (no changes needed).
  - Remove phonon, phonon-dbg, libphonon4 and libphonon-dev packages.
  - Cleanup unnecessary files.
* New upstream release.
+++ Changes by Modestas Vainius:
* Point Debian Vcs URLs to pkg-kde/trunk (new location).
+++ Changes by Modestas Vainius
* Bump debian/compat and debhelper build dependency to v7 (to get more
  sophisticated debian/tmp handling).
* Switch from internal debian/cdbs/kde.mk to pkg-kde-tools:
  - bump pkg-kde-tools build depend to 0.4;
  - remove debian/cdbs directory;
  - replace debian/cdbs/kde.mk with
    /usr/share/pkg-kde-tools/qt-kde-team/1/debian-qt-kde.mk in debian/rules;
  - remove custom symbolshelper rules from debian/rules.
* Remove THIS_SHOULD_GO_TO_UNSTABLE from debian/rules.
* New upstream release.
+++ Changes by Modestas Vainius:
* Add xine backend. Based on kdebase-runtime packaging.
* Make xine backend a default one (via phonon metapackage).
* Bump cmake build dependency to 2.6.2.
* Bump Standards-Version to 3.8.0: add README.source.
* phonon-xine-backend replaces earlier kde-icons-oxygen.
* Add symbols file for libphonon4. This needs pkg-kde-tools (>= 0.3)
  at build time.
  - Hook up phonon dependency to play(), stop(), pause() etc. methods.
* Resync patches:
  - drop phonon-libraryPaths.patch patch. Merged upstream.
  - prepend sequence number to phonon-inc.patch (01_) and refresh it.
* Switch to new installgen format.
* Make phonon-backend-xine depend on gstreamer0.10-plugins-base. Otherwise,
  it causes crashes sometimes.
* Make phonon-backend-gstreamer recommend gstreamer0.10-plugins-good and
  suggest gstreamer0.10-plugins-ugly. Explain reasoning in the package 
  description.
+++ Changes by George Kiagiadakis:
* Build-conflict with the experimental libxine2 as the
  phonon-xine backend cannot build with it.
+++ Changes by Pino Toscano:
* Update copyright file.
+++ Changes by Ana Beatriz Guerrero Lopez:
* Update packaging years and upstream URL in copyright. 
* Make phonon find its backends. (Closes: 498573)
  Thanks to Vincent Fourmond for tracking down the cause and Matthias Kretz
  for the fix.
* Create a magic phonon header (thanks to Matthias Kretz) and as the Qt.
  documentation is unclear, symlink Phonon to the phonon header.
  Also create a symlink from /usr/include/qt4/phonon to /usr/include/phonon
  so that application using qmake can use it.
* New upstream release.
+++ Changes by Modestas Vainius:
* Bump libphonon shlibs to 4.2.0.

* New snapshot, upload to unstable. 
+++ Changes by Modestas Vainius:
* Exclude phonon metapackage from automatic shlibdeps because libphonon4
  itself ended up depending on it somehow.
+++ Changes by Ana Beatriz Guerrero Lopez:
* Update copyright file and write the BSD license instead of pointing at it.
* Replace the N/A stuff with some more meaningful (unspecified).
+++ Changes by Ana Guerrero, Modestas Vainius, Pino Toscano and Sune Vuorela:
* First release. This has been split out from kde4libs.
* Add support for Phonon backends:
  - Make the phonon-backend-gstreamer provide a virtual phonon-backend.
  - Create a phonon metapackage that installs the phonon library and ensure
    a backend is installed too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  This file is part of the KDE project
 
2
    Copyright (C) 2006 Matthias Kretz <kretz@kde.org>
 
3
    Copyright (C) 2009 Martin Sandsmark <sandsmark@samfundet.no>
 
4
 
 
5
    This library is free software; you can redistribute it and/or
 
6
    modify it under the terms of the GNU Lesser General Public
 
7
    License as published by the Free Software Foundation; either
 
8
    version 2.1 of the License, or (at your option) version 3, or any
 
9
    later version accepted by the membership of KDE e.V. (or its
 
10
    successor approved by the membership of KDE e.V.), Nokia Corporation
 
11
    (or its successors, if any) and the KDE Free Qt Foundation, which shall
 
12
    act as a proxy defined in Section 6 of version 3 of the license.
 
13
 
 
14
    This library is distributed in the hope that it will be useful,
 
15
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
17
    Lesser General Public License for more details.
 
18
 
 
19
    You should have received a copy of the GNU Lesser General Public
 
20
    License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
21
*/
 
22
 
 
23
#ifndef Phonon_GSTREAMER_AUDIODATAOUTPUT_H
 
24
#define Phonon_GSTREAMER_AUDIODATAOUTPUT_H
 
25
 
 
26
#include "abstractaudiooutput.h"
 
27
#include "backend.h"
 
28
#include "medianode.h"
 
29
#include <phonon/audiodataoutput.h>
 
30
#include <phonon/audiodataoutputinterface.h>
 
31
 
 
32
QT_BEGIN_HEADER
 
33
QT_BEGIN_NAMESPACE
 
34
 
 
35
namespace Phonon
 
36
{
 
37
namespace Gstreamer
 
38
{
 
39
    /**
 
40
     * \author Martin Sandsmark <sandsmark@samfundet.no>
 
41
     */
 
42
    class AudioDataOutput : public QObject,
 
43
                            public AudioDataOutputInterface,
 
44
                            public MediaNode
 
45
    {
 
46
        Q_OBJECT
 
47
        Q_INTERFACES(Phonon::AudioDataOutputInterface Phonon::Gstreamer::MediaNode)
 
48
 
 
49
        public:
 
50
            AudioDataOutput(Backend *, QObject *);
 
51
            ~AudioDataOutput();
 
52
 
 
53
        public Q_SLOTS:
 
54
            int dataSize() const;
 
55
            int sampleRate() const;
 
56
            void setDataSize(int size);
 
57
 
 
58
        public:
 
59
            /// callback function for handling new audio data
 
60
            static void processBuffer(GstPad*, GstBuffer*, gpointer);
 
61
 
 
62
            Phonon::AudioDataOutput* frontendObject() const { return m_frontend; }
 
63
            void setFrontendObject(Phonon::AudioDataOutput *frontend) { m_frontend = frontend; }
 
64
 
 
65
            GstElement *audioElement() { return m_queue; }
 
66
 
 
67
            void mediaNodeEvent(const MediaNodeEvent *event);
 
68
 
 
69
 
 
70
        signals:
 
71
            void dataReady(const QMap<Phonon::AudioDataOutput::Channel, QVector<qint16> > &data);
 
72
            void dataReady(const QMap<Phonon::AudioDataOutput::Channel, QVector<float> > &data);
 
73
            void endOfMedia(int remainingSamples);
 
74
 
 
75
        private:
 
76
            void convertAndEmit(const QVector<qint16>&, const QVector<qint16>&);
 
77
 
 
78
            GstElement *m_queue;
 
79
            int m_dataSize;
 
80
            QVector<qint16> m_pendingData;
 
81
            Phonon::AudioDataOutput *m_frontend;
 
82
            int m_channels;
 
83
    };
 
84
}} //namespace Phonon::Gstreamer
 
85
 
 
86
QT_END_NAMESPACE
 
87
QT_END_HEADER
 
88
 
 
89
// vim: sw=4 ts=4 tw=80
 
90
#endif // Phonon_FAKE_AUDIODATAOUTPUT_H