[beast/devel: 15/17] BSE: hookup Bse main loop with aida_connection and provide Server as remote_origin
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast/devel: 15/17] BSE: hookup Bse main loop with aida_connection and provide Server as remote_origin
- Date: Wed, 1 May 2013 12:31:13 +0000 (UTC)
commit e4bb24796550f2088b4a9e8bb7936571642e7089
Author: Tim Janik <timj gnu org>
Date: Thu Mar 28 16:08:34 2013 +0000
BSE: hookup Bse main loop with aida_connection and provide Server as remote_origin
bse/bsemain.cc | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/bse/bsemain.cc b/bse/bsemain.cc
index 120f039..d305e79 100644
--- a/bse/bsemain.cc
+++ b/bse/bsemain.cc
@@ -27,6 +27,10 @@ static void bse_async_parse_args (gint *argc_p,
gchar ***argv_p,
BseMainArgs *margs,
SfiInitValue values[]);
+namespace Bse {
+static void init_aida_idl ();
+} // Bse
+
/* --- variables --- */
/* from bse.hh */
const guint bse_major_version = BSE_MAJOR_VERSION;
@@ -324,6 +328,7 @@ bse_init_test (gint *argc,
{
bse_init_intern (argc, argv, NULL, values, true);
}
+
static void
bse_main_loop (Rapicorn::AsyncBlockingQueue<int> *init_queue)
{
@@ -332,6 +337,8 @@ bse_main_loop (Rapicorn::AsyncBlockingQueue<int> *init_queue)
// start other threads
struct Internal : Bse::Sequencer { using Bse::Sequencer::_init_threaded; };
Internal::_init_threaded();
+ // allow aida IDL remoting
+ Bse::init_aida_idl();
// complete initialization
bse_initialization_stage++; // = 2
init_queue->push ('B'); // signal completion to caller
@@ -668,3 +675,18 @@ bse_async_parse_args (gint *argc_p,
/* non-configurable config updates */
margs->n_processors = get_n_processors ();
}
+
+namespace Bse {
+
+static void
+init_aida_idl ()
+{
+ // hook Aida connection into our main loop
+ AidaGlibSource *source = AidaGlibSource::create (Bse::ServerIface::__aida_connection__());
+ g_source_set_priority (source, BSE_PRIORITY_GLUE);
+ g_source_attach (source, bse_main_context);
+ // provide initial remote object reference
+ Bse::ServerIface::__aida_connection__()->remote_origin (&Bse::ServerImpl::instance());
+}
+
+} // Bse
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]