+ p_appthread =
+ (vlc_object_t *)vlc_object_create( p_this, sizeof(vlc_object_t) );
+
+ /* Create the BApplication thread and wait for initialization */
+ vlc_thread_create( p_appthread, "app thread", AppThread,
+ VLC_THREAD_PRIORITY_LOW, true );
+}
+
+/*****************************************************************************
+ * system_Configure: check for system specific configuration options.
+ *****************************************************************************/
+void system_Configure( libvlc_int_t *, int *pi_argc, const char *ppsz_argv[] )
+{
+}
+
+/*****************************************************************************
+ * system_End: destroy the BApplication object.
+ *****************************************************************************/
+void system_End( libvlc_int_t *p_this )
+{
+ /* Tell the BApplication to die */
+ be_app->PostMessage( REALLY_QUIT );
+
+ vlc_thread_join( p_appthread );
+ vlc_object_release( p_appthread );
+
+ free( vlc_global()->psz_vlcpath );
+}
+
+/* following functions are local */
+
+/*****************************************************************************
+ * AppThread: the BApplication thread.
+ *****************************************************************************/
+static void AppThread( vlc_object_t * p_this )
+{
+ VlcApplication * BeApp =
+ new VlcApplication("application/x-vnd.videolan-vlc");
+ vlc_object_attach( p_this, p_this->p_libvlc );
+ BeApp->p_this = p_this;