source: trunk/src/3rdparty/phonon/gstreamer/artssink.h

Last change on this file was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 2.4 KB
Line 
1/* This file is part of the KDE project.
2
3Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4
5This library is free software: you can redistribute it and/or modify
6it under the terms of the GNU Lesser General Public License as published by
7the Free Software Foundation, either version 2.1 or 3 of the License.
8
9This library is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU Lesser General Public License for more details.
13
14You should have received a copy of the GNU Lesser General Public License
15along with this library. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef __ARTS_SINK_H__
19#define __ARTS_SINK_H__
20
21#include <QtCore>
22#include <sys/types.h>
23#include <gst/gst.h>
24#include <gst/audio/gstaudiosink.h>
25
26QT_BEGIN_NAMESPACE
27
28namespace Phonon
29{
30namespace Gstreamer
31{
32
33G_BEGIN_DECLS
34
35extern "C" {
36
37#define GST_TYPE_ARTS_SINK (arts_sink_get_type())
38#define GST_ARTS_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ARTS_SINK,ArtsSink))
39#define GST_ARTS_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ARTS_SINK,ArtsSinkClass))
40#define GST_IS_ARTS_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ARTS_SINK))
41#define GST_IS_ARTS_SINK_CLASS(klass)(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ARTS_SINK))
42
43typedef struct _ArtsSink ArtsSink;
44typedef struct _ArtsSinkClass ArtsSinkClass;
45
46enum arts_parameter_t_enum {
47 ARTS_P_BUFFER_SIZE = 1,
48 ARTS_P_BUFFER_TIME = 2,
49 ARTS_P_BUFFER_SPACE = 3,
50 ARTS_P_SERVER_LATENCY = 4,
51 ARTS_P_TOTAL_LATENCY = 5,
52 ARTS_P_BLOCKING = 6,
53 ARTS_P_PACKET_SIZE = 7,
54 ARTS_P_PACKET_COUNT = 8,
55 ARTS_P_PACKET_SETTINGS = 9
56};
57
58typedef void *arts_stream_t;
59
60struct _ArtsSink {
61 GstAudioSink sink;
62 arts_stream_t stream;
63 int samplerate;
64 int samplebits;
65 int channels;
66 int bytes_per_sample;
67};
68
69struct GConfClient;
70struct GError;
71typedef void (*Ptr_g_type_init)();
72typedef GConfClient* (*Ptr_gconf_client_get_default)();
73typedef char* (*Ptr_gconf_client_get_string)(GConfClient*, const char*, GError **);
74typedef void (*Ptr_g_object_unref)(void *);
75typedef void (*Ptr_g_error_free)(GError *);
76typedef void (*Ptr_g_free)(void*);
77
78struct _ArtsSinkClass {
79 GstAudioSinkClass parent_class;
80};
81
82GType arts_sink_get_type (void);
83}
84G_END_DECLS
85
86}
87} //namespace Phonon::Gstreamer
88
89QT_END_NAMESPACE
90
91#endif // __ARTS_SINK_H__
Note: See TracBrowser for help on using the repository browser.