~ubuntu-branches/ubuntu/quantal/libdmapsharing/quantal

« back to all changes in this revision

Viewing changes to libdmapsharing/g-gst-input-stream.h

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette
  • Date: 2011-03-29 19:52:57 UTC
  • mfrom: (0.1.2 experimental) (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20110329195257-0zas0lq4c03gwo46
Tags: 2.9.7-1
Initial release. (Closes: #620060)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * GGstInputStream class: Open a URI using g_gst_input_stream_new ().
3
 
 * Data is decoded using GStreamer and is then made available by the class's
4
 
 * read operations.
5
 
 *
6
 
 * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
7
 
 *
8
 
 * This library is free software; you can redistribute it and/or
9
 
 * modify it under the terms of the GNU Lesser General Public
10
 
 * License as published by the Free Software Foundation; either
11
 
 * version 2.1 of the License, or (at your option) any later version.
12
 
 *
13
 
 * This library is distributed in the hope that it will be useful,
14
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
 
 * Lesser General Public License for more details.
17
 
 *
18
 
 * You should have received a copy of the GNU Lesser General Public
19
 
 * License along with this library; if not, write to the Free Software
20
 
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
 
 */
22
 
 
23
 
#ifndef __G_GST_INPUT_STREAM
24
 
#define __G_GST_INPUT_STREAM
25
 
 
26
 
#include <gio/gio.h>
27
 
#include <gst/gst.h>
28
 
 
29
 
G_BEGIN_DECLS
30
 
 
31
 
#define TYPE_G_GST_INPUT_STREAM         (g_gst_input_stream_get_type ())
32
 
#define G_GST_INPUT_STREAM(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
33
 
                                               TYPE_G_GST_INPUT_STREAM, \
34
 
                                               GGstInputStream))
35
 
#define G_GST_INPUT_STREAM_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
36
 
                                               TYPE_G_GST_INPUT_STREAM, \
37
 
                                               GGstInputStreamClass))
38
 
#define IS_G_GST_INPUT_STREAM(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
39
 
                                               TYPE_G_GST_INPUT_STREAM))
40
 
#define IS_G_GST_INPUT_STREAM_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
41
 
                                               TYPE_G_GST_INPUT_STREAM_CLASS))
42
 
#define G_GST_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
43
 
                                               TYPE_G_GST_INPUT_STREAM, \
44
 
                                               GGstInputStreamClass))
45
 
#define G_GST_INPUT_STREAM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
46
 
                                           TYPE_G_GST_INPUT_STREAM, \
47
 
                                           GGstInputStreamPrivate))
48
 
 
49
 
typedef struct GGstInputStreamPrivate GGstInputStreamPrivate;
50
 
 
51
 
typedef struct {
52
 
        GInputStream parent;
53
 
        GGstInputStreamPrivate *priv;
54
 
} GGstInputStream;
55
 
 
56
 
typedef struct {
57
 
        GInputStreamClass parent;
58
 
 
59
 
        void (*kill_pipeline) (GGstInputStream *);
60
 
} GGstInputStreamClass;
61
 
 
62
 
GType         g_gst_input_stream_get_type (void);
63
 
 
64
 
/* Supported transcode target formats (data read from GGstInputStream
65
 
 * will be in one of these formats): */
66
 
enum {
67
 
        RAW, /* No transcoding performed. */
68
 
        WAV16,
69
 
        MP3
70
 
};
71
 
 
72
 
GInputStream* g_gst_input_stream_new             (const gchar *uri);
73
 
 
74
 
void g_gst_input_stream_new_buffer_cb            (GstElement *element,
75
 
                                                  GGstInputStream *stream);
76
 
 
77
 
gchar *dmapd_input_stream_strdup_format_extension (const gint format_code);
78
 
 
79
 
G_END_DECLS
80
 
 
81
 
#endif /* __G_GST_INPUT_STREAM */