[girl] Record API
- From: Ole Aamot <ole src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [girl] Record API
- Date: Sun, 2 Oct 2016 10:45:55 +0000 (UTC)
commit 7791f05c770c7f87f19f853505f93f2e67a94d52
Author: Ole Aamot <oka oka no>
Date: Sun Oct 2 12:45:39 2016 +0200
Record API
src/girl-record.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++
src/girl-record.h | 31 ++++++++++++++++++++++
2 files changed, 104 insertions(+), 0 deletions(-)
---
diff --git a/src/girl-record.c b/src/girl-record.c
new file mode 100644
index 0000000..49273e4
--- /dev/null
+++ b/src/girl-record.c
@@ -0,0 +1,73 @@
+/* $Id$
+ *
+ * GNOME Internet Radio Locator
+ *
+ * Copyright (C) 2016 Ole Aamot Software
+ *
+ * Author: Ole Aamot <oka oka no>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Based on gstplayer from
+ * https://github.com/sreerenjb/gstplayer/blob/master/gstplayer.c
+ *
+ * Copyright (C) 2010 Sreerenj Balachandran.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "girl.h"
+#include "girl-player-frontend.h"
+#include "girl-player-backend.h"
+#include "girl-player-globals.h"
+
+extern GirlData *girl;
+
+int
+girl_record_main(gchar *streamuri, gchar *name)
+{
+
+ gchar *uri = g_strdup(streamuri);
+
+ if (!girl_record_frontend_start (name)) {
+ g_message ("Record UI creation failure....");
+ exit (0);
+ }
+ if (!girl_record_backend_start (uri, name)) {
+ g_message ("Record backend creation failure");
+ exit (0);
+ }
+
+ loop = g_main_loop_new (NULL, FALSE);
+ g_main_loop_run (loop);
+
+ girl_record_backend_stop ();
+
+ girl->record_status = GIRL_RECORD_TRUE;
+
+}
diff --git a/src/girl-record.h b/src/girl-record.h
new file mode 100644
index 0000000..130f5c7
--- /dev/null
+++ b/src/girl-record.h
@@ -0,0 +1,31 @@
+/* $Id$
+ *
+ * GNOME Internet Radio Locator
+ *
+ * Copyright (C) 2016 Ole Aamot Software
+ *
+ * Author: Ole Aamot <oka oka no>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __GIRL_RECORD__
+#define __GIRL_RECORD__
+
+int girl_record_main(gchar *streamuri, gchar *name);
+
+#endif /* __GIRL_RECORD__ */
+
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]