From: Kaj-Michael Lang Date: Thu, 14 Jun 2007 19:54:32 +0000 (+0300) Subject: Add X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4929295db8b48628780c162316aba19a8047dbae;p=mapper Add --- diff --git a/src/audio-record.c b/src/audio-record.c new file mode 100644 index 0000000..3b9a673 --- /dev/null +++ b/src/audio-record.c @@ -0,0 +1,43 @@ +/* + * Quick record audio notes on the road. + */ + +#include "config.h" +#include + +#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 index 0000000..da01b30 --- /dev/null +++ b/src/file.h @@ -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