]> err.no Git - mapper/blob - src/audio-note.h
Map widget:
[mapper] / src / audio-note.h
1 /*
2  * This file is part of mapper
3  *
4  * Copyright (C) 2007 Kaj-Michael Lang
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20
21 #ifndef _AUDIO_NOTE_H
22 #define _AUDIO_NOTE_H
23
24 #include <gtk/gtk.h>
25 #include <gst/gst.h>
26
27 typedef struct _note_pipeline note_pipeline;
28 struct _note_pipeline {
29         GstElement *pipeline;
30         GstElement *src;
31         GstElement *sink;
32         GstElement *filter;
33         GstElement *caps;
34         GstCaps *srccaps;
35         gboolean active;
36         gboolean rec;
37 };
38
39 typedef struct _audio_note_ui audio_note_ui;
40 struct _audio_note_ui {
41         GtkWidget *vbox;
42         GtkWidget *lbl_time;
43         GtkWidget *btn_record;
44         GtkWidget *btn_play;
45         GtkWidget *btn_stop;
46         gint pos_sid;
47         gchar *cfile;
48         gchar *basedir;
49         note_pipeline *note_play;
50         note_pipeline *note_record;
51 };
52
53 audio_note_ui *audio_note_new(void);
54
55 gboolean audio_note_init(void);
56 void audio_note_deinit(void);
57
58 void audio_note_set_basedir(audio_note_ui *ui, const gchar *basedir);
59
60 gboolean audio_note_record(gchar *file);
61 gboolean audio_note_play(gchar *file);
62
63 #endif