1
/*  This file is part of the KDE project.
2
3
Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4
5
This library is free software: you can redistribute it and/or modify
6
it under the terms of the GNU Lesser General Public License as published by
7
the Free Software Foundation, either version 2.1 or 3 of the License.
8
9
This library is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
GNU Lesser General Public License for more details.
13
14
You should have received a copy of the GNU Lesser General Public License
15
along with this library.  If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef __PHONON_SRC_H__
19
#define __PHONON_SRC_H__
20
21
#include <sys/types.h>
22
#include <gst/gst.h>
23
#include <gst/base/gstbasesrc.h>
24
#include "streamreader.h"
25
26
QT_BEGIN_NAMESPACE
27
28
namespace Phonon
29
{
30
namespace Gstreamer
31
{
32
33
G_BEGIN_DECLS
34
35
#define GST_TYPE_PHONON_SRC \
36
  (phonon_src_get_type())
37
#define GST_PHONON_SRC(obj) \
38
  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PHONON_SRC,PhononSrc))
39
#define GST_PHONON_SRC_CLASS(klass) \
40
  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PHONON_SRC,PhononSrcClass))
41
#define GST_IS_PHONON_SRC(obj) \
42
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PHONON_SRC))
43
#define GST_IS_PHONON_SRC_CLASS(klass) \
44
  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PHONON_SRC))
45
46
typedef struct _PhononSrc PhononSrc;
47
typedef struct _PhononSrcClass PhononSrcClass;
48
49
// PhononSrc:
50
struct _PhononSrc {
51
    GstBaseSrc element;
52
#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
53
    StreamReader *device;
54
#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
55
};
56
57
struct _PhononSrcClass {
58
    GstBaseSrcClass parent_class;
59
};
60
61
GType phonon_src_get_type (void);
62
63
G_END_DECLS
64
65
}
66
} //namespace Phonon::Gstreamer
67
68
QT_END_NAMESPACE
69
70
71
#endif // __PHONON_SRC_H__