Exemplo n.º 1
0
/*****************************************************************************
 * Close: destroy interface stuff
 *****************************************************************************/
static void Close( vlc_object_t *p_this )
{
    intf_thread_t *p_intf = (intf_thread_t *)p_this;
    intf_sys_t *p_sys = p_intf->p_sys;

    /* Flush the queue and unsubscribe from the message queue */
    /* FIXME: flush */
    msg_Unsubscribe( p_sys->p_sub );

    switch( p_sys->msg.i_mode )
    {
    case MODE_HTML:
        fputs( HTML_FOOTER, p_sys->msg.p_file );
        break;
#ifdef HAVE_SYSLOG_H
    case MODE_SYSLOG:
        closelog();
        break;
#endif
    case MODE_TEXT:
    default:
        fputs( TEXT_FOOTER, p_sys->msg.p_file );
        break;
    }

    /* Close the log file */
    if( p_sys->msg.p_file )
        fclose( p_sys->msg.p_file );

    /* Destroy structure */
    free( p_sys );
}
Exemplo n.º 2
0
/*****************************************************************************
 * Close: destroy interface
 *****************************************************************************/
static void Close( vlc_object_t *p_this )
{
    intf_thread_t *p_intf = (intf_thread_t *)p_this;

    if( p_intf->p_sys->p_input )
    {
        vlc_object_release( p_intf->p_sys->p_input );
    }

    MenuItemExt::ClearList( p_intf->p_sys->p_video_menu );
    delete p_intf->p_sys->p_video_menu;
    MenuItemExt::ClearList( p_intf->p_sys->p_audio_menu );
    delete p_intf->p_sys->p_audio_menu;
    MenuItemExt::ClearList( p_intf->p_sys->p_settings_menu );
    delete p_intf->p_sys->p_settings_menu;
    MenuItemExt::ClearList( p_intf->p_sys->p_navig_menu );
    delete p_intf->p_sys->p_navig_menu;

    if( p_intf->pf_show_dialog )
    {
        /* We must destroy the dialogs thread */
#if 0
        wxCommandEvent event( wxEVT_DIALOG, INTF_DIALOG_EXIT );
        p_intf->p_sys->p_wxwindow->AddPendingEvent( event );
#endif
        vlc_thread_join( p_intf );
    }

    // Unsuscribe to messages bank
    msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );

    // Destroy structure
    free( p_intf->p_sys );
}
Exemplo n.º 3
0
//---------------------------------------------------------------------------
// Close: destroy interface
//---------------------------------------------------------------------------
static void Close( vlc_object_t *p_this )
{
    intf_thread_t *p_intf = (intf_thread_t *)p_this;

    msg_Dbg( p_intf, "closing skins2 module" );

    vlc_mutex_lock( &skin_load.mutex );
    skin_load.intf = NULL;
    vlc_mutex_unlock( &skin_load.mutex);

    vlc_join( p_intf->p_sys->thread, NULL );

    vlc_mutex_destroy( &p_intf->p_sys->init_lock );
    vlc_cond_destroy( &p_intf->p_sys->init_wait );

    if( p_intf->p_sys->p_playlist )
        pl_Release( p_this );

    // Unsubscribe from messages bank
#if 0
    msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
#endif

    vlc_cond_destroy( &p_intf->p_sys->vout_wait );
    vlc_mutex_destroy( &p_intf->p_sys->vout_lock );

    // Destroy structure
    free( p_intf->p_sys );
}
Exemplo n.º 4
0
//---------------------------------------------------------------------------
// Close: destroy interface
//---------------------------------------------------------------------------
static void Close( vlc_object_t *p_this )
{
    intf_thread_t *p_intf = (intf_thread_t *)p_this;

    // Destroy "singleton" objects
    OSFactory::instance( p_intf )->destroyOSLoop();
    ThemeRepository::destroy( p_intf );
    Dialogs::destroy( p_intf );
    Interpreter::destroy( p_intf );
    AsyncQueue::destroy( p_intf );
    VarManager::destroy( p_intf );
    VlcProc::destroy( p_intf );
    OSFactory::destroy( p_intf );

    if( p_intf->p_sys->p_playlist )
    {
        vlc_object_release( p_intf->p_sys->p_playlist );
    }

   // Unsubscribe from messages bank
    msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );

    // Destroy structure
    free( p_intf->p_sys );
}
Exemplo n.º 5
0
void libvlc_log_close( libvlc_log_t *p_log, libvlc_exception_t *p_e )
{
    if( p_log && p_log->p_messages )
    {
        msg_Unsubscribe(p_log->p_instance->p_libvlc_int, p_log->p_messages);
        libvlc_release( p_log->p_instance );
        free(p_log);
    }
    else
        RAISEVOID("Invalid log object!");
}
Exemplo n.º 6
0
void libvlc_log_close( libvlc_log_t *p_log )
{
    if( !p_log )
        return;

    assert( p_log->p_messages );
    msg_Unsubscribe(p_log->p_messages);
    libvlc_release( p_log->p_instance );
    libvlc_log_clear( p_log );
    vlc_spin_destroy( &p_log->data.lock );
    free(p_log);
}
Exemplo n.º 7
0
Arquivo: log.c Projeto: Kafay/vlc
void libvlc_log_close( libvlc_log_t *p_log, libvlc_exception_t *p_e )
{
    if( p_log )
    {
        assert( p_log->p_messages );
        msg_Unsubscribe(p_log->p_messages);
        libvlc_release( p_log->p_instance );
        libvlc_log_clear( p_log, p_e );
        vlc_spin_destroy( &p_log->data.lock );
        free(p_log);
    }
    else
        RAISEVOID("Invalid log object!");
}
Exemplo n.º 8
0
/*****************************************************************************
 * MessagesWindow::~MessagesWindow
 *****************************************************************************/
MessagesWindow::~MessagesWindow()
{
     msg_Unsubscribe( p_intf, p_sub );
}