~ubuntu-branches/ubuntu/utopic/rhythmbox/utopic-proposed

« back to all changes in this revision

Viewing changes to player/rb-recorder.h

Tags: upstream-0.9.2
ImportĀ upstreamĀ versionĀ 0.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
 
2
/*
 
3
 * arch-tag: Interface to audio recorder backend  
 
4
 *
 
5
 * Copyright (C) 2004 William Jon McCann <mccann@jhu.edu>
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or
 
8
 * modify it under the terms of the GNU General Public License as
 
9
 * published by the Free Software Foundation; either version 2 of the
 
10
 * License, or (at your option) any later version.
 
11
 *
 
12
 * This program is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
 * General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public
 
18
 * License along with this program; if not, write to the
 
19
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
20
 * Boston, MA 02111-1307, USA.
 
21
 */
 
22
 
 
23
#ifndef __RB_RECORDER_H__
 
24
#define __RB_RECORDER_H__
 
25
 
 
26
#include <glib-object.h>
 
27
 
 
28
G_BEGIN_DECLS
 
29
 
 
30
typedef enum
 
31
{
 
32
        RB_RECORDER_ERROR_NO_INPUT_PLUGIN,
 
33
        RB_RECORDER_ERROR_NO_TYPEFIND_PLUGIN,
 
34
        RB_RECORDER_ERROR_NO_DEMUX_PLUGIN,
 
35
        RB_RECORDER_ERROR_NO_AUDIO,
 
36
        RB_RECORDER_ERROR_GENERAL,
 
37
        RB_RECORDER_ERROR_INTERNAL
 
38
} RBRecorderError;
 
39
 
 
40
typedef enum {
 
41
        RB_RECORDER_ACTION_UNKNOWN,
 
42
        RB_RECORDER_ACTION_FILE_CONVERTING,
 
43
        RB_RECORDER_ACTION_DISC_PREPARING_WRITE,
 
44
        RB_RECORDER_ACTION_DISC_WRITING,
 
45
        RB_RECORDER_ACTION_DISC_FIXATING,
 
46
        RB_RECORDER_ACTION_DISC_BLANKING
 
47
} RBRecorderAction;
 
48
 
 
49
typedef enum {
 
50
        RB_RECORDER_RESPONSE_NONE   =  0,
 
51
        RB_RECORDER_RESPONSE_CANCEL = -1,
 
52
        RB_RECORDER_RESPONSE_ERASE  = -2,
 
53
        RB_RECORDER_RESPONSE_RETRY  = -3
 
54
} RBRecorderResponse;
 
55
 
 
56
typedef enum {
 
57
        RB_RECORDER_RESULT_ERROR,
 
58
        RB_RECORDER_RESULT_CANCEL,
 
59
        RB_RECORDER_RESULT_FINISHED,
 
60
        RB_RECORDER_RESULT_RETRY
 
61
} RBRecorderResult;
 
62
 
 
63
#define RB_RECORDER_ERROR rb_recorder_error_quark ()
 
64
 
 
65
GQuark rb_recorder_error_quark (void);
 
66
 
 
67
#define RB_TYPE_RECORDER            (rb_recorder_get_type ())
 
68
#define RB_RECORDER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), RB_TYPE_RECORDER, RBRecorder))
 
69
#define RB_RECORDER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), RB_TYPE_RECORDER, RBRecorderClass))
 
70
#define RB_IS_RECORDER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RB_TYPE_RECORDER))
 
71
#define RB_IS_RECORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RB_TYPE_RECORDER))
 
72
#define RB_RECORDER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), RB_TYPE_RECORDER, RBRecorderClass))
 
73
 
 
74
typedef struct _RBRecorderPrivate RBRecorderPrivate;
 
75
 
 
76
typedef struct _RBRecorder
 
77
{
 
78
        GObject            parent;
 
79
 
 
80
        RBRecorderPrivate *priv;
 
81
} RBRecorder;
 
82
 
 
83
typedef struct
 
84
{
 
85
        GObjectClass parent_class;
 
86
} RBRecorderClass;
 
87
 
 
88
 
 
89
GType        rb_recorder_get_type           (void);
 
90
 
 
91
RBRecorder * rb_recorder_new                (GError    **error);
 
92
 
 
93
void         rb_recorder_open               (RBRecorder *recorder,
 
94
                                             const char *uri,
 
95
                                             const char *cdtext,
 
96
                                             GError    **error);
 
97
 
 
98
gboolean     rb_recorder_opened             (RBRecorder *recorder);
 
99
 
 
100
void         rb_recorder_close              (RBRecorder *recorder,
 
101
                                             GError    **error);
 
102
 
 
103
void         rb_recorder_write              (RBRecorder *recorder,
 
104
                                             GError    **error);
 
105
void         rb_recorder_pause              (RBRecorder *recorder,
 
106
                                             GError    **error);
 
107
 
 
108
char *       rb_recorder_get_default_device (void);
 
109
 
 
110
char *       rb_recorder_get_device         (RBRecorder *recorder,
 
111
                                             GError    **error);
 
112
 
 
113
gboolean     rb_recorder_set_device         (RBRecorder *recorder,
 
114
                                             const char *device,
 
115
                                             GError    **error);
 
116
 
 
117
void         rb_recorder_set_tmp_dir        (RBRecorder *recorder,
 
118
                                             const char *path,
 
119
                                             GError    **error);
 
120
 
 
121
gint64       rb_recorder_get_media_length   (RBRecorder *recorder,
 
122
                                             GError    **error);
 
123
        
 
124
int          rb_recorder_burn               (RBRecorder *recorder,
 
125
                                             int         speed,
 
126
                                             GError    **error);
 
127
int          rb_recorder_burn_cancel        (RBRecorder *recorder);
 
128
 
 
129
gboolean     rb_recorder_enabled            (void);
 
130
 
 
131
G_END_DECLS
 
132
 
 
133
#endif /* __RB_RECORDER_H__ */