]> err.no Git - mapper/commitdiff
Add
authorKaj-Michael Lang <milang@onion.tal.org>
Thu, 14 Jun 2007 19:54:32 +0000 (22:54 +0300)
committerKaj-Michael Lang <milang@onion.tal.org>
Thu, 14 Jun 2007 19:54:32 +0000 (22:54 +0300)
src/audio-record.c [new file with mode: 0644]
src/file.h [new file with mode: 0644]

diff --git a/src/audio-record.c b/src/audio-record.c
new file mode 100644 (file)
index 0000000..3b9a673
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Quick record audio notes on the road.
+ */
+
+#include "config.h"
+#include <gst/gst.h>
+
+#ifdef WITH_HILDON
+#define AUDIO_SRC "dsppcmsrc"
+#define AUDIO_SINK "dsppcmsink"
+#else
+#define AUDIO_SRC "alsasrc"
+#define AUDIO_SINK "alsasink"
+#endif
+
+struct {
+       GstElement *pipeline,
+       GstElement *src,
+       GstElement *sink,
+       GstElement *filter,
+} pipeline;
+
+gboolean
+audio_create_record_pipeline(void)
+{
+pipeline=gst_pipeline_new("pipeline");
+src=gst_element_factory_make(AUDIO_SRC, "source");
+filter=gst_element_factory_make("wavenc", "filter");
+sink=gst_element_factory_make("filesink", "sink");
+}
+
+void
+audio_src_filename(GstElement *src, gchar *file)
+{
+g_object_set(G_OBJECT(src), "location", file, NULL);
+}
+
+gboolean
+audio_cb_xxx(void) 
+{
+
+}
+
diff --git a/src/file.h b/src/file.h
new file mode 100644 (file)
index 0000000..da01b30
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef _MAPPER_FILE_H
+#define _MAPPER_FILE_H
+
+gboolean file_save(gchar *dir, gchar *file, GnomeVFSHandle **vfs);
+gboolean file_open(gchar *dir, gchar *file, GnomeVFSHandle **vfs);
+gboolean open_file(gchar ** bytes_out, GnomeVFSHandle ** handle_out, gint * size_out,
+         gchar ** dir, gchar ** file, GtkFileChooserAction chooser_action);
+
+#endif